Ask Your Question

Solving equation with sqrt

asked 2012-11-05 07:30:09 +0200

Jonas gravatar image

updated 2012-11-05 09:09:55 +0200

calc314 gravatar image


I'm trying to solve the following equation:

sage: var('a b c')
(a, b, c)
sage: a==b-sqrt(b**2-c**2/4)
a == b - sqrt(b^2 - 1/4*c^2)
sage: solve(_, b)
[b == a + sqrt(b^2 - 1/4*c^2)]

In the last line Sage doesn't solve the equation for b completely. Can you give me a hint what I'm doing wrong? Thank you!

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2012-11-05 09:43:40 +0200

achrzesz gravatar image

Squaring equations may lead to wrong solutions but if you need the solution given in Wolframalpha you can do:

var('a b c') ; 
eq=a == b - sqrt(b^2 - 1/4*c^2) 
[b == 1/8*(4*a^2 + c^2)/a]
edit flag offensive delete link more

answered 2019-03-31 11:38:37 +0200

rel gravatar image

You could use SymPy's solver instead of Maxima, which is used by default in Sage:

sage: var('a b c')
sage: eq = (a==b-sqrt(b^2-c^2/4))
sage: solve(eq,b, algorithm='sympy')

ConditionSet(b, Eq(a - b + sqrt(4*b**2 - c**2)/2, 0), {(4*a**2 + c**2)/(8*a)})
edit flag offensive delete link more

answered 2013-01-12 10:12:35 +0200

Majid Khonji gravatar image

ridiculous sage!!

I just try to remove the square root manually then solve. It is just a workaround I try.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2012-11-05 07:30:09 +0200

Seen: 1,222 times

Last updated: Nov 05 '12