TITLE: Solve $\cos(\theta) + \sin(\theta) = x$ for known $x$, unknown $\theta$?
QUESTION [12 upvotes]: After looking at the list of trigonometric identities, I can't seem to find a way to solve this. Is it solvable?
$$\cos(\theta) + \sin(\theta) = x.$$
What if I added another equation to the problem:
$$-\sin(\theta) + \cos(\theta) = y,$$
where $\theta$ is the same and $y$ is also known?
Thanks.
EDIT: 
OK, so using the linear combinations I was able to whip out:
$$a \sin(\theta) + b \cos(\theta) = x = \sqrt{a^2 + b^2} \sin(\theta + \phi),$$
where $\phi = \arcsin \left( \frac{b}{\sqrt{a^2 + b^2}} \right) = \frac{\pi}{4}$ (as long as $a\geq 0$)
Giving me:
$$x = \sin(\theta + \frac{\pi}{4}) \text{ and } \arcsin(x) - \frac{\pi}{4} = \theta.$$
All set! Thanks!

REPLY [2 votes]: If you know
$$ \cos(\theta) + \sin(\theta) = x $$
and
$$ -\sin(\theta) + \cos(\theta) = y $$
then you have a system of two linear equations in the 'unknowns' $\cos(\theta)$ and $\sin(\theta)$, and thus can solve for the values of $\cos(\theta)$ and $\sin(\theta)$:
$$ \cos(\theta) = \frac{x+y}{2} $$
$$ \sin(\theta) = \frac{x-y}{2} $$
and then obtain $\theta$ in your favorite manner.