# [Maxima] Solving an equation

Stavros Macrakis macrakis at alum.mit.edu
Tue Jun 26 06:25:58 CDT 2007

On 6/26/07, Dudley, Jeremy <jeremy.dudley at wrcplc.co.uk> wrote:
>
> But after applying solve() I have...So all that would be needed would be
> to divide both sides by A^(17/25) and then extract a root.
>
> I can get to this by doing the following:
>
> (%i4) %o3 / A ^ (17/25)
> (%i5) %o4 ^ (25/8)
>
> What prevented the solve() routine from recognising the last two steps?
>

Solve doesn't solve equations with fractional powers because the usual
methods like taking both sides to a power can produce spurious roots, and
solve has no way of eliminating them. Even solve(x=sqrt(x),x) doesn't give a

If you're willing to deal with the spurious roots on your own, you can use
the topoly routine:

topoly(x=q*x^(17/25))  =>   x*(x^8-q^25) = 0
solve(%,x) => [x = (sqrt(2)*%i+sqrt(2))*q^(25/8)/2,x = %i*q^(25/8),x =
(sqrt(2)*%i-sqrt(2))*q^(2\
5/8)/2,x = -q^(25/8),x = -(sqrt(2)*%i+sqrt(2))*q^(25/8)/2,x = -%i*q^(25/8),x
= -(sqrt(2)*\
%i-sqrt(2))*q^(25/8)/2,x = q^(25/8),x = 0]

You'll see that solve finds the complex roots which you're apparently not
interested in. I don't believe solve can be told that you're only interested
in real roots.

Topoly also deals with floating exponents by rationalizing them:

topoly(x=q*x^.68) => <same thing>

As a matter of user-friendliness, we might want to have solve use topoly by
default in cases like this. But then the question becomes how to notify the
user (which may be a program) that there may be spurious results. A warning
message is not useful to programs.  A switch controlling this behavior adds
one more level of complexity to the user interface....

-s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20070626/b71e2270/attachment-0001.htm