Solve $\cos(\theta) + \sin(\theta) = x$ for known $x$, unknown $\theta$?

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!


Solution 1:

Yeah you can write $\frac{1}{\sqrt{2}}\Bigl[\cos{\theta} + \sin{\theta}\Bigl]$ as $\sin\Bigl(\frac{\pi}{4}+\theta\Bigr)$ and solve for $x$.

Multiply both sides by $\frac{1}{\sqrt{2}}$ and then try something.

Solution 2:

Another method goes by noting that $\cos^2\theta+\sin^2\theta=1$. We have $\cos\theta+\sin\theta=x$, so $$\cos^2\theta+2\cos\theta\sin\theta+\sin^2\theta=x^2,$$ or $2\cos\theta\sin\theta=x^2-1$. But $2\cos\theta\sin\theta=\sin(2\theta)$, so $2\theta=\sin^{-1}(x^2-1)$, or $$ \theta=\frac12\sin^{-1}(x^2-1).$$