Prove that
$\tan \left(\frac{\pi}{4}+\frac{x}{2}\right)+\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)=2 \sec x$
To prove: $\tan \left(\frac{\pi}{4}+\frac{x}{2}\right)+\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)=2 \sec x$
Proof: Consider, L.H.S $=\tan \left(\frac{\pi}{4}+\frac{x}{2}\right)+\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)$
$\tan \left(\frac{\pi}{4}+\frac{x}{2}\right)+\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)=\frac{\tan \frac{\pi}{4}+\tan \frac{x}{2}}{1-\tan \frac{\pi}{4} \tan \frac{x}{2}}+\frac{\tan \frac{\pi}{4}-\tan \frac{x}{2}}{1+\tan \frac{\pi}{4} \tan \frac{x}{2}}$
$\left(\because \tan (\mathrm{x}+\mathrm{y})=\frac{\tan \mathrm{x}+\tan \mathrm{y}}{1-\tan x \tan y}\right.$ and $\left.\tan (\mathrm{x}-\mathrm{y})=\frac{\tan x-\tan y}{1+\tan x \tan y}\right)$
$=\frac{1+\tan \frac{x}{2}}{1-\tan \frac{x}{2}}+\frac{1-\tan \frac{x}{2}}{1+\tan \frac{x}{2}}$
$=\frac{1+\frac{\sin \frac{x}{2}}{\cos \frac{x}{2}}}{1-\frac{\sin \frac{x}{2}}{\cos \frac{x}{2}}}+\frac{\sin \frac{x}{2}}{1+\frac{\cos \frac{x}{2}}{\cos \frac{x}{2}}}$
$=\frac{\cos \frac{x}{2}+\sin \frac{x}{2}}{\cos \frac{x}{2}-\sin \frac{x}{2}}+\frac{\cos \frac{x}{2}-\sin \frac{x}{2}}{\cos \frac{x}{2}+\sin \frac{x}{2}}$
$=\frac{\left(\cos \frac{x}{2}+\sin \frac{x}{2}\right)^{2}+\left(\cos \frac{x}{2}-\sin \frac{x}{2}\right)^{2}}{\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}}$
By Expanding the numerator we get,
$=\frac{2}{\cos x}\left(\because \cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}=\cos x\right)$
$\tan \left(\frac{\pi}{4}+\frac{x}{2}\right)+\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)=2 \sec x=$ R.H.S
since L.H.S = R.H.S, Hence proved.