Page 1 sur 1

### csolve et approx

Publié : ven. janv. 15, 2016 9:09 am
Un petit soucis lorsqu'il y a des melanges:

Code : Tout sélectionner

``````16>> E:=2.65113630891*u^2/2+0.331392038614+0.662784077229*u^4/2-0.945518575599*u^4*sqrt(3)/2+0.818843106219-0.337215922771*u^4/2+1.34886369109*u^2/2+1.34886369109*u^2-0.168607961386+u^4*0.325568154457+4*u^2*0.325568154457+0.325568154457
2.65113630891*u^2/2+0.331392038614+0.662784077229*u^4/2-0.945518575599*u^4*sqrt(3)/2+0.818843106219-0.337215922771*u^4/2+1.34886369109*u^2/2+1.34886369109*u^2-0.168607961386+u^4*0.325568154457+4*u^2*0.325568154457+0.325568154457
// Time 0
17>> csolve(E,u)
Attention, l'argument n'est pas une équation, on résout 2.65113630891*u^2/2+0.331392038614+0.662784077229*u^4/2-0.945518575599*u^4*sqrt(3)/2+0.818843106219-0.337215922771*u^4/2+1.34886369109*u^2/2+1.34886369109*u^2-0.168607961386+u^4*0.325568154457+4*u^2*0.325568154457+0.325568154457=0
Solving by bisection with change of variable x=tan(t) and t=-1.57..1.57. Try fsolve(equation,x=guess) for iterative solver or fsolve(equation,x=xmin..xmax) for bisection.
list[-3.78801634603,3.78801634603]
// Time 0.02
18>> csolve(approx(E),u)
Attention, l'argument n'est pas une équation, on résout 2.65113630891*u^2*0.5+0.331392038614+0.662784077229*u^4*0.5-0.945518575599*u^4*1.73205080757*0.5+0.818843106219-0.337215922771*u^4*0.5+1.34886369109*u^2*0.5+1.34886369109*u^2-0.168607961386+u^4*0.325568154457+4.0*u^2*0.325568154457+0.325568154457=0
list[3.78801634603,-3.78801634603,0.525023405425*i,-0.525023405425*i]
``````

### Re: csolve et approx

Publié : ven. janv. 15, 2016 4:40 pm
Vu! Facile a corriger...