plaatje=0
!set n=$teller
bewerking=nivo/bewerking2.proc
somtekst$n=!record 4 of lang/remarks.$taal
nivo_title=!record 18 of lang/remarks.$taal
wims_texsize=+2
F=f\left(x\right)\,\,=\,\,
#functie=wisk functie
#som= latex som
#GOED= afgeleide
#goed= latex afgeleide

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   
c=!randitem 2,4,6,8,10,12,14,16
d=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
e=!randitem 2,3,4,5 
f=!randitem 6,7,8,9 
!if $b=$d
    b=$[$b+1]
!endif	

pm=!randitem +,-
mp=!randitem +,-
keuze=!randitem 1,2
s=!randitem 1,-1
a=$[$s*$a]  
	
!if $R = 1
    !if $keuze=1
        functie=$a*sqrt(x) $pm $c
        opgave$n=$F $a\cdot \sqrt x $pm $c
    !else
        functie=$a*x^$b $pm $c*sqrt(x) 
        opgave$n=$F $a\cdot x^$b $pm $c\sqrt x 
    !endif
!endif
!if $R = 2 	
    !if $keuze=1
	c=$[$s*$c]
        functie=$c*x*sqrt(x) $pm $d*x
        opgave$n=$F $c\cdot x\sqrt x $pm $d\cdot x
    !else
        functie=$a*x^$b $pm $c*x^$e*sqrt(x) 
        opgave$n=$F $a\cdot x^$b $pm $c\cdot x^$e \cdot \sqrt x 
    !endif
!endif
!if $R>2
    somtekst$n=!record 5 of lang/remarks.$taal
    wims_texsize=+5
    !if $R = 3 
	!if $keuze=1
    	    functie=$a*x^(1/$f) $pm $d
    	    opgave$n=$F $a\cdot \root $f \of{x} $pm $d
	!else
    	    functie=$a*x^$b $pm $f*x^($e/$f)
    	    opgave$n=$F $a\cdot x^$b $pm $f\cdot \root $f \of{x^$e}}
	!endif
    !endif
    !if $R > 3 
	!if $keuze=1
    	    functie=$a*x^$e*x^(1/$f) $pm $d
	    opgave$n=$F $a\cdot x^$e\cdot \root $f \of{x} $pm $d
	!else
	    g=!randitem 2,4,8
	    functie=$a*x^$b $pm $f/(x^($e/$f))
	    opgave$n=$F $a\cdot x^$b $pm \frac{$f}{\root $f \of{x^$e}}
	!endif
    !endif
!endif
#sommen=!exec pari deriv($functie ,x)\
#printtex(deriv($functie,x))
#GOED$n=!line 1 of $sommen
#goed$n=!line 2 of $sommen
#latex$n=1

sommen=!exec maxima diff($functie ,x); 
GOED$n=!line 1 of $sommen	
goed$n=!texmath $(GOED$n)
