<s>[INST] Minimum value of $\cos^2\theta-6\sin\theta \cos\theta+3\sin^2\theta+2$ Recently I was solving one question, in which I was solving for the smallest value of this expression

$$f(\theta)=\cos^2\theta-6\sin\theta \cos\theta+3\sin^2\theta+2$$

My first attempt:
$$\begin{align}
f(\theta) &=3+2\sin^2\theta-6\sin\theta \cos\theta \\
&=3(1-2\sin\theta \cos\theta)+2\sin^2\theta \\
&=3(\sin\theta-\cos\theta)^2 + 2\sin^2\theta
\end{align}$$
Hence the minimum value of $f(\theta)=2\sin^2\theta$ when $\theta=\pi/4$
hence minimum value of $f(\theta)=1$.
But then again I tried to do question differently by making substitutions in order to change the whole $f(\theta)$ in the form of $\cos x+\sin x$ 
Then $f(\theta)$ came out to be 
$$f(\theta)= 4-(\cos(2\theta)+3\sin(2\theta))$$
The minimum value of this expression is surely $$(f(\theta))_{min}=4-\sqrt{10}$$
Can anybody explain me algebraically why my first method gave the wrong result?
 [/INST] hint: Alternatively, using Lagrange Multiplier we have: 
$x = \cos \theta, y = \sin \theta\implies f(x,y) = x^2-6xy+3y^2+2, x^2+y^2 = 1\implies f(x,y) = (x^2+y^2)+2y^2+2 - 6xy = 3-6xy+2y^2 \implies f_x = -6y= 2\lambda x, f_y = 4y-6x= 2\lambda y\implies4\lambda y - 6\lambda x = 2\lambda^2y\implies 4\lambda y+18y=2\lambda^2y\implies y(\lambda^2-2\lambda-9) = 0\implies y = 0 $  or $\lambda = 1\pm \sqrt{10}$ . Can you continue at this point?
</s>