bewerking=bewerking1.proc
hint=$empty
n=$teller
!if $graad=0
    R=$teller
!else
    R=$graad
!endif    
!if $taal=nl
    nivo_title=Bepaal de verticale asymptoten
    vertikaal=De verticale asymptoot is: de lijn
    vertikalen=De verticale asymptoten zijn de lijnen
    en=en  
!else
    nivo_title=Determine all the vertical asymptotes
    vertikaal=The vertical asymptote is the line 
    vertikalen=The vertical asymptotes are the lines  
    en=and
!endif
!if $R=1
    a=!randitem -10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10
    b=!randitem 1,2,3,4,5,6,7,8,9,10    
    f$n=$a/(x-$b)
    F$n=\frac{$a}{\left(x - $b\right)}
    GOED1$n=$b
    AS1=$b
    GOED1$n=!nospace $(GOED1$n)
    goed$n=$vertical x=$b
    aantal_Vasymptoten=1
    aantal_Hasymptoten=0
    
    XRANGE=$[$b-10],$[$b+10]
    YRANGE=-20,20
    XSCHAAL=4
    YSCHAAL=2
    asymplijn=dvline $AS1,0,green

    !readproc nivo/plaatje.proc
    !exit
!endif
!if $R=2
    ##algemene vergelijking hyperbool:##f(x)=a/(x*(x-b)*(x-c))
    ##verticale asymptoot:x=b of x=c of x=0
    a=!randitem -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    b=!randint 1,2,3,4,5,6,7,8
    pm =!randitem +,-
    
    f$n=$a/(x $pm $b)
    F$n=\frac{$a}{\left( x $pm $b\right)}
    !if $pm=+
	GOED1$n=$[-1*$b]
	AS1=$[-1*$b]
	goed$n=$vertical x=$[-1*$b] 
    !else
	GOED1$n=$b
	AS1=$b
	goed$n=$vertical x=$b 
    !endif    
    aantal_Vasymptoten=1
    aantal_Hasymptoten=0    
    XRANGE=-10,10
    YRANGE=-20,20
    XSCHAAL=2
    YSCHAAL=5
    asymplijn=dvline $AS1,0,green

    !readproc nivo/plaatje.proc
    !exit
!endif
!if $R>2
    ##algemene vergelijking hyperbool:##f(x)=a/(x*(x-b)*(x-c))
    ##verticale asymptoot:x=b of x=c of x=0
    a=!randitem -15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    b=!randitem 1,4,9,16,25,36,49,64

    !if $R=3
	f$n=$a/(-x^2 + $b)
	F$n=\frac{$a}{\left(-x^2 + $b\right)}
	AS1=$[sqrt($b)]
	AS2=$[-1*sqrt($b)]
	GOED1$n=$AS1,$AS2
        GOED1$n=!nospace $(GOED1$n)
    !endif
    !if $R>3
	keuze=!randitem 1,2
	!if $keuze=1
    	    c=!randitem 1,2,3,4,5,6
    	    d=!randitem 1,2,3,4,5,6
    	    f$n=$a/((x - $c)*(x+$d))
	    F$n=\frac{$a}{\left(x - $c\right)\cdot\left(x + $d\right)}
    	    AS1=$c
	    AS2=$[-1*$d]
	    GOED1$n=$AS1,$AS2
	    GOED1$n=!nospace $(GOED1$n)
	!else
	    c=!randitem 1,2,3,4,5,6,-1,-2,-3,-4,-5,-6
	    d=!randitem 1,2,3,4,5,6,-1,-2,-3,-4,-5,-6
	    F=!exec pari (x + ($c))*(x + ($d))
	    FF=!texmath $F
	    f$n=$a/($F)
	    F$n=\frac{$a}{\left( $FF \right)}
	    AS1=$[-1*$c]
	    AS2=$[-1*$d]
	    GOED1$n=$AS1,$AS2
    	    GOED1$n=!nospace $(GOED1$n)
	!endif
    !endif
    goed$n=$vertikalen x=$AS1 $en x=$AS2
    aantal_Vasymptoten=2
    aantal_Hasymptoten=0
    XRANGE=-10,10
    YRANGE=-20,20
    XSCHAAL=2
    YSCHAAL=4
    asymplijn=dvline $AS1,0,green\
    dvline $AS2,0,green

    !readproc nivo/plaatje.proc
    !exit
!endif
