<s>[INST] Show an identity involving a sum of arctangents of algebraic expressions 
Show that
  $$
2\tan^{-1}\frac{\sqrt{x^2+a^2} - x + b}{\sqrt{a^2-b^2}} + \tan^{-1}\frac{x\sqrt{a^2-b^2}}{b\sqrt{x^2+a^2} + a^2} + \tan^{-1}\frac{\sqrt{a^2-b^2}}{b} = n\pi .
$$

I tried using $$ x= a \tan \theta ,\; b= a \sin\phi,$$
but then calculations are not working out; that is,
I am not able to further simplify.
 [/INST] Hints:


*

*Write the equation as $\tan^{-1}\frac{x\sqrt{a^2-b^2}}{b\sqrt{x^2+a^2} + a^2} + \tan^{-1}\frac{\sqrt{a^2-b^2}}{b} = n\pi - 2\tan^{-1}\frac{\sqrt{x^2+a^2} - x + b}{\sqrt{a^2-b^2}} $

*Apply $\tan$ on both sides and use $\tan (n \pi - 2\alpha) = -\tan 2\alpha$

*Resolve the tangents on the left using $\tan \beta + \tan \gamma =\frac{\tan \beta + \tan \gamma}{1- \tan \beta \tan \gamma}$ and on the right using $\tan(2\alpha) = \frac{2\tan\alpha}{1-\tan^2\alpha}$

*Now you are left with an equation consisting of only algebraic fractions in the variables $a,b,x$
</s>