n=$counter
!if $level=0
    R=$counter
!else
    R=$level
!endif
cols=10
rows=5
!if $rounding<10
    rounding=0
    !readproc $remarkdir/rounding.$taal
!endif
checkfile=$checkdir/coord.proc
exotext=!record 20 of lang/remarks.$taal
exotext=<small>$exotext</small>
text=!record 8 of lang/remarks.$taal
#@ Bepaal de co&ouml;rdinaten van de nulpunten, de beide snijpunten met de x_as zijn,en, het ene snijpunt met de x_as 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

de_top=!randitem 0,0,0,0,0,0,0,0,0,0,1
!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 -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
!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
    R1=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    R2=!randitem -1,-2,-3,-4,-5,-6,-7,-8,1,2,3,4,5,6,7,8
    A=$A/$R1
    B=$B/$R2
!endif
a=$C
b=$[$C*$B - $A]
c=$[$A*$B]
functie=(($C)*x - ($A))*(x + ($B))
x1=($A)/($C)
x2=-1*($B)
tot=!exec pari F=$functie\
x1=$x1\
x2=$x2\
y1=subst(F,x,x1)\
y2=subst(F,x,x2)\
printtex(F)\
printtex(x1)\
printtex(x2)\
printtex(y1)\
printtex(y2)

x1=!line 2 of $tot
x2=!line 3 of $tot
y1=!line 4 of $tot
y2=!line 5 of $tot
formula$n=!line 6 of $tot
Xtex1=!line 7 of $tot
Xtex2=!line 8 of $tot
Ytex1=!line 9 of $tot
Ytex2=!line 10 of $tot
!if $x1 != $x2
    answer$n=$x1,$y1,$x2,$y2
    texanswer$n=  \left[ \begin{array}{l} \left( $Xtex1 : $Ytex1 \right) \\ \left( $Xtex2 : $Ytex2 \right)\end{array}\right.
    textanswer$n=$beide  ($x1:$y1) $en ($x2:$y2)  
    punten=points red,$x1,$y1,$x2,$y2

!else
    answer$n=$x1,$y1
    texanswer$n= \left( $Xtex1 : $Ytex1 \right)  
    textanswer$n=$ene ($x1:$y1)      
    punten=point $x1,$y1,red
!endif
keuze=!randitem 1,0
!if $keuze=1
    F=!randitem f,g,h,k,p,w
    formula$n=$F\left( x \right)=$(formula$n)
!else
    formula$n=y \,\, = $(formula$n)
!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\
    $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
