$\sin x + c_1 = \cos x + c_2$ While working a physics problem I ran into a seemingly simple trig equation I couldn't solve. I'm curious if anyone knows a way to solve the equation: 
$\sin(x)+c_1 = \cos(x)+c_2$
(where $c_1$ and $c_2$ are constants) for $x$ without using Newton's method or some other form of approximation.
 A: write you equation as 
$$\cos (\pi/4) \cos x - \sin (\pi/4)\sin x = \frac{c_1 - c_2}{\sqrt 2} $$ now, the left hand side can be written as 
$$ \cos(x + \pi/4) =  \frac{c_1 - c_2}{\sqrt2 } \tag 1  $$
if $|c_1 - c_2| \le \sqrt 2,$ then  $(1)$ has a solution  $$ x = \pm \cos^{-1}\left(  \frac{c_1 - c_2}{\sqrt2 }\right) - \frac{\pi}4 + 2k\pi, \text{ where $k$ is any integer. } $$
A: $$
A\sin x + B\cos x = \sqrt{A^2+B^2}\left( \frac A {\sqrt{A^2+B^2}}\sin x+ \frac B {\sqrt{A^2+B^2}}\cos x \right)
$$
Notice that the sum of the squares of the coefficients above is $1$; hence they are the coordinates of some point on the unit circle; hence there is some number $\varphi$ such that
$$
\cos\varphi = \frac A {\sqrt{A^2+B^2}}\quad\text{and}\quad\sin\varphi=\frac B {\sqrt{A^2+B^2}}.
$$
And notice that $\tan\varphi=\dfrac B A$, so finding $\varphi$ is computing an arctangent.
Now we have
$$
A\sin x + B\cos x = \sqrt{A^2+B^2}(\cos\varphi \sin x+ \sin\varphi \cos x) = \sqrt{A^2+B^2} \sin(x+\varphi).
$$
Apply this to $\sin x - \cos x$, in which $A=1$ and $B=-1$, and you get
$$
\sqrt{2} \sin(x+\varphi) = c_2-c_1.
$$
So you just need to find an arcsine and an arctangent.  And the arctangent is easy in this case.
