!set title=Upper-bound the square III
!if $wims_read_parm!=$empty
 !goto $wims_read_parm
!endif
oef2wims_version=3.22
author=Gang Xiao
email=xiao@unice.fr
language=en

varcnt=18
prevarcnt=12
postvarcnt=5
replycnt=0
choicecnt=0
conditioncnt=1
feedbackcnt=0
format=html

val1=$imagedir

!if $testcondition=yes
 !goto test
!endif
!if $status=waiting
 !exit
!endif

m_options=nofloat
m_methods=ineq/addterm, ineq/mulexp, ineq/exsides,	ineq/trans, ineq/constineq, ineq/addineq, ineq/mulineq,	ineq/sqrpos
m_minsteps=2
tmp0=!randitem a,b,c,d,r,s,t,x,y,z

val2=$(tmp0)
tmp0=!randint 10, 50

val3=$[rint($(tmp0))]
tmp0=!randint 10, 50

val4=$[rint($(tmp0))]
tmp0=!randint 1, 20

tmp1=!randitem -1,1

val5=$[rint($(tmp0)*$(tmp1))]
val6=$[rint(max($val3-($val5),$val4+($val5)))]
val7=$[rint($val6^2)]
val8=!rawmath $val2+$val5
tmp0=!randitem ,=

val9=$(tmp0)
val10=<$val9
val11=>$val9
val12=$val2 $val11 -$val3
val13=$val2 $val10 $val4
m_context=$val12	$val13	
question=__EXECUTED_1692754_EXERCISE__

!goto stat

!exit

:question
$()Find the best upper bound for 
!insmath ($val8)^2
$(), when	<p><center>	
!insmath -$val3 $val10 $val2 $val10 $val4
$() .	</center>	
$()
!exit

:hint
$()
$()
!exit

:help
$()
$()
!exit

:solution
$()
$()
!exit

:postdef
val14=
tmp0=!translate internal <=> to , ; in $m_newobject

val15=$(tmp0)
!if ; notin $val15 and , isin $val15 
tmp0=!item 1 of $val15

val12=$(tmp0)
tmp0=!item 2 of $val15

val13=$(tmp0)
t_=!replace internal \( by ( in Simplify(($val8)^2 - ($val12))
tmp0=!exec yacas $t_

val14=$(tmp0)
!endif

!exit

:feedback

!exit

:test

!ifval $val14 issametext 0 and $val13 = $val7
 condtest1=1
!else
 condtest1=0
!endif
condname1=

!exit

:stat
vsavelist=2,3,4,7,8,10,12,13
embedcnt=0
