bewerking=bewerking1.proc

!if $taal=nl
    nivo_title=Bepaal met de discriminant of er nulpunten zijn
    geen_nulpunten=er zijn dus geen nulpunten
    twee_nulpunten=dus twee nulpunten
    een_nulpunt=er is nu slechts &eacute;&eacute;n nulpunt

!else
    nivo_title=Use the "Discriminant"
    geen_nulpunten=there are no interection points with the x_axis
    twee_nulpunten=thus two intersection points with the x_axis
    een_nulpunt=so there is just one intersection point with the x_axis
!endif
R=$graad
    !for n=1 to $aantal_sommen
	!if $graad = 0
	    R=$n
	!endif    
	a=!randitem 2,3,4,5,6,7,8,9,10
	b=!randitem 0,1,2,3,4,5,6,7,8,9,10    
	c=!randitem 0,1,2,3,4,5,6,7,8,9,10
	A=!randitem -1,1
	B=!randitem -1,1
	C=!randitem -1,1
	a=$[$A*$a]
	b=$[$B*$b]
	c=$[$C*$c]
	
	!if $R = 1 
	    functie=($a)*x^2 + ($c)
	    D=-4*$a*$c
	    DD= \begin{bf}D\,\,=\,\,\end{bf} -4\cdot $a \cdot $c
	!endif
	!if $R = 2 
	    functie=($a)*x^2 + ($b)*x
	    D=$b*$b 
	    DD= \begin{bf}D\,\,=\,\,\end{bf} ($b)^{2} - 4\cdot $a \cdot 0
	!endif
	!if $R >2
	    functie=($a)*x^2 + ($b)*x + $c 
	    D=$b*$b - 4*$a*$c
	    DD= \begin{bf}D\,\,=\,\,\end{bf} ($b)^{2} - 4\cdot $a \cdot $c
	!endif
	sommen=!append line $functie to $sommen 
	sommen=!append line printtex($functie) to $sommen 
	!if $[$D] > 0
	    !if $a>0
		thumbnail$n=dal2.gif
	    !else
		thumbnail$n=berg2.gif	
	    !endif
	    GOED$n=2
	    Goed$n=$twee_nulpunten
	    goed$n= $DD = $[$D] 
	!else
	    !if $[$D] < 0
		!if $a>0
		    thumbnail$n=dal0.gif
		!else
		    thumbnail$n=berg0.gif	
		!endif
		GOED$n=0
		Goed$n=$geen_nulpunten
		goed$n= $DD = $[$D] 
	    !else
	    	!if $a>0
		    thumbnail$n=dal1.gif
		!else
		    thumbnail$n=berg1.gif	
		!endif
		GOED$n=1
		Goed$n=$een_nulpunt
		goed$n= $DD = $[$D] 
	    !endif
	!endif        		    
    !next n        
    SOMMEN=!exec pari $sommen
    r=1
    FF=!shuffle f,g,h,k,p,w
    !for n=1 to $aantal_sommen
	keuze=!randitem 1,2
	functie$n=!line $r of $SOMMEN
	som$n=!line $[$r+1] of $SOMMEN
	!if $keuze=1
	    F=!item $n of $FF
	    som$n=$F\left( x \right)\,\,\,=\,\,\, $(som$n)
	!else
	    som$n=y\,\,\,=\,\,\, $(som$n)	
	!endif
	r=$[$r+2]
    !next n
