Solving the following trigonometric equation: $\sin x + \cos x = \frac{1}{3} $ I have to solve the following equation:
$$\sin x + \cos x = \dfrac{1}{3} $$
I use the following substitution:
$$\sin^2 x + \cos^2 x = 1  \longrightarrow \sin x = \sqrt{1-\cos^2 x}$$
And by operating, I obtain:
$$ \sqrt{(1-\cos^2 x)} = \dfrac{1}{3}-\cos x$$
$$ 1 - \cos^2 x = \dfrac{1}{9} + \cos^2 x - \dfrac{2}{3}\cos x$$
$$ -2\cos^2 x + 2/3\cos x +\dfrac{8}{9}=0$$
$$ \boxed{\cos^2 x -\dfrac{1}{3}\cos x -\dfrac{4}{9} = 0}$$
Can I just substitute $\cos x$ by $z$ and solve as if it was a simple second degree equation and then obtain $x$ by taking the inverse cosine? I have tried to do this but I cannot get the right result. If I do this, I obtain the following results:
$$ z_1 = -0.520517 \longrightarrow  x_1 = 121.4º\\
z_2= 0.8538509 \longrightarrow x_2 = 31.37º$$
I obtain $x$ from $z$ by taking the inverse cosine.
The correct result should be around 329º which corresponds to 4.165 rad. My question is if what I am doing is wrong because I have tried multiple times and I obtain the same result (or in the worst case, I have done the same mistake multiple times).

An even simpler way is to substitute $x \rightarrow y - \frac{\pi}{4}$
You equation is now $$\sqrt{2} \sin(y) = \frac{1}{3}$$ 
The solutions are
$$\begin{aligned} x & = \arcsin \left( \frac{\sqrt{2}}{6} \right) - \frac{\pi}{4} + 2\pi n \\ x & = \arccos \left( \frac{\sqrt{2}}{6} \right) - \frac{\pi}{4} + 2 \pi n
\end{aligned}$$
