Home » Blog » Compute the derivative of the given function

Compute the derivative of the given function

Compute the derivative of the function

    \[ f(x) = \tan \left( \frac{x}{2} \right) - \cot \left( \frac{x}{2} \right). \]


We recall the derivatives (\tan x)' = \sec^2 x and (\cot x)' = \csc^2 x. (We proved these in this exercise, found in Apostol Section 4.6, Exercise #25.) Then, we use the chain rule to compute

    \begin{align*}  f'(x) &= \frac{1}{2} \sec^2 \left( \frac{x}{2} \right) + \frac{1}{2} \csc^2 \left( \frac{x}{2} \right) \\[8pt]  &= \frac{1}{2} \left( \frac{\sin^2 \left( \frac{x}{2} \right) + \cos^2 \left( \frac{x}{2} \right)}{\cos^2 \left( \frac{x}{2} \right) \sin^2 \left(\frac{x}{2} \right)}\right) \\[8pt]  &= \frac{1}{2} \left( \frac{1}{\left(\sin \left( \frac{x}{2} \right) \cos \left( \frac{x}{2} \right)\right) \left(\sin \left( \frac{x}{2} \right) \cos \left( \frac{x}{2} \right) \right)}\right) \\[8pt]  &= \frac{1}{2} \left( \frac{1}{\left(\frac{1}{2} \sin x\right) \left(\frac{1}{2} \sin x\right)} \right) \\  &= \frac{2}{\sin^2 x}. \end{align*}

The second to last equality follows from the trig identity \sin (2x) = 2 \sin x \cos x since,

    \[ \sin x = \sin 2\left(\frac{x}{2}\right) = 2 \sin \left( \frac{x}{2} \right) \cos \left( \frac{x}{2} \right). \]

Implies,

    \[ \sin \left( \frac{x}{2} \right) \cos \left( \frac{x}{2} \right) = \frac{1}{2} \sin x. \]

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):