simplify arctan(x) + arctan(1/x) in sage

Viewed 37

In Sagemath, at some point I end up with the following expression (with b > 0): enter image description here

Which would be easy to simplify using the arctan(x) + arctan(1/x) = pi / 2 equality.

My problem is: how do I simplify using that inequality? I tried simplify_trig() and simplify_full() but none of them worked.

Should I use something like assume( arctan(1/sqrt(b-1)) + arctan(sqrt(b-1))) == pi / 2) ? That looks like a ugly hack

1 Answers

Try this:

sage: expr.subs({arctan(1/sqrt(b - 1)): pi/2 - arctan(sqrt(b - 1))})
Related