The identity $\tan({\pi\over4}-{a\over2}) = \sec(a)-\tan(a)$ Today I was solving an exercise and while checking the solution on WolframAlpha, the website used the following identity:
$$\tan \left({\pi\over4}-{\alpha\over2} \right) = \sec(\alpha)-\tan(\alpha)$$
Since I've never seen that formula, I tried to calculate it with the identities I know, especially using
$$\tan \left({\pi\over4}-{\alpha\over2} \right) = {(1-\tan({\alpha\over2}))\over(1+\tan({\alpha\over2}))},$$
but I couldn't make it work.
Is this a known property of trigonometry, like for example $\cos({\pi\over2}-x)=\sin(x)$?

Using the identity $\sin^2(a)+cos^2(a)=1$ and dividing by $\cos^2(a)$ gives you the identity $\tan^2(a)+1=\sec^2(a)$. So $\tan(a)=\sqrt{sec^2(a)-1}$. Using this we have:
$$
\begin{split} \tan\left(\frac{\pi}{4}-\frac{a}{2}\right)&=\sqrt{\sec^2\left(\frac{\pi}{4}-\frac{a}{2}\right)-1} \\ &=\sqrt{\frac{1}{\cos^2\left(\frac{\pi}{4}-\frac{a}{2}\right)} -1} \\ \end{split}
$$
Then using $\cos^2(a)=\frac{2\cos(2a)+1}{2}$ we get:
$$
\begin{split} \sqrt{\frac{1}{\cos^2\left(\frac{\pi}{4}-\frac{a}{2}\right)} -1} &= \sqrt{\frac{2}{\cos\left(\frac{\pi}{2}-a\right)+1}-1 } \\ &=\sqrt{\frac{2-1-\sin(a)}{\sin(a)+1} }\\ &= \sqrt{\frac{1-\sin(a)}{1+\sin(a)}} \\ &= \sqrt{\frac{(1-\sin(a))^2}{1-\sin^2(a)}} \\ &= \frac{1-\sin(a)}{\cos(a)} \\ &=\sec(a)-\tan(a) \end{split}
$$
