# Why can't I solve a simple root equation?

I can do this simple root equation by hand rather quickly for x=3/2. but Sage just throws the equality back at me.
Of course I don't need it for simple algebra, but I'm wondering what makes it choke, and what that means for more complex solutions.

var('x')
solve((x-1)^.5-(2*x-3)^.5-(3*x-4)^.5==0,x)

ans:
[sqrt(x - 1) == sqrt(3*x - 4) + sqrt(2*x - 3)]

edit retag close merge delete

Sort by » oldest newest most voted I don't know what's hard about it (can't answer that part), but you can use some of the options that solve offers:

sage: solve((x-1)^.5-(2*x-3)^.5-(3*x-4)^.5==0,x,to_poly_solve=True)
[x == (3/2)]
sage: solve((x-1)^(1/2)-(2*x-3)^(1/2)-(3*x-4)^(1/2)==0,x,algorithm='sympy') # note the 1/2
[x == (3/2)]

more

1

Also:

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


Noten: when using symbolic-oriented math software, it is usually a deep error to use numerical approximations (0.5) when exact value (1/2) are available...

Similarly, replacing x^(1/2) by sqrt(x) (same number of characters to type) is more readable and may helpthe software.