n=$counter
checkfile=exos/checkfile11.proc
math=1
cols=20
rows=5
questiontype=0
!set n=$counter
!if $level =0
    R=$counter
!else
    R=$level
!endif        
rounding=100
!readproc $remarkdir/rounding.$taal
woordmax=150
charmax=300
keuze=!randitem 1,0
pm=!randitem -1,1
bereik=-1.5:1.5
var5=$empty
# var5=!itemcnt $(answer$n)

!if $R=1
    a=!randitem 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
    a=$[$pm*$a]
    k1=0
    k2=!htmlmath 4*pi
    domein=0:4*pi
    !if $keuze=1
	functie=sin(x)
	X=$[asin($a)]
	!if $pm=-1
	    answer$n=pi-$X,2*pi-$X,3*pi-$X,4*pi-$X	
	!else
	    answer$n=$X,pi-$X,$X+2*pi,3*pi-$X
	!endif
	var5=4
    !else    
	functie=cos(x)
	X=$[acos($a)]
	answer$n=$X,2*pi-$X,2*pi+$X,4*pi-$X
	var5=4
    !endif
    formula$n=!texmath $functie = $a
!endif 

!if $R>1
    tot=!randitem 2@2*pi@4,3@2*pi@6,4@pi@4,6@pi@6
    a=!randitem 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9
    a=$[$pm*$a]
    k1=0
    tot=!replace internal @ by , in $tot
    b=!item 1 of $tot
    k=!item 2 of $tot
    var5=!item 3 of $tot
    domein=0:$k
    k2=!htmlmath $k
    !if $keuze=1
	functie=sin($b*x)
	X=$[asin($a)]
	!if $var5=4
	    !if $pm=1
		answer$n=$X/$b,(pi-$X)/$b,$X/$b+2*pi/$b,(pi-$X)/$b+2*pi/$b	
	    !else
		answer$n=(pi-$X)/$b,(2*pi-$X)/$b,(pi-$X)/$b+2*pi/$b,(2*pi-$X)/$b+2*pi/$b			
	    !endif
	!else
	    # DUS 6 SNIJPUNTEN
	    !if $pm=1
		answer$n=$X/$b,(pi-$X)/$b,$X/$b+2*pi/$b,(pi-$X)/$b+2*pi/$b,$X/$b+4*pi/$b,(pi-$X)/$b+4*pi/$b	
	    !else
		answer$n=(pi-$X)/$b,(2*pi-$X)/$b,(pi-$X)/$b+2*pi/$b,(2*pi-$X)/$b+2*pi/$b,(pi-$X)/$b+4*pi/$b,(2*pi-$X)/$b+4*pi/$b			
	    !endif
	!endif
    !else    
	functie=cos($b*x)
	X=$[acos($a)]
	!if $var5=4
	    answer$n=$X/$b,(2*pi-$X)/$b,$X/$b+2*pi/$b,(2*pi-$X)/$b+2*pi/$b
	!else
	    # DUS 6 SNIJPUNTEN
	    answer$n=$X/$b,(2*pi-$X)/$b,$X/$b+2*pi/$b,(2*pi-$X)/$b+2*pi/$b,$X/$b+4*pi/$b,(2*pi-$X)/$b+4*pi/$b
	!endif
    !endif
    formula$n=!texmath $functie = $a
!endif 


tekst=!record 64 of lang/remarks.$taal
#@ Los op in het Domein <b>[ $k1 : $k2 ]</b><br>
question$n=$tekst
L=$empty
latex=$empty
!for p=1 to $var5
    L=!append word l to $L
    G=!item $p of $(answer$n)
    Gc=$[(round(100*($G)))/100]
    #exotext=!append line x=$Gc to $exotext
    G=!texmath $G
    latex=!append line x_{$p} \simeq $G \simeq $Gc\\ to $latex
!next p

texanswer$n=\left[ \begin{array}{$L} $latex \end{array}\right.

!if $image=1    
    image_settings$n=size 1,0.5; noborder ; zeroaxis linetype 3 ; tmargin 1 ; rmargin 1 ; grid xtics ytics mxtics
    image$n=[$domein] [$bereik] $functie notitle ,$a 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] $functie notitle ,$a notitle
	helptext=!record 63 of $remarkdir/commonremarks.$taal
	helptext=<a href="javascript:showimage();">$helptext
    !endif
!endif
