11.3. Given a circle of unit radius, $AB$ is its diameter. Point $M$ moves along the circle, $M_{1}$ is its projection on $AB$. Denote $f(M)=AB+MM_{1}-AM-BM$. Find the maximum and minimum values of the function $f(M)$.
Answer: the minimum value is 0; the maximum value is $3-2 \sqrt{2}$.

Solution. Let $\angle M A B=\alpha, \alpha \in\left[0, \frac{\pi}{2}\right]$. Then $f(M)=2+2 \cos \alpha \sin \alpha-2 \cos \alpha-2 \sin \alpha$. Denote this expression by $g(\alpha)$. We have $g^{\prime}(\alpha)=2\left(\cos ^{2} \alpha-\sin ^{2} \alpha+\sin \alpha-\cos \alpha\right)=$ $=2(\cos \alpha-\sin \alpha)(\cos \alpha+\sin \alpha-1)$. The second bracket is non-negative for all $\alpha \in\left[0, \frac{\pi}{2}\right]$, since for these $\alpha$ this inequality follows from the inequality $(\sin \alpha+\cos \alpha)^{2} \geq 1$, i.e., $2 \sin \alpha \cos \alpha \geq 0$. Thus, $g^{\prime}(\alpha)=0$ at $\alpha=0, \alpha=\frac{\pi}{2}$ and $\alpha=\frac{\pi}{4}$ ( $\alpha=\frac{\pi}{4}$ is the only root of the first bracket). Considering the sign of the derivative, we get that $g(0)=g\left(\frac{\pi}{2}\right)=0$ is the minimum value, and $g\left(\frac{\pi}{4}\right)=2+1-2 \sqrt{2}=3-2 \sqrt{2}$ is the maximum.