# Problem with finding critical point of trig function

2. Let $f(x)=x+\cot(x/2),\quad x\in\left[\frac\pi3,\frac{2\pi}3\right]$.

(a) Find all the critical numbers in the domain.

(b) Find the absolute maximum value and minimum value.

Solution: (a) $$f'(x)=1-\frac1{2\sin^2(x/2)}=0,\Rightarrow\sin(x/2)=\pm\frac1{\sqrt2}$$

It has only one solution $x=\frac\pi2$ in $\left[\frac\pi3,\frac{2\pi}3\right]$.

(b) Note that $f\left(\frac\pi2\right)=\frac\pi2+1,f\left(\frac\pi3\right)=\frac\pi3+\sqrt3,f\left(\frac{2\pi}3\right)=\frac{2\pi}3+1/\sqrt3$. Therefore,

Thus $f\left(\frac\pi3\right)=\frac\pi3+\sqrt3$ is the absolute maximum, $f\left(\frac\pi2\right)=\frac\pi2+1$ is the absolute minimum.

Can anyone help me out solving this? I don't understand how my professor ends up with $$1 - \frac{1}{2\sin^2(x/2)}$$

-
What is the derivative of $\cot(x)$? – N. S. Dec 17 '12 at 23:42
-csc^2(X) i believe? – choloboy Dec 17 '12 at 23:43
Which is the same as $-\frac{1}{\sin^2(x)}$ ;) – N. S. Dec 17 '12 at 23:56
Again, please type up your questions and don't just post a picture of them. – Thomas Jan 31 '13 at 0:37

Using quotient rule to differentiate $\cot(x) = \cos(x)/\sin(x)$ gives
$$\cot'(x) = (-\sin(x)\sin(x) - \cos(x)\cos(x) )/\sin^2(x) = -1/\sin^2(x),$$ so if the argument is $x/2$ then by the chain rule we get $$\cot'(x/2) = -1/2\sin^2(x/2).$$