n=$counter
!if $level=0
    R=$counter
!else
    R=$level
!endif
math=0
!if $rounding<10
    rounding=0
    !readproc $remarkdir/rounding.$taal
!endif
cols=10
rows=5
checkfile=$checkdir/number.proc
arglist=x
varlist=$empty

text=!record 7 of lang/remarks.$taal
#@ Bepaal de nulpunten,de beide nulpunten zijn,en,het ene nulpunt is
question$n=!item 1 of $text
beide=!item 2 of $text
en=!item 3 of $text
ene=!item 4 of $text

#functie=(Cx -A)(x+B)= Cx^2 +xCB -xA -AB = Cx^2 +x(CB-A) -AB
#a= C
#b= CB-A
#c= AB

F=!randitem f,g,h,k,p,w

!if $R = 1
    A=!randitem 1,2,3,-1,-2,-3
    B=!randitem 1,2,3,-1,-2,-3
    C=!randitem 1,-1
!endif
!if $R = 2
    A=!randitem 4,5,6,7,8,-1,-2,-3
    B=!randitem 1,2,3,-4,-5,-6,-7,-8
    C=!randitem 1,-1
!endif
!if $R = 3
    A=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    B=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    C=!randitem -2,-3,-4,2,3,4
!endif
!if $R >3
    A=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    B=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    C=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
!endif
a=$C
b=$[$C*$B - $A]
c=$[$A*$B]
functie=(($C)*x - ($A))*(x + ($B))
x1=($A)/($C)
x2=$[-1*($B)]
#betekend er zijn gewoon altijd nulpunten
#extra$n=1
var1=1
tot=!exec pari F=$functie\
$x1\
printtex(F)\
printtex($x1)

keuze=!randitem 1,0
formula$n=!line 3 of $tot
!if $keuze=1
    formula$n=$F\left( x \right)=$(formula$n)
!else
    formula$n=y\,\,= $(formula$n)
!endif
x1=!line 2 of $tot
X1tex=!line 4 of $tot
X2tex=$x2

!if $x1 != $x2
    texanswer$n=  \left[ \begin{array}{l}x_{1}= $X1tex \\ \\ x_{2}= $X2tex\end{array}\right.
    answer$n=$x1,$x2
    punten=$x1,0,$x2,0
    textanswer$n=$beide x1=$x1 $en x2=$x2  
!else
    texanswer$n= x = $X1tex
    answer$n=$x1
    punten=$x1,0,$x1,0
    textanswer$n=$ene x=$x1  
!endif 


!if $image=1 or $teaching=1
    XSIZE=150
    YSIZE=150
    plaatje=\
    transparent white\
    xrange -10,10\
    yrange -100,100\
    vline 0,0,blue\
    hline 0,0,blue\
    linewidth 2\
    dvline $S,0,red\
    curve green,$functie\
    linewidth 6\
    points red,$punten
    
    !if $printexo=1
	draw=1
	plot=0
	image$n=$plaatje
    !else
	insdraw_size=150,150
	!insdraw $plaatje
	helptext=!record 11 of lang/remarks.$taal
	#@Hier</a> staat een klein grafiekje van de functie
	#helptext=<a href="javascript:showimage();">$helptext
	helptext=<a onmouseover="this.T_OPACITY=85;this.T_PADDING=10;this.T_WIDTH=$XSIZE;this.T_BORDERCOLOR='gold';this.T_BORDERWIDTH=1;return escape('<img src= $wims_ref_name?&session=$session&module=$module&cmd=getins&special_parm=insert-1.gif>')"><font color=blue>$helptext</font>
	#helptext=<a onmouseover="return escape('<img src= $wims_ref_name?&session=$session&module=$module&cmd=getins&special_parm=insert-1.gif>')"><font color=blue>$helptext</font>
    !endif
!endif
