Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve with sqrt seems less than powerful #14215

Open
kcrisman opened this issue Mar 3, 2013 · 2 comments
Open

solve with sqrt seems less than powerful #14215

kcrisman opened this issue Mar 3, 2013 · 2 comments

Comments

@kcrisman
Copy link
Member

kcrisman commented Mar 3, 2013

sage:  eq = x == sqrt(x)
sage: solve(eq,x)
[x == sqrt(x)]
sage: solve(eq,x,to_poly_solve=True)
[x == 0, x == 1]
sage:  eq = x^2 == sqrt(x)
sage: solve(eq,x,to_poly_solve=True)
[x == x^(1/4), x == 0]
sage:  eq = x^2 == -sqrt(x)
sage: solve(eq,x,to_poly_solve=True)
[x == sqrt(-sqrt(x)), x == 1/2*I*sqrt(3) - 1/2, x == 0, x == -1/2*I*sqrt(3) - 1/2]
sage:  eq = a*x**2 == -sqrt(x)
sage: solve(eq,x,to_poly_solve=True)
[x == -sqrt(-sqrt(x)/a), x == sqrt(-sqrt(x)/a)]

This is a simplification of an example a user posted on the Sage Facebook page.

Component: symbolics

Issue created by migration from https://trac.sagemath.org/ticket/14215

@kcrisman kcrisman added this to the sage-5.11 milestone Mar 3, 2013
@kcrisman
Copy link
Member Author

kcrisman commented Mar 3, 2013

comment:1

This seems to be a general weakness in Maxima's solve; if someone wants to change this to a bug and not an enhancement, be my guest.

@kcrisman
Copy link
Member Author

kcrisman commented Mar 3, 2013

comment:2

The suggestion was made there that Sympy might be better at this. Is it? At least here it is giving answers - I don't think any are erroneous or missing, but I didn't check very hard, either.

sage: from sympy import solve as ssolve
sage: ssolve(x-sqrt(x),x)
[1, 0]
sage: ssolve(x^2-sqrt(x),x)
[1, 0]
sage: ssolve(x^2+sqrt(x),x)
[-1/2 + 3**(1/2)*I/2, -1/2 - 3**(1/2)*I/2, 0]
sage: ssolve(a*x^2+sqrt(x),x)
[(-1/a)**(2/3),
 0,
 (-1/a)**(2/3)*(-1 - 3**(1/2)*I)/2,
 (-1/a)**(2/3)*(-1 + 3**(1/2)*I)/2]

Does anyone know whether sympy's solve capabilities is a strict superset of Maxima's? I assume not.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants