plaatje=0
!set n=$teller
bewerking=nivo/bewerking1.proc
somtekst$n=!record 4 of lang/remarks.$taal
nivo_title=!record 17 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 1,2,3,4,5,6,7,8,9,10,11,12
b=!randitem 2,3,4,5,6,7,8   
c=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
d=!randitem 2,3,4,5,6
e=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 
f=!randitem 2,3,4,5,6  
keuze=!randitem 1,2 
!if $b=$d
    b=$[$b+1]
!endif	

pm=!randitem +,-
mp=!randitem +,-
	
!if $R = 1 
    s=!randitem -1,1
    a=$[$s*$a]
    !if $keuze=1 
	functie=$a/x
	opgave$n=$F \frac{$a}{x}
    !else
	functie=$a/x $pm $d*x
	opgave$n=$F \frac{$a}{x} $pm $d\cdot x
    !endif
!endif
!if $R = 2 
    !if $keuze=1	
	s=!randitem -1,1
	a=$[$s*$a]
	functie=$a/x^$b $pm $c
	opgave$n=$F \frac{$a}{x^$b} $pm $c
    !else
	functie=$c*x^$d $pm $a/x^$b
	opgave$n=$F $c\cdot x^$d $pm \frac{$a}{x^$b}
    !endif
!endif
!if $R = 3
        s=!randitem -1,1
        e=$[$s*$e]
    !if $keuze=1 
        functie=$e*x^$d $pm $c*x^$b $mp $a/x^$f
        opgave$n=$F $e\cdot x^$d $pm $c\cdot x^$b $mp \frac{$a}{x^$f} 
    !else
        functie=$e $mp $a/x^$d $pm $c/x^$b 
        opgave$n=$F $e $mp \frac{$a}{x^$d} $pm \frac{$c}{x^$b}  
    !endif
!endif
!if $R > 3 
    s=!randitem -1,1
    a=$[$s*$a]
    functie=$a/x^$b*($f*x^$d $pm $c)
    opgave$n=$F \frac{$a}{x^$b} \cdot($f\cdot x^$d $pm $c)
!endif

sommen=!exec pari deriv($functie ,x)\
printtex(deriv($functie,x))
GOED$n=!line 1 of $sommen
goed$n=!line 2 of $sommen
