# inverse logaritmisch
checkfile=exos/checkfile1.proc
n=$counter
!if $level=0
    R=$counter
!else
    R=$level
!endif
questiontype=0
plot=0
draw=0
math=1
arglist=f^-1(x),y
helptext=!record 42 of lang/remarks.$taal
question$n=!record 40 of lang/remarks.$taal

!if $R=1
    a=!randitem 1,2,3,4,5,6,7,8,9,10
    g=!randitem 2,3,4,5,6,7
    pm=!randitem -,+
    !if $pm=+
	mp=-
    !else
	mp=
    !endif
    min=$[-1*(abs($a))-10]
    max=$[abs($a)+10]
    range=[$min:$max] [$min:$max]
	
    formula$n=f(x) \, =  \,^{$g} \log \left( x $pm $a \right)
    var2=log(x $pm $a)/log($g)
    answer$n=$mp $a + $g^x
    var1=0
    texanswer$n=\left[ \begin{array}{l} x_{inv}=^{$g} \log \left( y_{inv} $pm $a \right) \\ y_{inv} $pm $a = $g^{x_{inv}} \\ y_{inv} = $mp $a + $g^{x_{inv}} \\ f^{-1}(x)=$mp $a + $g^{x}  \end{array}
!endif

!if $R>1
    a=!randitem 1,2,3,4,5,6,7,8,9,10
    g=!randitem 2,3,4,5,6,7
    b=!randitem 1,2,3,4,5,6,7,8,9
    min=$[-1*(abs($a))-10]
    max=$[abs($a)+10]
    range=[$min:$max] [$min:$max]
	
    formula$n=f(x) \, = $b + \,^{$g} \log \left( x - $a \right)
    var2=$b + log(x - $a)/log($g)
    answer$n=$a + $g^(x-$b)
    var1=1
    # maxima moet check overnemen ipv pari
    texanswer$n=\left[ \begin{array}{l} x_{inv}=$b + ^{$g} \log \left( y_{inv} - $a \right) \\ x_{inv} - $b =  ^{$g} \log \left( y_{inv} - $a \right) \\ y_{inv} - $a = $g^{ x_{inv} - $b} \\ y_{inv}  = $a + $g^{ x_{inv} - $b} \\ f^{-1}(x)  = $a + $g^{ x - $b} \end{array}    
!endif

!if $teaching=1
    exotext=!record 41 of lang/remarks.$taal

    insplot_set=size 0.6,0.6 ;grid ;xlabel "<x-axis>";ylabel"<y-axis>" ;border 
    !insplot $range $var2 notitle, $(answer$n) notitle, x 
    exotext=<a onmouseover="return escape('<img src=$wims_ref_name?&session=$session&module=$module&cmd=getins&special_parm=insert-1.gif>')">$exotext
!else
    exotext=$empty
!endif
