plaatje=0
n=$teller
bewerking=nivo/bewerking2.proc
somtekst$n=!record 4 of lang/remarks.$taal
nivo_title=!record 14 of lang/remarks.$taal
F=f(x)\,\,=\,\,
#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
b=!randitem 2,3,4,5,6,7,8,9,10    
c=!randitem 2,3,4,5,6,7,8,9,10
d=!randitem 2,3,4,5,6,7,8,9,10    
e=!randitem 2,3,4
f=!randitem 2,3,4 
!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=($b*x)/(x^$f $mp $d)
        opgave$n=$F \frac{$b\cdot x}{x^{$f} $mp $d }
    !else
        functie=($c*x $pm $e)/($b*x $mp $d)
        opgave$n=$F \frac{ $c \cdot x $pm $e}{$b \cdot x $mp $d }
    !endif
!endif
!if $R = 2
    !if $keuze=1
        functie=($a*x^$e $pm $b)/($c*x^$f $mp $d)
        opgave$n=$F \frac{$a\cdot x^{$e} $pm $b }{$c\cdot x^{$f} $mp $d}
    !else
	!if $e=2
            functie=($a*x $pm $b)/($c*x^$e $mp x + $e)
            opgave$n=$F \frac{$a\cdot x $pm $b}{$c\cdot x^{$e} $mp x + $e}
	!else
	    g=$[$e-1]
            functie=($a*x $pm $b)/(x^$e $mp x^$g + $e)
            opgave$n=$F \frac{$a\cdot x $pm $b}{x^{$e} $mp x^{$g} + $e}
	!endif
    !endif
!endif
!if $R = 3
    !if $keuze=1 
        functie=($a*x^$b)/(ln(x))
        opgave$n=$F \frac{ $a\cdot x^{$b} }{ \ln(x)}
    !else
        functie=($a*$b^x)/(x^$c)
        opgave$n=$F \frac{ $a\cdot $b^{x}}{x^{$c}}
    !endif
!endif
!if $R > 3 
    functie=(sqrt(x))/($b^x)
    opgave$n=$F \frac{\sqrt{x}}{$b^{x}}
!endif
    
sommen=!exec maxima factor(diff($functie ,x));  
GOED$n=!line 1 of $sommen	
GOED$n=!replace internal log by ln in $(GOED$n)
goed$n=!texmath $(GOED$n)
goed$n=!replace internal log by ln in $(goed$n)
