Answer
See the explanation below.
Work Step by Step
Let us consider the left side of the given expression:
$\tan \frac{x}{2}-\cot \frac{x}{2}$
By using the trigonometric identity
$\tan \frac{x}{2}=\frac{1-\cos x}{\sin x}$ and $\tan \frac{x}{2}=\frac{\sin x}{1+\cos x}$, the above expression can be further simplified as:
$\begin{align}
& \tan \frac{x}{2}-\cot \frac{x}{2}=\frac{1-\cos x}{\sin x}-\frac{1}{\tan \frac{x}{2}} \\
& =\frac{1-\cos x}{\sin x}-\frac{1}{\frac{\sin x}{1+\cos x}} \\
& =\frac{1-\cos x}{\sin x}-\frac{\left( 1+\cos x \right)}{\sin x}
\end{align}$
Now, taking the LCM, the equation will be
$\begin{align}
& \frac{1-\cos x}{\sin x}-\frac{\left( 1+\cos x \right)}{\sin x}=\frac{1-\cos x-1-\cos x}{\sin x} \\
& =\frac{-2\cos x}{\sin x} \\
& =-2\frac{\cos x}{\sin x} \\
& =-2\cot x
\end{align}$
Hence, the left side of the given expression is equal to the right side, which is $\tan \frac{x}{2}-\cot \frac{x}{2}=-2\cot x$.