Declarations



Solve generally ignores declarations, except insofar as it might call 
some other program like simplification, that uses them.

You will have to filter out the real solutions some other way.

Designing another version of solve that considers assumptions and 
declaration might be worthwhile.

RJF

On 1/22/2012 5:59 AM, Gerd Kortemeyer wrote:
> Hi,
>
> We have been using MAXIMA successfully inside of LON-CAPA for homework problems for several years now - it's a great tool, thanks everybody!!!
>
> While authoring a new kind of homework, I am struggling with "declare" - why does the following (sample) code not give the expected results?
>
> (%i4) declare(x,real);
> (%o4)                                done
> (%i5) solve(x^3=125,x);
>                    5 sqrt(3) %i - 5        5 sqrt(3) %i + 5
> (%o5)        [x = ----------------, x = - ----------------, x = 5]
>                           2                       2
> (%i6) facts();
> (%o6)                           [kind(x, real)]
>
> Is there another way to tell "solve" to stay in the real realm?
>
> Thanks!
>
> - Gerd.
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima