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

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.


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).$$


Linear equations in $\sin \theta $ and $\cos \theta $ can be solved by a resolvent quadratic equation, using the two identities (also here):

$$\cos \theta =\frac{1-\tan ^{2}\frac{\theta }{2}}{1+\tan ^{2}\frac{\theta }{2% }}$$

and

$$\sin \theta =\frac{2\tan \frac{\theta }{2}}{1+\tan ^{2}\frac{\theta }{2}}.$$

In this case, we have

$$\begin{eqnarray*} \cos \theta +\sin \theta &=&x \\ &\Leftrightarrow &\left( 1-\tan ^{2}\frac{\theta }{2}\right) +2\tan \frac{% \theta }{2}=x\left( 1+\tan ^{2}\frac{\theta }{2}\right) \\ &\Leftrightarrow &(x+1)\tan ^{2}\frac{\theta }{2}-2\tan \frac{\theta }{2}% +x-1=0 \\ &\Leftrightarrow &\tan \frac{\theta }{2}=\frac{2\pm \sqrt{4-4(x+1)(x-1)}}{% 2(x+1)} \\ &\Leftrightarrow &\tan \frac{\theta }{2}=\frac{1\pm \sqrt{2-x^{2}}}{x+1} \\ &\Leftrightarrow &\theta =2\arctan \frac{1\pm \sqrt{2-x^{2}}}{x+1}. \end{eqnarray*}$$

Tags:

Trigonometry