Answer
\[\tan x=\frac{i(e^{-ix}-e^{ix})}{ (e^{ix}+e^{-ix}) }\]
Work Step by Step
According to the question we will use the result
\[\cos bx=\frac{e^{ibx}+e^{-ibx}}{2}\;\;\;...(1)\]
Using (1) with $b=1$
$\cos x=\Large\frac{e^{ix}+e^{-ix}}{2}$ ____(2)
Consider, $\;\tan x=\sqrt{\sec^2 x-1}$
$\tan x=\sqrt{\frac{1}{\cos ^2 x}-1}$
Using (2)
$\tan x=\sqrt{\frac{4}{(e^{ix}+e^{-ix})^2}-1}$
$\tan x=\sqrt{\frac{4-(e^{ix}+e^{-ix})^2}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\sqrt{\frac{4-(e^{2ix}+e^{-2ix}+2)}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\sqrt{\frac{2-e^{2ix}-e^{-2ix}}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\sqrt{\frac{-(e^{2ix}+e^{-2ix}-2)}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\sqrt{\frac{-(e^{-ix}-e^{ix})^2}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\sqrt{\frac{i^2(e^{-ix}-e^{ix})^2}{ (e^{ix}+e^{-ix})^2 }}$
$\tan x=\frac{i(e^{-ix}-e^{ix})}{ (e^{ix}+e^{-ix}) }$