plaatje=0
n=$teller
nivo_title=!record 16 of lang/remarks.$taal
somtekst$n=!record 4 of lang/remarks.$taal
F=f\left(x\right)\,\,=\,\,
#functie=wisk functie
#som= latex som
#GOED= afgeleide
#goed= latex afggeleide
R=$graad

!if $graad=0
    R=$teller
!endif
	
a=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
b=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
c=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
d=!randitem 2,3,4,5,6,7,8   
e=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
pm=!randitem +,-
mp=!randitem +,-
keuze=!randitem 1,2
s=!randitem -1,1
a=$[$s*$a]

!if $R = 1 
    !if $keuze=1
	sin=!randitem sin,cos,tan
        functie=$a*$sin(x)
        opgave$n=$F $a\cdot \$sin \left( x \right)
    !else
	sin=!randitem sin,tan
        functie=$a*$sin(x) $pm $b*cos(x)
        opgave$n=$F $a\cdot \$sin \left( x \right) $pm $b\cdot \cos \left( x \right)
    !endif
!endif 
!if $R = 2
    !if $keuze=1 
        sin=!randitem sin,cos,tan
        functie=$a*$sin(x^$b)
        opgave$n=$F $a\cdot\$sin\left( x^{$b} \right)
    !else
        sin=!randitem sin,cos,tan
        sin=!randitem tan
        functie=$a*$sin($b*x)
        opgave$n=$F $a\cdot\$sin\left( $b x \right)
    !endif
!endif
!if $R = 3 
    sin=!randitem sin,cos,tan
    !if $keuze=1
        functie=$a*x^$d*$sin($b*x)
        opgave$n=$F $a\cdot x^{$d} \cdot \$sin\left($b  x \right)
    !else
        functie=$b^x*$sin(x)
        opgave$n=$F $b^{x} \cdot \$sin\left(x \right)
    !endif
!endif
!if $R > 3 
    sin=!randitem sin,cos
    !if $keuze=1
        functie=$sin($a*x)/($b*x)
        opgave$n=$F \frac {\$sin \left($a x \right)}{$b \cdot x}
    !else
        functie=$sin(x)/($b*x)
        opgave$n=$F \frac {\$sin \left(x \right)}{$b \cdot x}
    !endif
!endif
	
sommen=!exec maxima diff($functie ,x);        
GOED$n=!line 1 of $sommen

!if $sin=tan
    bewerking=nivo/bewerking3.proc
    !if sec isin $(GOED$n)
	GOED$n=!replace internal sec by 1/cos in $(GOED$n)
    !endif
!else
    bewerking=nivo/bewerking2.proc
!endif
    
goed$n=!texmath $(GOED$n)
goed$n=!replace internal log by ln in $(goed$n)
