Opened 9 years ago

# solve with sqrt seems less than powerful

Reported by: Owned by: kcrisman burcin major sage-6.4 symbolics N/A

### Description

```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.

### comment:1 Changed 9 years ago by kcrisman

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.

### comment:2 Changed 9 years ago by kcrisman

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.

### comment:3 Changed 8 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:4 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:5 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:6 Changed 7 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.