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?

$f'(\theta)=3(sin\theta-cos\theta)^2 + 2sin^2\theta = 6 (\sin\theta -\cos\theta )(\cos\theta + \sin\theta) + 4 \sin \theta \cos\theta$
$
=6 (\sin^2 \theta - \cos^2 \theta) + 4 \sin \theta \cos\theta =-6\cos(2\theta) +2\sin(2\theta)\ge 0 \implies \frac{2}{6} \tan (2\theta)\ge 1
$
$
\implies \tan(2\theta)\ge 3 \implies 2\theta\ge \arctan(3) \implies \theta \ge \arctan(3)/2
$
What that tells us is that first derivative is bigger than $0$ when $\theta \ge \arctan(3)/2$ that is function is growing and after that its smaller than $0$ - meaning its decreasing so we know that the function has a minimum in point $\theta = \arctan(3)/2$
With that
$$
f(\theta)=\cos^2\theta-6\sin\theta \cos\theta+3\sin^2\theta+2=\frac{1+\cos(2\theta)}{2} - 3\sin(2\theta) +3\frac{1-\cos(2\theta)}{2} + 2=4-\cos(2\theta)-3\sin(2\theta) = 4-\frac{1}{\sqrt{10}} - 3\frac{3}{\sqrt{10}}=4 - \sqrt{10}
$$
Since we know that 
$\cos^2 (2\theta)+\sin^2 (2\theta)=1 \implies 1+9=1/\cos^2 (2\theta) \implies cos^2(2\theta)=\frac{1}{10}$
