# optellen en aftrekken [type: ax^2/y + bx/c]
questiontype=7
javascript=js/exo1.js
image=0
XSIZE=650
embed=1
mathview=2
cols=20
rows=1
inputs=1
math=1
n=$counter
R=$level
!if $level=0
    R=$counter
!endif    
pm=!randitem +,-
mp=!randitem 1,-1
var1=1
#schrijf als 1 breuk
question$n=!record 9 of lang/remarks.$taal
#@Schrijf als &eacute;&eacute;n breuk,<br>en vereenvoudig zover mogelijk:
checkfile=exos/checkfile1.proc
x=!randitem x,a,b,c
y=!randitem y,d,f,m
varlist=$x,$y
wims_rawmath_variables=$varlist
exotext=!record 1 of lang/remarks.$taal
sometext=!record 3 of lang/remarks.$taal
textanswer$n=!record 10 of lang/remarks.$taal
exotext=<p><a onmouseover="return escape('$sometext')"> $exotext </a>


!if $R=1
    a=!randitem 2,3,4,5,6,7,8,9
    a=$[$mp*$a]
    b=!randitem 2,3,4,5
    d=!randitem 2,3,4
    c=$[$d*$b]
    formula$n=\frac{$a $x^{2}}{$y} $pm \frac{$b $x^{2}}{$c $x} \,\, \rightarrow \,\,
    answer$n=($[$d*$a]*$x^2 $pm $x*$y)/($d*$y)
    texanswer$n=\frac{$a $x^{2}}{$y} $pm \frac{$b $x^{2}}{$c $x}  =\frac{$a $x^{2}}{$y} $pm \frac{$x }{$d}=\frac{$d \cdot $a $x^{2}}{$d \cdot $y} $pm \frac{$y \cdot $x }{$y \cdot $d}=\frac{$[$d*$a] $x^{2} $pm $x $y}{$d $y}
    var1=($a*$x^2)/$y $pm ($b*$x)/$c
 !exit
!endif

!if $R=2
    a=!randitem 3,4,5,6,7,8,9
    b=!randitem 2,3,4,5
    d=!randitem 2,3,4
    c=$[$d*$b]
    c=$[$mp*$c]
    e=$[$c/$b]
    f=!randitem 3,4,5
    g=$[$a-1]
    formula$n=\frac{$c $x}{$b $y} $pm \frac{$a $x^{$f}}{$g $x} \,\, \rightarrow \,\,
    answer$n=($[$g*$e]*$x $pm $a*$x^$[$f-1]*$y)/($g*$y)
    texanswer$n=\frac{$c $x}{$b $y} $pm \frac{$a $x^{$f}}{$g $x} =\frac{$e $x}{$y} $pm \frac{$a $x^{$[$f-1]}}{$g}=\frac{$g \cdot $e $x}{$g \cdot $y} $pm \frac{$y \cdot $a $x^{$[$f-1]}}{$y \cdot $g}=\frac{$[$e*$g] $x $pm $a $x^{$[$f-1]} $y}{$g $y}
    var1=($c*$x)/($b*$y) $pm ($a*$x^$f)/($g*$x)
 !exit
!endif

!if $R>2
    a=!randitem 3,4,5,6,7,8,9
    b=!randitem 2,3,4,5
    d=!randitem 2,3,4
    c=$[$d*$b]
    e=!randitem 1,2,3
    f=!randitem 5,6,7,8
    g=$[$f-$e]
    !if $e=1
        formula$n=\frac{$y}{$x} $pm \frac{$c $x $y}{$b $y^{$f}} \,\, \rightarrow \,\,
	var1=($y)/($x) $pm ($c*$x*$y)/($b*$y^$f)
    !else
        formula$n=\frac{$y}{$x} $pm \frac{$c $x $y^{$e}}{$b $y^{$f}} \,\, \rightarrow \,\,
	var1=($y)/($x) $pm ($c*$x*$y^$e)/($b*$y^$f)
    !endif
    answer$n=($y^$[$g+1] $pm $d*$x^2)/($x*$y^$g)
    texanswer$n=\frac{$y}{$x} $pm \frac{$d $x}{$y^{$g}}=\frac{$y^{$g} \cdot $y}{$y^{$g} \cdot $x} $pm \frac{$x \cdot $d $x}{$x \cdot $y^{$g}}=\frac{$y^{$[$g+1]} $pm $d $x^{2}}{$x $y^{$g}}
 !exit
!endif
