Dear Uncle Colin,

In an answer sheet, they’ve made a leap from $\arctan\left(\frac{\cos(x)+\sin(x)}{\cos(x)-\sin(x)}\right)$ to $x + \frac{\pi}{4}$ and I don’t understand where it’s come from. Can you help?

-- Awful Ratio Converted To A Number

Hello, ARCTAN, and thank you for your message!

There’s a principle I want to introduce here that’s not an obvious one, and possibly not a hard-and-fast rule: when you’re working with the arctangent of something, it often helps if the something is expressed in tangents.

In this case, the argument of the arctangent is $\frac{\cos(x)+\sin(x)}{\cos(x)-\sin(x)}$, which - if you divide top and bottom by $\cos(x)$ - is $\frac{1 + \tan(x)}{1 - \tan(x)}$.

If we notice that $\tan(A+B) \equiv \frac{\tan(A)+\tan(B)}{1-\tan(A)\tan(B)}$, then we can see that if $\tan(A)=1$ (so $A=\frac{\pi}{4}$) and $B=x$, we recover exactly what we have above.

Your expression is $\arctan\left(\tan\left(x + \frac{\pi}{4}\right)\right)$, which is clearly $x + \frac{\pi}{4}$.

Hope that helps,

-- Uncle Colin