Find $f'(x)$in terms of $f(x)=|\cos(x)|\sqrt{1-\cos(x)}$ I am trying to solve the following exercise :
Let $f$ be the function defined by :
$$\forall x\in]0,\pi[\;\;\;\;\; f(x)=|\cos(x)|\sqrt{1-\cos(x)}$$
calculate $f '(x)$ in terms of $f(x),$  for all  $x\in]0,\pi[\setminus \{\frac{\pi}{2}\}.$
My try : we can write $f(x)=\sqrt{\cos^2(x)-\cos(^3(x),}$ then
$$f'(x)=\frac{-2\cos(x)\sin(x)+3\cos^2(x)\sin(x)}{2f(x)} $$
I don't know how I can write $-2\cos(x)\sin(x)+3\cos^2(x)\sin(x)$ in terms of $f(x)$ 
Any help would be appreciated, Thanks !

Notice that $\sqrt {1 - \cos x} = \sqrt {2 \sin^2 \frac x 2} = \sqrt 2 | \sin \frac x 2| = \sqrt 2 \sin \frac x 2$ because $\sin \frac x 2 \ge 0$ when $x \in [0, \pi]$.
For $x \in [0, \frac \pi 2]$, the function is
$$f(x) = \sqrt 2 \cos x \sin \frac x 2 = \frac {\sqrt 2} 2 [\sin (\frac x 2 + x) + \sin (\frac x 2 - x)] = \frac {\sqrt 2} 2 (\sin \frac {3x} 2 - \sin \frac {-x} 2) = \\
\frac {\sqrt 2} 2 (\sin \frac {3x} 2 + \sin \frac x 2) ,$$
where I have used the formula $\sin a \cos b = \frac 1 2 (\sin (a+b) + \sin (a - b))$.
Similarly, for $x \in [\frac \pi 2, \pi]$, $f(x) = - \sqrt 2 \cos x \sin \frac x 2 = - \frac {\sqrt 2} 2 (\sin \frac {3x} 2 + \sin \frac x 2)$.
This means that, for $x \in [0, \frac \pi 2]$, $f'(x) = \frac {\sqrt 2} 4 (3 \cos \frac {3x} 2 + \cos \frac x 2)$.
It's quite clear that $f'$ has nothing to do with $f$, for two reasons:


*

*first, the functions have changed from $\sin$ to $\cos$; this could be cured by noticing that $\cos x = \sin (\frac \pi 2 \pm x)$, but this means that $f'(x)$ is not expressed in terms of $f(x)$, but in terms of $f(x \pm \frac \pi 2)$

*much worse, there is a $3$ in front of $\cos \frac {3x} 2$ that spoils everything, and that cannot be eliminated by any trick (removing it would in turn alter the coefficient of $\cos \frac x 2$).
I doubt that the problem can be solved as required in its current form.
