!set n=$teller
bewerking=nivo/bewerking2.proc
somtekst$n=!record 15 of lang/remarks.$taal
nivo_title=!record 16 of lang/remarks.$taal


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   
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 
	GOED$n=$a/x
    !else
	GOED$n=$a/x^$b
    !endif
    opgave$n=!exec pari printtex(deriv($(GOED$n),x))
    opgave$n= f(x) = $(opgave$n)
 !exit
!endif
!if $R = 2 
	s=!randitem -1,1
	a=$[$s*$a]
    !if $keuze=1	
	GOED$n=$a*ln(abs(x))
	# let op met |x| syntax !!! zie syntax2.proc
	opgave$n=$a/x
	opgave$n=!texmath  f(x) = $(opgave$n)
    !else
	GOED$n=$a/x^$b $pm $d*x
	opgave$n=!exec pari printtex(deriv($(GOED$n),x))
	opgave$n= f(x) = $(opgave$n)
    !endif
 !exit
!endif
!if $R = 3
    s=!randitem -1,1
    e=$[$s*$e]
    !if $keuze=1 
	GOED$n=$e*ln(abs(x$pm $c))
	# let op met |x| syntax !!! zie syntax2.proc
	opgave$n=$e/(x$pm $c)
	opgave$n=!texmath  f(x) = $(opgave$n)
    !else
	GOED$n=$a*x^$d $pm $c/x^$b
        opgave$n=!exec pari printtex(deriv($(GOED$n),x))
        opgave$n= f(x) = $(opgave$n)
    !endif
 !exit
!endif
!if $R > 3 
    s=!randitem -1,1
    e=$[$s*$e]
    !if $c=$d
	c=$[$c+1]
    !endif
    !if $keuze=1
	GOED$n=$e*ln(abs($b*x$pm $c))
	# let op met |x| syntax !!! zie syntax2.proc
	opgave$n=$[$b*$e]/($b*x$pm $c)
	opgave$n=!texmath  f(x) = $(opgave$n)
    !else
        GOED$n=$e*x^$d $pm $c*x^$b $mp $a/x^$f
        opgave$n=!exec pari printtex(deriv($(GOED$n),x))
        opgave$n= f(x) = $(opgave$n)
    !endif
 !exit
!endif

