Prove that $\tan^{-1}\left(\frac{x+1}{1-x}\right)=\frac{\pi}{4}+\tan^{-1}(x)$ The question is:

Prove that $\tan^{-1}\left(\frac{x+1}{1-x}\right)=\frac{\pi}{4}+\tan^{-1}(x)$.

It's from A-level further mathematics.

The identity should read $$\tan^{-1} \left(\dfrac{x+1}{1-x} \right) = \tan^{-1}(x) + \pi/4$$
Let $\tan^{-1}(x) = \theta$ i.e. $x = \tan(\theta)$. Then we get that $$\dfrac{x+1}{1-x} = \dfrac{\tan(\theta) + 1}{1-\tan(\theta)}$$
Recall that $\tan(A+B) = \dfrac{\tan(A) + \tan(B)}{1 - \tan(A) \tan(B)}$.
Taking $B = \pi/4$, we get that $\tan(A+ \pi/4) = \dfrac{\tan(A) + 1}{1 - \tan(A)}$.
Hence, we get that
$$\dfrac{x+1}{1-x} = \dfrac{\tan(\theta) + 1}{1-\tan(\theta)} = \tan(\theta + \pi/4)$$
Hence, $$\tan^{-1} \left(\dfrac{x+1}{1-x} \right) = \theta + \pi/4 = \tan^{-1}(x) + \pi/4$$
Proof of $\tan(A+B) = \dfrac{\tan(A) + \tan(B)}{1 - \tan(A) \tan(B)}$
$$\tan(A+B) = \dfrac{\sin(A+B)}{\cos(A+B)} = \dfrac{\sin(A) \cos(B) + \cos(A) \sin(B)}{\cos(A) \cos(B) - \sin(A) \sin(B)}$$
Assuming $\cos(A) \cos(B) \neq 0$, divide numerator and denominator by $\cos(A) \cos(B)$, to get that
$$\tan(A+B) = \dfrac{\sin(A) \cos(B) + \cos(A) \sin(B)}{\cos(A) \cos(B) - \sin(A) \sin(B)} = \dfrac{\tan(A) + \tan(B)}{1 - \tan(A) \tan(B)}$$
