# Showing $\tan^{-1}x+\tan^{-1}\frac{1}{x}=\frac{\pi}{2}$ [duplicate]

Anyone know how to force Mathematica to return:

$$\tan^{-1}x+\tan^{-1}\frac{1}{x}=\frac{\pi}{2}$$

I've tried this:

ArcTan[x] + ArcTan[1/x] // FullSimplify


this:

Pi/2 - ArcTan[1/x] // FullSimplify


and several other methods, but no luck thus far.

## marked as duplicate by Jens, Bob Hanlon, Simon Woods, corey979, BlacKowJan 4 '17 at 22:07

• Note that x needs be positive – Feyre Jan 4 '17 at 19:28
• This doe not solve your problem, but if you plot ArcTan[x]+ArcTan[1/x] you see that your expression is valid only for x>=0 – mattiav27 Jan 4 '17 at 19:31
• Assuming[x > 0, ArcTan[x] + ArcTan[1/x] // TrigToExp // FullSimplify] – Bob Hanlon Jan 4 '17 at 19:32
• These comments are so helpful. Thanks. – David Jan 4 '17 at 22:14

This might not be elegant (but may be Bob's method is simpler in the comment)

 expr = ArcTan[x] + ArcTan[1/x];
Normal@Assuming[x > 0, Series[expr, {x, 0, 5}]]