On 13 Oct 2013 06:19:46 Joerg Rauh wrote:
> Dear Maxima Supporter,
> out of wxMaxima 12.04.0 I had Maxima solve for x:
> ((40-3*x)*(20-2*x)*x)/2-500
> Here are the results:
>
[x=(-(sqrt(3)*%i)/2-1/2)*((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3)+(1300*((sqrt(3)*%i)/2-1/2))/(81*((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3))+70/9,
>
x=((sqrt(3)*%i)/2-1/2)*((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3)+(1300*(-(sqrt(3)*%i)/2-1/2))/(81*((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3))+70/9,
>
x=((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3)+1300/(81*((250*sqrt(101)*%i)/3^(7/2)+25750/729)^(1/3))
> It missed the real results: x=1.7407 and x=6.23415, which I found here:
http://www.wolframalpha.com/input/?i=solve%28%28%2840-3*x%
29%2F2%29*%2820-2*x%29*x-500%2Cx%29
> Is there anything I can do differently to make it find the real
solutions?
> Thank you and kind regards
> Joerg
Example. Find real exact solutions of equation:
(%i1) eq:((40-3*x)*(20-2*x)*x)/2-500=0 $
I define function "solvet":
(%i2) solvet(eq,x):=block([spr,k,maperror,mapprint],
/* Copyright (C) 2013 Aleksas Domarkas */
maperror:false, mapprint:false,
spr:solve(eq,x), rectform(%%),
if freeof(sin,%%) then return(sort(%%)) else
makelist(x=map(polarform,rhs(spr[k])),k,1,length(spr)),
rectform(%%),
trigsimp(%%),
sort(%%))$
(%i3) solvet(eq,x);
(%o3)
[x=(20*sqrt(13)*cos(atan((3^(5/2)*sqrt(101))/103)/3)+70)/9,
x=(20*sqrt(13)*cos((atan((3^(5/2)*sqrt(101))/103)-2*%pi)/3)+70)/9,
x=(20*sqrt(13)*cos((atan((3^(5/2)*sqrt(101))/103)+2*%pi)/3)+70)/9]
(%i4) float(%), numer;
(%o4) [x=15.3584874666829,x=6.234149131052292,x=1.740696735598144]
(%i5) sort(%);
(%o5) [x=1.740696735598144,x=6.234149131052292,x=15.3584874666829]
(%i6) allroots(eq); /* for test */
(%o6) [x=1.740696735598142,x=6.234149131052291,x=15.3584874666829]
Maple and Mathematica do not solve this problem( find real exact
solutions).
best
Aleksas D