## Task A-3.1.

What is the smallest, and what is the largest value that the function $f: \mathbb{R} \rightarrow \mathbb{R}$ given by the formula $f(x)=\cos ^{2} x+\sin x$ achieves?
## Second Solution.

By substituting $\cos ^{2} x+\sin ^{2} x=1$, we get $f(x)=-\sin ^{2} x+\sin x+1$. 1 point

Completing the square, we obtain $f(x)=\frac{5}{4}-\left(\sin x-\frac{1}{2}\right)^{2}$.

We conclude that the maximum value is achieved when $\sin x=\frac{1}{2}$ and is $\frac{5}{4}$.

The minimum value is achieved when the value of $\left|\sin x-\frac{1}{2}\right|$ is the largest. Since $\sin x \in[-1,1]$, this is when $\sin x=-1$ and the minimum value of the function $f$ is -1.