<s>[INST] Can $f(x)=\sin(x)  +  \cos^2(x)$ take the value $\sqrt{2}$? Can $f(x)$ take the value of $\sqrt{2}$, where
 $$f(x)  = \sin(x)  +  (\cos(x))^2\quad ?$$
When equating the value of $f(x)$ to $\sqrt{2}$, it gives imaginary values of $\sin(x)$.
Thanks in advance.
 [/INST] Since $\cos^2x=1-\sin^2 x$, our equation becomes $\sin^2 x-\sin x+\sqrt{2}-1=0$.
Solve the equation $w^2-w+\sqrt{2}-1=0$. The roots are 
$$w=\frac{1\pm \sqrt{1-4(\sqrt{2}-1})}{2}.$$
The discriminant $1-4(\sqrt{2}-1)$ is negative, so our quadratic in $w$ has no real roots. It follows that there cannot be a real number $x$ such that $\sin x+\cos^2 x=\sqrt{2}$.
This does not fully answer the question. We can ask whether there are complex non-real solutions.  For that, look at the two non-real values of $w$ obtained above. Call them $w_1$ and $w_2$. Recall that if $z$ is a complex number, then
$$\sin z=\frac{e^{iz}-e^{-iz}}{2i}.$$
So we want to solve the equations
$$e^{iz}-e^{-iz}=2iw_j \quad (j=1,2).$$
Multiply both sides by $e^{iz}$, and simplify. We get
$$e^{2iz}-2iw_je^{iz}-1=0.$$
Make the substitution $u=e^{iz}$. We arrive at the equations
$$u^2-2iw_j u-1=0 \quad (j=1,2).$$
These are a quadratic equation with complex coefficients. One can write down the solutions in more or less the usual way, and from them obtain the values of $z$ that work. There are  infinitely many of them, just like there are, for example, infinitely many $x$ such that $\sin x=1/2$.
Remark To show that there are no real solutions, one does not need to recall the Quadratic Formula. We are interested in the equation  $\sin^2 x-\sin x-1+\sqrt{2}=0$.
If we complete the square, we get
$$\sin^2 x-\sin x-1=\left(\sin x-\frac{1}{2}\right)^2-\frac{5}{4}.$$
Since $\left(\sin x-\frac{1}{2}\right)^2\ge 0$, it follows that 
$\sin^2 x-\sin x-1$ must always be $-\frac{5}{4}$. Since $\sqrt{2}-\frac{5}{4}$ is positive, we conclude that we cannot have $\sin^2 x-\sin x-1+\sqrt{2}=0$.
 .     
</s>