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


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

!if $R=2
    a=!randitem 1,2,3,4,5,6,7,8,9
    a=$[$mp*$a]
    b=!randitem 2,3,4,5,6,7,8,9
    !if $[$a $pm $b]=0
	b=$[$b+1]
    !endif
    c=!randitem 1,2,3,4,5
    !if ($pm=- and $ppm=-) or ($pm=+ and $ppm=+) 
	pmm=+	
    !else
	pmm=-
    !endif
    formula$n=\frac{$a}{$x $ppm $c} $pm \frac{$b}{$x} \,\, \rightarrow \,\,
    answer$n=($[$a $pm $b]*$x $pmm $[$b*$c])/($x*($x $ppm $c))
    texanswer$n=\left[ \begin{array}{lllll}\frac{$a}{$x $ppm $c} $pm \frac{$b}{$x}  = \frac{$x \cdot $a}{$x \cdot ($x $ppm $c)} $pm \frac{($x $ppm $c)  \cdot $b}{($x $ppm $c) \cdot $x}= \\ \\  \frac{$a $x}{$x ($x $ppm $c)} $pm \frac{$b $x $ppm $[$b*$c]}{$x ($x $ppm $c)}= \\ \\  \frac{$a $x $pm $b $x $pmm $[$b*$c]}{$x ($x $ppm $c)}= \frac{$[$a $pm $b] $x $pmm $[$b*$c]}{$x ($x $ppm $c)} \end{array}
    var1=$a/($x $ppm $c) $pm $b/$x
 !exit
!endif

!if $R>2
    mp=!randitem -1,1
    a=!randitem 2,3,4,5
    b=!randitem 6,7,8,9,10
    c=!randitem 2,3,4,5,6,7,8,9
    !if $pm=+
	pmm=-
	d=$[$b-$a]
    !else
	pmm=+
	d=$[$a+$b]
    !endif
    keuze=!randitem 0,1
    !if $keuze=0
        formula$n=\frac{$a $x}{$x + $c} $pm \frac{$b}{$x - 1} \,\, \rightarrow \,\,
        answer$n=($a*$x^2 $pm $d*$x $pm $[$b*$c])/(($x -1)*($x + $c))
        texanswer$n=\left[ \begin{array}{lllll} \frac{$a $x}{$x + $c} $pm \frac{$b}{$x - 1} =\frac{($x - 1) \cdot $a $x}{($x - 1) \cdot ($x + $c)} $pm \frac{($x + $c)  \cdot $b}{($x + $c) \cdot ($x -1)}= \\ \frac{$a $x^{2} - $a $x}{($x - 1) ($x + $c)} $pm \frac{$b $x + $[$b*$c]}{($x - 1) ($x + $c)} = \\ \frac{$a $x^{2} $pm $d $x $pm $[$b*$c]}{($x - 1) ($x + $c)} \end{array}
	var1=($a*$x)/($x + $c) $pm $b/($x-1)
    !else
        formula$n=\frac{$a $x}{$x - $c} $pm \frac{$b}{$x - 1} \,\, \rightarrow \,\,
        answer$n=($a*$x^2 $pm $d*$x $pmm $[$b*$c])/(($x -1)*($x - $c))
        texanswer$n=\left[ \begin{array}{lllll} \frac{$a $x}{$x - $c} $pm \frac{$b}{$x - 1}=\frac{($x - 1) \cdot $a $x}{($x - 1) \cdot ($x - $c)} $pm \frac{($x - $c)  \cdot $b}{($x - $c) \cdot ($x -1)}= \\  \\ \frac{$a $x^{2} - $a $x}{($x - 1) ($x - $c)} $pm \frac{$b $x - $[$b*$c]}{($x - 1) ($x - $c)}= \\  \\ \frac{$a $x^{2} $pm $d $x $pmm $[$b*$c]}{($x - 1) ($x - $c)} \end{array}
        var1=($a*$x)/($x - $c) $pm $b/($x-1)
    !endif
 !exit
!endif
