checkfile=exos/checkfile7.proc
math=1
cols=20
rows=5
questiontype=0
!set n=$counter
!if $level =0
    R=$counter
!else
    R=$level
!endif
rounding=0
!readproc $remarkdir/rounding.$taal
woordmax=150
charmax=300
exotitle=!record 4 of lang/remarks.$taal
#@ Vergelijkingen met Sinus of Cosinus
question$n=!record 63 of lang/remarks.$taal
#@ Los exact op:
domein=-10:10
!if $R=1
    keuze=!randitem 1,0
    bereik=-1.5:1.5
    !if $keuze=1
        a=!randitem 2,3,4,5,6,7
    !else
        a=!randitem 2,4,5,6
    !endif
    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
    #t1=2/$[$a-1]
    #t2=1/$[$a+1]
    #t3=2/$[$a+1]
    !if $keuze=1
	functie1=sin(x)
	functie2=sin($a*x)
	answer$n=$t1*k*pi,$t2*pi+$t3*k*pi
	var5=2
	var4=2
    !else 
	functie1=cos(x)
	functie2=cos($a*x)
	!if $a=2
	    answer$n=2/3*k*pi
	    var5=1
	    var4=1
	!else
    	    answer$n=$t1*k*pi,$t3*k*pi,$t3*pi+$t3*k*pi
	    var5=3
	    var4=2
	!endif
    !endif
    !goto READY
!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)
	answer$n=$t1+$t4*k*pi,$t2+pi/$[$a+1]+$t3*k*pi
	var5=2
	var4=2
    !else    
	functie1=cos(x)
	functie2=cos($a*x-$b)
	answer$n=$t1+$t4*k*pi,$t2+$t3*k*pi,pi*$t3+$t2 + $t3*k*pi
	var5=3
	var4=2
    !endif
    !goto READY
!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)
	answer$n=$t1+2*k*pi,$t2+pi/($[$a+$c])+$t3*k*pi
	var5=2
	var4=2
    !else    
	functie1=cos($c*x)
	functie2=cos($a*x-$b)
	answer$n=$t1+$t4*k*pi,$t2+$t3*k*pi,$t2+pi*$t3+$t3*k*pi
	var5=3
	var4=2
    !endif
!endif

:READY

formula$n=!texmath $functie2 = $functie1
#var5=!itemcnt $(answer$n)
!if $var4=1
    texanswer$n= x \, = \, $(answer$n)
!else
    G1=!item 1 of $(answer$n)
    G2=!item 2 of $(answer$n)
    G1=!texmath $G1
    G2=!texmath $G2
    texanswer$n= \left[ \begin{array}{l}  x_1=$G1 \\ \\  x_2=$G2 \end{array} \right.
!endif    
        
!if $image=1
    plot=1
    draw=0
    image_settings$n=size 0.7,0.4; noborder ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid xtics ytics mxtics
    image$n=[$domein] [$bereik] $functie1 notitle ,$functie2 notitle
!else
    !if $teaching=1
	insplot_set=size 1,0.5; noborder ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid xtics ytics mxtics
	!insplot [$domein] [$bereik] $functie1 notitle ,$functie2 notitle
	helptext=!record 63 of $remarkdir/commonremarks.$taal
	helptext=<a href="javascript:showimage();">$helptext
    !endif
!endif
