TITLE: Solving the following trigonometric equation: $\sin x + \cos x = \frac{1}{3} $
QUESTION [6 upvotes]: 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).

REPLY [5 votes]: Others have proposed other correct methods for solving the equation.  I propose to complete your chosen (ultimately correct) method.
There are two problems with your solution:

You have taken a square root of both sides in the second line of your solution, and then squared both sides in the fourth line.  Both these steps lose information about the sign of expressions, and introduce the possibility of finding roots that are, in fact, not correct roots, but extraneous roots.  Thus, in these cases,(maybe all cases!) all possible solutions should be verified by substitution into the original equation.
Whenever you use an inverse trigonometric function to find an angle, you must remember that there are always two angles in the range from $0$ to $2\pi$ that satisfy the given trigonometric equation. (Except for edge cases like $90^o$)

You have found that:
$$ z_1 = -0.520517 $$
My calculator gives me $121.37^o$ as the solution.  But since the cosine function is negative in the second and third quadrants, the other solution is $238.63^o$.
Similarly,$$ z_2 = 0.8538509 $$
gives $31.37^o$.  But cosine is positive in the first and fourth quadrant, so $328.63^o$ is another possible answer.
Checking these four values into the original equation will give the values (only one in this case) that apply to the original equation.
Apart from these two steps, your solution is correct.