#checkfile=exos/checkfile6.proc
checkfile=$checkdir/number.proc
arglist=x
# meaning the answer should be in the form 'x=123'

#var3=x
math=0
questiontype=0
image=0
!set n=$counter
!if $level =0
    R=$counter
!else
    R=$level
!endif        
exotitle=!record 19 of lang/remarks.$taal
#@ Vergelijkingen met Negatieve Exponenten
question$n=!record 62 of lang/remarks.$taal
#@ Los op:<br><small><em>bereken dus de waarden van x</em><br>noteer bij meerdere oplossingen iets als:<br><em>x</em>=1 en <em>x</em>=2/3 of zo...<br>en bij breuken graag het antwoord vereenvoudigen.</small>
!if $R=1
    # 1/a*x^-b = 1/c
    # 1/(a*x^b)=1/c
    # ax^b=c
    # x^b=c/a => x=(c/a)^(1/b)
    a=!randitem 2,3,4,5,6
    f=!randitem 2,3,4,5
    exp=$[-1*($counter+1)]
    b=$[-1*$exp]
    c=$[$f*$a]
    x=$f^(1/$b)
    xx=$f^{1/$b}
    formula$n=\frac{1}{$a} \cdot x^{$exp} = \frac{1}{$c}
    !if $[gcd($exp,2)]=2
    	#even
	answer$n=$x,-$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}}= \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx \vee -$xx
    !else
	#oneven
	answer$n=$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}} = \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx 
    !endif
 !exit
!endif 

!if $R=2
    # e/(e*a)*x^-b= 1/c => 1/a*x-b =1/c 
    e=!randitem 2,3,4,5
    a=!randitem 2,3,4,5,6
    f=!randitem 2,3,4,5
    exp=$[-1*($counter+1)]
    b=$[-1*$exp]
    c=$[$f*$a]
    x=$f^(1/$b)
    xx=$f^{1/$b}
    formula$n=\frac{$e}{$[$e*$a]} \cdot x^{$exp} = \frac{1}{$c}
    !if $[gcd($exp,2)]=2
    	#even
	answer$n=$x,-$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}}= \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx \vee -$xx
    !else
	#oneven
	answer$n=$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}} = \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx 
    !endif
    
 !exit
!endif 

!if $R>2
    # e/a*x^-b = e*e/c*e
    # 1/(a*x^b)=1/c
    # ax^b=c
    # x^b=c/a => x=(c/a)^(1/b)
    e=!randitem 2,3,4
    p=!randitem 1,2,3,4
    a=$[$e+$p]
    f=!randitem 2,3,4,5
    exp=$[-1*($counter+1)]
    b=$[-1*$exp]
    c=$[$f*$a]
    x=$f^(1/$b)
    xx=$f^{1/$b}
    formula$n=\frac{$e}{$a} \cdot x^{$exp} = \frac{$[$e*$e]}{$[$c*$e]}
    !if $[gcd($exp,2)]=2
    	#even
	answer$n=$x,-$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}}= \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx \vee -$xx
    !else
	#oneven
	answer$n=$x
	texanswer$n=\rightarrow \frac{1}{$a \cdot x^{$b}} = \frac{1}{$c} \rightarrow $a \cdot x^{$b} = $c \rightarrow x = \root $b \of{$f} = $xx 
    !endif
 !exit
!endif 

