1
$\begingroup$

Sorry for the vague title, but I wasn't sure how to phrase this.

I was using Mathematica to solve a fairly simple algebraic equation, but when I tried to substitute the solution into the original equation as a check, I can't seem to recover my original answer. Minimal example:

eq = a == (1 - b)/Sqrt[1 - 2 b]

sol = Solve[eq, b]

FullSimplify[(1 - b)/Sqrt[1 - 2 b] /. sol, a > 0]

The final line outputs

{(a (a + Sqrt[-1 + a^2]))/Sqrt[-1 + 2 a (a + Sqrt[-1 + a^2])], 
 (a (a - Sqrt[-1 + a^2]))/Sqrt[-1 + 2 a (a - Sqrt[-1 + a^2])]}

even after I've specified that a is positive. So FullSimplify is not enough to make this last line output a. What am I missing?

$\endgroup$
1
$\begingroup$

One way to demonstrate is to 'take care of' of the square root: Rewriting:

eqn = (1 - b)/Sqrt[1 - 2 b];
sol = Solve[eqn == a, b];

Now,

FullSimplify[Sqrt[eqn^2 /. sol], a > 0]

yields:

{a, a}
|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.