bewerking=nivo/bewerking7.proc
!set n=$teller
!if $graad =0
    R=$teller
!else
    R=$graad
!endif        
afrondingsfactor=0
!readproc $authordir/afronding.$taal
woordmax=150
charmax=300
nivo_title=!record 4 of lang/remarks.$taal
somtekst$n=!record 63 of lang/remarks.$taal
domein=-10:10

!if $R=1
    keuze=!randitem 1,0
    bereik=-1.5:1.5
    a=!randitem 2,3,4,5,6,7
    tot=!exec pari 2/($a-1)\
    1/($a+1)\
    2/($a+1)
    
    t1=!line 1 of $tot
    t2=!line 2 of $tot
    t3=!line 3 of $tot

    !if $keuze=1
	functie1=sin(x)
	functie2=sin($a*x)
	GOED$n=$t1*k*pi,$t2*pi+$t3*k*pi
	gi=2
	anders=2
    !else 
	a=!randitem 2,4,5,6   
	functie1=cos(x)
	functie2=cos($a*x)
	!if $a=2
	    GOED$n=2/3*k*pi
	    anders=1
	    gi=1
	!else
    	    GOED$n=$t1*k*pi,$t3*k*pi,$t3*pi+$t3*k*pi
	    anders=2
	    gi=2
	!endif
    !endif
!endif 

!if $R=2
    keuze=!randitem 1,1,0,0,0
    # meer cosinus ;)
    bereik=-1.5:1.5
    a=!randitem 2,3,4,5,6,7
    b=!randitem 1,2,3,4,5,6,7,8,9,10
    tot=!exec pari $b/($a-1)\
    $b/($a+1)\
    2/($a+1)\
    2/($a-1)
    
    t1=!line 1 of $tot
    t2=!line 2 of $tot
    t3=!line 3 of $tot
    t4=!line 4 of $tot
    
    !if $keuze=1
	functie1=sin(x)
	functie2=sin($a*x-$b)
	GOED$n=$t1+$t4*k*pi,$t2+pi/$[$a+1]+$t3*k*pi
	anders=2
	gi=2
    !else    
	functie1=cos(x)
	functie2=cos($a*x-$b)
	GOED$n=$t1+$t4*k*pi,$t2+$t3*k*pi,pi*$t3+$t2 + $t3*k*pi
	anders=2
	gi=2
    !endif
!endif 

!if $R>2
    !if $R>3
	keuze=!randitem 1,0,0
	# meer cosinus ;)
    !else
	keuze=!randitem 1,0
    !endif
    bereik=-1.5:1.5
    a=!randitem 3,4,5,6,7
    b=!randitem 1,2,3,4,5,6,7,8,9,10
    c=$[$a-1]

    tot=!exec pari $b/($a-$c)\
    $b/($a+$c)\
    2/($a+$c)\
    2/($a-$c)
    
    t1=!line 1 of $tot
    t2=!line 2 of $tot
    t3=!line 3 of $tot
    t4=!line 4 of $tot
    
    !if $keuze=1
	functie1=sin($c*x)
	functie2=sin($a*x-$b)
	GOED$n=$t1+2*k*pi,$t2+pi/($[$a+$c])+$t3*k*pi
	anders=2
	gi=2
    !else    
	functie1=cos($c*x)
	functie2=cos($a*x-$b)
	GOED$n=$t1+$t4*k*pi,$t2+$t3*k*pi,$t2+pi*$t3+$t3*k*pi
	anders=2
	gi=2
    !endif
!endif



opgave$n=!texmath $functie2 = $functie1
#gi=!itemcnt $(GOED$n)
!if $anders=1
    goed$n=!texmath $(GOED$n)
    goed$n= x \, = \, $(goed$n)
!else
    !if $anders=2
	G1=!item 1 of $(GOED$n)
	G2=!item 2 of $(GOED$n)
	G1=!texmath $G1
	G2=!texmath $G2
	goed$n= \left{ \begin{array}{l}  x_1=$G1 \\ \\  x_2=$G2 \end{array} \right.
    !else
	G1=!item 1 of $(GOED$n)
	G2=!item 2 of $(GOED$n)
	G3=!item 3 of $(GOED$n)
	G4=!item 4 of $(GOED$n)
	G1=!texmath $G1
	G2=!texmath $G2
	G3=!texmath $G3
	G4=!texmath $G4
	goed$n= \left\{ \begin{array}{ccc} x_1=$G1 \wedge  x_2=$G2\\ of \\ x_1=$G3 \wedge x_2=$G4 \end{array}\right.
    !endif	 	
!endif    
        
insplot_set=size 1,0.5; noborder ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid xtics ytics mxtics
plaatje$n=[$domein] [$bereik] $functie1,$functie2
