5
$\begingroup$

I've got the term $-1 + 2b^2 + 2b\sqrt {b^2-1}$ appearing several times within several larger expressions. It is easy to see that this expression factors into ${(b+\sqrt{b^2-1})^2}$, but when I use FullSimplify or Factor it doesn't change. Is there a way to make Mathematica factor this expression automatically? $b$ is defined to be real and $>1$.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

The following, although rather unsatisfying, does produce the desired result.

term = -1 + 2 b^2 + 2 b Sqrt[b^2 - 1]
Factor[Simplify[term /. b -> Cosh[z], Sinh[z] > 0] // TrigExpand]
    /. Sinh[z] -> Sqrt[Cosh[z]^2 - 1] /. Cosh[z] -> b
(* (b + Sqrt[-1 + b^2])^2 *)

Indeed, the second expression, with a LeafCount of 13, is simpler than the first, with a LeafCount of 19.

Depending on the details of the actual problem you wish to solve, working with hyperbolic functions throughout instead of b might be preferable.

$\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.