I think sage solving is based on maxima, and I've noticed that Maxima has 
always had this problem with non-linear equations.

If you set it up as follows:

eq = x == sqrt(1 + x)
solns = solve(eq^2,x); solns

You will get:
[x == -1/2*sqrt(5) + 1/2, x == 1/2*sqrt(5) + 1/2]

Of course, then you have to do the following:

for i in solns:
    n(eq.subs(i).lhs()) == n(eq.subs(i).rhs())

Which returns:
    False
    True

With a bit of playing around, you could turn this into a lambda and a filter 
to return the correct solutions. (I'm sure people on this group can take 
this approach and give you something more elegant.)

I tend to think of these situations as, the CAS isn't there to do the entire 
job for you, but rather support you but doing the basic heavy lifting for 
you.
In circumstances like this, you have to guide the CAS to the correct 
solution.

Joal Heagney

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to