bewerking=bewerking3.proc
!if $taal=nl
    nivo_title=Bepaal <em>alle</em> asymptoten
    vertikaal=De verticale asymptoot is: de lijn
    horizontaal=de horizontale asymptoot is de lijn
    vertikalen=De verticale asymptoten zijn de lijnen
    en=en  
    hint=<small>schijf meerdere asymptoten op als:<br> <em>x=4 en x=-4 </em>of<em> y=-2 & y=sqrt(3)</em></small>
!else
    nivo_title=Determine <em>all</em> asymptotes
    vertikaal=The vertical asymptote is the line 
    horizontaal=the horizontal asymptote is the line
    vertikalen=The vertical asymptotes are the lines  
    en=and
    hint=<small>write your answers like<br><em>x</em>=15 and <em>x</em>=-1 <br> and <br><em>y</em>=sqrt(2)</small> 
!endif
n=$teller
!if $graad=0
    R=$teller
!else
    R=$graad
!endif   
# horizontaal = GOED1
# vertikaal   = GOED2 
!if $R=1
    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,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    f$n=$a/(x-$b)
    F$n=\frac{$a}{\left(x - $b\right)}
    GOED2$n=$b
    GOED1$n=0
    AS1=$b
    GOED2$n=!nospace $(GOED2$n)
    goed$n=$vertikaal <em> x=$b</em><br> $en $horizontaal <em>y=0</em>
    aantal_Vasymptoten=1
    aantal_Hasymptoten=1
    
    XRANGE=-20,20
    YRANGE=-20,20
    XSCHAAL=4
    YSCHAAL=4
    asymplijn=dvline $AS1,0,green\
    dhline 0,0,green

    !readproc nivo/plaatje.proc
 !exit
!endif
!if $R=2	
    keuze=!randitem 1,2
    !if $keuze=1
	##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,2,3,4,5,6,7,8,9,10,11,12,13,14,15
        b=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
        c=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15
        d=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    !else
        a=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
        b=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
        c=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
        d=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    !endif
    f$n=($a*x+$b)/($c*x-$d)
    F$n=\frac{$a\cdot x +$b}{$c \cdot x - $d}
    tussen=!exec pari $a/$c \
    $d/$c
    
    GOED1$n=!line 1 of $tussen
    GOED2$n=!line 2 of $tussen
    goed$n=$vertikaal x=$(GOED2$n) <br>\
    $horizontaal y=$(GOED1$n)
    aantal_Hasymptoten=1
    aantal_Vasymptoten=1
    
    XRANGE=-20,20
    YRANGE=-20,20
    XSCHAAL=4
    YSCHAAL=4
    asymplijn=dvline $[$(GOED2$n)],0,green\
    dhline 0,$[$(GOED1$n)],green

    !readproc nivo/plaatje.proc
 !exit
!endif
!if $R=3
    ##algemene vergelijking hyperbool:##f(x)=a/(x*(x-b)*(x-c))
    ##verticale asymptoot:x=b of x=c of x=0
    a=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    b=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    c=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15
    d=!randitem 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
    
    f$n=($a*x^2+$b)/($c*x^2-$d)
    F$n=\frac{$a\cdot x^2 +$b}{$c \cdot x^2 - $d}
    VAS1=sqrt($d/$c)
    VAS2=-1*sqrt($d/$c)
    !if . isin $[$VAS1]
	D=!exec pari $d/$c
	VAS1=sqrt($D)
	VAS2=-1*sqrt($D)
    !else
	VAS1=$[$VAS1]
	VAS2=$[-1*$VAS2]
    !endif	        
    GOED2$n=$VAS1,$VAS2
    GOED1$n=!exec pari $a/$c
    goed$n=$vertikalen x=$VAS1 $en x=$VAS2 <br>\
    $horizontaal y=$(GOED1$n) 
    aantal_Hasymptoten=1
    aantal_Vasymptoten=2
    
    XRANGE=-20,20
    YRANGE=-20,20
    XSCHAAL=4
    YSCHAAL=4
    asymplijn=dvline sqrt($d/$c),0,green\
    dvline -1*sqrt($d/$c),0,green\
    dhline 0,$a/$c,green

    !readproc nivo/plaatje.proc
 !exit    
!endif
!if $R>3
    ##algemene vergelijking hyperbool:##f(x)=a/(x*(x-b)*(x-c))
    ##verticale asymptoot:x=b of x=c of x=0
    a=!randitem -4,-3,-2,-1,1,2,3,4
    b=!randitem 1,2,3,4,5,6
    c=!randitem 1,2,3,4,5,6
    g=!randitem 0.5,1.5,2,2.5,3
    f=!exec pari (x+$b)*(x-$c) 
    f$n=$a*$g^(1/($f))
    F$n=$a\cdot $g^n \,\,met\,\,  n=\frac{1}{$f}  
    VAS1=$[-1*$b]
    VAS2=$c
    GOED2$n=$VAS1,$VAS2
    GOED1$n=$a
    goed$n=$vertikalen x=$VAS1 $en x=$VAS2<br>\
    $horizontaal <em>y=$a</em> 
    aantal_Vasymptoten=2
    aantal_Hasymptoten=1
    XRANGE=-8,8
    YRANGE=-10,10
    XSCHAAL=1
    YSCHAAL=2
    asymplijn=dvline $AS1,0,green\
    dvline $AS2,0,green\
    dhline 0,$a,green
    !readproc nivo/plaatje.proc
!endif    