enforce real solutions



What is the family of equations you are solving?  If they are all of some
common generic form (with parameters), perhaps you could solve them
generically, and write a simple program to solve specific cases in the form
you prefer.  Your example is really just x*(quadratic), which makes the
problem extremely simple.

          -s

On Fri, Apr 27, 2012 at 06:16, Wilhelm Haager
<wilhelm.haager at htlstp.ac.at>wrote:

> Hi!
>
> Solving the equation
>
> solve(a*x**3+x*(1-x**2)=0,x);
>
> gives imaginary results:
>
> [x = -%i/sqrt(a-1),x = %i/sqrt(a-1),x = 0]
>
> I would like to have the results in the following form, i.e. real:
>
> [x = -1/sqrt(1-a),x = 1/sqrt(1-a),x = 0]
>
> assume(a<1) gives the desired result, but I require real solutions in
> automated calculations
> where I cannot make any assumptions in advance.
> Before the equation is solved, I cannot see what I have to assume.
>
> Is there a simple way (without subsequent maps and other tricky
> transformations) to enforce that?
> (algsys with realonly=true does not work in the desired way).
>
> Thanks in advance
> Wilhelm Haager
>
> ______________________________**_________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/**mailman/listinfo/maxima<http://www.math.utexas.edu/mailman/listinfo/maxima>;
>