# DHTML sleep sommetje
n=$counter
!if $rounding=-1
    rounding=0
    !read $remarkdir/rounding.$taal
!endif
javascript=js/exo16.js
mathview=0
questiontype=7
image=0
cols=30
XSIZE=800
rows=1
math=0
checkfile=exos/checkfile6.proc
!if $level=0
    R=$counter
!else
    R=$level
!endif
R=1
F=!randitem f,g,h,k,p,w
question$n=Bepaal het tekenverloop en de nulpunten in $m_RR van de afgeleiden <br>van de onderstaande functie <em>$F</em><br><em><small>sleep de plaatjes en invulveldjes naar de goede plek</small></em><p>

pm=!randitem +,-
mp=!randitem +,-
a=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
b=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
c=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
d=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
e=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16    
!if $b=$d
    b=$[$b+1]
!endif	

!if $R = 1  
    functie=$a*x^$b $pm $e
    formula$n=$F(x)\,\,=\,\, $a\cdot x^{$b} $pm $e
    !goto READY
!endif
!if $R = 2 	
    functie=$a*x^$b $pm $c*x $mp $e
    formula$n=$F(x)\,\,=\,\,  $a\cdot x^{$b} $pm $c\cdot x $mp $e
    !goto READY
!endif
!if $R = 3 
    functie=$a*x^$b $pm $c*x^$d 
    formula$n=$F(x)\,\,=\,\,  $a\cdot x^{$b} $pm $c\cdot x^{$d}
    !goto READY
!endif
!if $R > 3 
    functie=$a*x^$b $pm $c*x^$d $mp $e
    formula$n=$F(x)\,\,=\,\,  $a\cdot x^{$b} $pm $c\cdot x^{$d} $mp $e
!endif
:READY
    
tot=!exec maxima A:diff($functie ,x);\
solve(A=0,x);\
B:diff(A,x);\
solve(B=0,x)

diff1=!line 1 of $tot
solve1=!line 2 of $tot
diff2=!line 3 of $tot
solve2=!line 4 of $tot
!for p=1 to 2
    solve$p=!nospace $(solve$p)
    solve$p=!replace internal x= by $empty in $(solve$p)
    s$p=!itemcnt $(solve$p)
!next p

question$n=<ul><li><li>diff=$diff1<li>solve1=$solve1<li>diff2=$diff2<li> solve2=$solve2</ul>

plus=<img src="$module_dir/gifs/plus.gif" name="img1" height="58" width="58">
min=<img src="$module_dir/gifs/min.gif" name="img2" height="58" width="58">
nul=<img src="$module_dir/gifs/nul.gif" height="58" width="58">
#answer$n=$x1,+,x,+
#textanswer$n=<table bgcolor=lightblue nowrap><th bgcolor=white>$F(x)</th><th>$plus</th><th>$nul</th><th>$plus</th></table>
#texanswer$n=x \,\, \notin \,\, \Bf{R}

DHTML=$empty
invul=$empty
exotext=$empty
nulpunten=5
options=10
DHTML=!append item "img1" + COPY + $options  to $DHTML
DHTML=!append item "img2" + COPY + $options  to $DHTML
!for p=1 to $nulpunten
    m=$[$p+1]
    invul=!append line <td><div id="div$m" name="div$m" style="position:relative;height:60px;border:1px solid #ff0000"><br><em>x</em><sub><font size=-2>$p</font></sub>=<input size=3 name=reply$n value=$(reply$n)></div></td> to $invul
    DHTML=!append item "div$m" to $DHTML
!next p
options=$[$nulpunten+2]
DHTML=!append item "div0" + NO_DRAG  to $DHTML
DHTML=!append item "div1" + NO_DRAG  to $DHTML

dhtml=<script type="text/javascript">SET_DHTML( CURSOR_MOVE , $DHTML);</script>

exotext=<div align="center"><form name=myform>\
<p>\
<table border=1 bgcolor=lightblue>\
<th bgcolor=white><em>x</em></th>\
<th><table><td><img src=$module_dir/gifs/min_oneindig.gif></td>\
<td><div id="div1" name="div1" style="position:relative;height:60px;width:680px;background-color:lightblue">&nbsp;</td>\
<td><img src=$module_dir/gifs/plus_oneindig.gif></td>\
</table>\
</th><tr>\
<th bgcolor=white>$F(<em>x</em>)</th>\
<th>\
<table><td>&nbsp;</td>\
<td><div id="div0" name="div0" style="position:relative;height:60px;width:680px;background-color:lightblue"></td>\
<td>&nbsp;</td>\
</table>\
</th>\
</table>\
<p align=center><table border=1 cellpadding=10 bgcolor=mistyrose> <th>$plus</th><th>$min</th><th><table>$invul</table></th></table></p></form></div>\
<a onmouseover="return escape('<img src=$module_dir/gifs/help.exo9.jpg>')"><font color=blue><b>Hoe</b></font> vul ik een antwoord in?</a>

