Ask Your Question
1

Why can't I solve a simple root equation?

asked 2020-08-16 09:15:50 +0100

cybervigilante gravatar image
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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-08-16 11:18:19 +0100

rburing gravatar image

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)]
edit flag offensive delete link more

Comments

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.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2020-08-17 00:35:37 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-08-16 09:15:50 +0100

Seen: 294 times

Last updated: Aug 16 '20