solve, without i



There are some *real *solutions which can only be expressed as radicals
with %i -- see casus
irreducibilis<http://en.wikipedia.org/wiki/Casus_irreducibilis>;
.

It is, however, possible to express all real solutions with trig
functions<http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method>;
and
no %i, but Maxima doesn't currently support this in 'solve'.

How many real solutions there are depends on the coefficients.

              -s

On Thu, Jan 10, 2013 at 3:19 PM, Barton Willis <willisb at unk.edu> wrote:

> To filter out the solutions that involve %i (Maxima's name for the
> imaginary unit), you can use sublist:
>
>  (%i1) sublist(solve(a=b+c/(1+r)+d/(1+r)^2+d/(1+r)^3,r), lambda([s],
> freeof(%i,s)));
>
>  (%o1)
> [r=(sqrt(d*((4*b-4*a)*d^2+(-c^2+(18*a-18*b)*c+27*b^2-54*a*b+27*a^2)*d+4*c^3))/(2*3^(3/2)*(b-a)^2)+(a*(9*c*d-54*b*d)-9*b*c*d+27*b^2*d+27*a^2*d+2*c^3)/(-54*b^3+162*a*b^2-162*a^2*b+54*a^3))^(1/3)+(-3*b*d+3*a*d+c^2)/((9*b^2-18*a*b+9*a^2)*(sqrt(d*((4*b-
> 4*a)*d^2+(-c^2+(18*a-18*b)*c+27*b^2-54*a*b+27*a^2)*d+4*c^3))/(2*3^(3/2)*(b-a)^2)+(a*(9*c*d-54*b*d)-9*b*c*d+27*b^2*d+27*a^2*d+2*c^3)/(-54*b^3+162*a*b^2-162*a^2*b+54*a^3))^(1/3))-(-c-3*b+3*a)/(3*(a-b))]
>
> Due to the noninteger powers, this solution isn't real for all real values
> of a, b, ... d; for example:
>
>    (%i2) subst([d=142,b=2,a=1,d=1,c=100],%)$
>
>    (%i3) float(rectform(%));
>    (%o3) [r=-0.965517436100967*%i-1.712963637631702]
>
>
> --Barton
>
> ________________________________________
> From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on
> behalf of Antonio Lapira [antoniolapira at yahoo.it]
> Sent: Thursday, January 10, 2013 12:22
> To: maxima at math.utexas.edu
> Subject: solve, without i
>
> a=b+c/(1+r)+d/(1+r)^2+d/(1+r)^3;
>
> solve([%], [r]);
>
> I'd like to know if it's possibile to show only expressions which don't
> contain i.
>
> thanks
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>