<s>[INST] Prove the following trigonometric identity $$\frac{\tan{(\frac{\pi}{4}+x)}-\tan{(\frac{\pi}{4}-x)}}{\tan{(\frac{\pi}{4}+x)}+\tan{(\frac{\pi}{4}-x)}} = 2\sin{x}\cos{x}$$
==============
On L.H.S, I've tried to write it using the sum and difference formula so it becomes
$$\frac{\dfrac{1+\tan x}{1-\tan x}-\dfrac{1-\tan x}{1+\tan x}}{\dfrac{1+\tan x}{1-\tan x}+\dfrac{1-\tan x}{1+\tan x}}$$
Then I try to rationalize and it got really messy
$$\frac{\dfrac{(1+\tan x)(1+ \tan x)}{(1-\tan x)(1+\tan x)} - \dfrac{(1+\tan x)(1+\tan x)}{(1-\tan x)(1+\tan x)}}{\dfrac{(1+\tan x)(1+\tan x)}{(1-\tan x)(1+\tan x)} + \dfrac{(1+\tan x)(1+\tan x)}{(1-\tan x)(1+\tan x)}}$$
Somehow I distributed the terms and try to simplify and I got stuck.
Any help would be appreciated. Thank you.
 [/INST] You may write
$$
\begin{align}
\dfrac{\dfrac{1+\tan x}{1-\tan x}-\dfrac{1-\tan x}{1+\tan x}}{\dfrac{1+\tan x}{1-\tan x}+\dfrac{1-\tan x}{1+\tan x}}=\dfrac{(1+\tan x)^2-(1-\tan x)^2}{(1+\tan x)^2+(1-\tan x)^2}
&=\dfrac{4\tan x}{2(1+\tan^2x)}\\\\&=2\tan x \cos^2x\\\\&=2\sin x\cos x
\end{align}
$$
</s>