11.1. Determine the extreme values of the function $f:\left(0, \frac{\pi}{2}\right) \rightarrow \mathbb{R}, f(x)=\sin x+\cos x+\tan x+\cot x$.
Solution.

$$
\begin{aligned}
& f^{\prime}(x)=\cos x-\sin x+\frac{1}{\cos ^{2} x}-\frac{1}{\sin ^{2} x}=\cos x-\sin x+\frac{\sin ^{2} x-\cos ^{2} x}{\sin ^{2} x \cdot \cos ^{2} x}= \\
& =\cos x-\sin x-\frac{(\cos x-\sin x)(\cos x+\sin x)}{\sin ^{2} x \cdot \cos ^{2} x}=(\cos x-\sin x)\left[1-\frac{\cos x+\sin x}{\sin ^{2} x \cos ^{2} x}\right]
\end{aligned}
$$

In $\left(0, \frac{\pi}{2}\right)$ we have

1) $f^{\prime}(x)=0 \Rightarrow \cos x=\sin x \Rightarrow x=\frac{\pi}{4}$

or

$$
\begin{gathered}
f^{\prime}(x)=0 \Rightarrow \cos x+\sin x=\sin ^{2} x \cos ^{2} x \Rightarrow \\
\Rightarrow 1 \leq 1+2 \sin x \cos x=\sin ^{4} x \cos ^{4} x=\frac{1}{16} \sin ^{4} 2 x \leq \frac{1}{16} \Rightarrow x \in \varnothing \\
f^{\prime \prime}(x)=-\sin x-\cos x+\frac{2 \sin x}{\cos ^{3} x}+\frac{2 \cos x}{\sin ^{3} x} \Rightarrow f^{\prime \prime}\left(\frac{\pi}{4}\right)=-\frac{\sqrt{2}}{2}-\frac{\sqrt{2}}{2}+4+4=8-\sqrt{2}>0
\end{gathered}
$$

Therefore, $x=\frac{\pi}{4}$ is a point of minimum and

$$
f_{\min }(x)=f\left(\frac{\pi}{4}\right)=\sin \frac{\pi}{4}+\cos \frac{\pi}{4}+\operatorname{tg} \frac{\pi}{4}+\operatorname{ctg} \frac{\pi}{4}=\frac{\sqrt{2}}{2}+\frac{\sqrt{2}}{2}+1+1=2+\sqrt{2}
$$