Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not very fresh in math, but I need to solve this system: \begin{gather} A\sin(x-y)+B\sin(z-y)=C\\ A\cos(x-y)+B\cos(z-y)=D \end{gather} where $A,B,C,D$ and $x$ are given.

I tried to expand and combine the bracket terms and I suppose that there are some tricky substitutions to get it out, but I am lost! Thank you all!

share|cite|improve this question
Square the equations, follow by sum/difference angle formula – frank000 Mar 26 at 11:01

Let $x-y=U, z-y=V$. Then $$A\sin U+B \sin V=C$$ $$A\cos U+B \cos V=D$$ Let $\tan \frac U2=t, \tan \frac V2=w$ Then $$A \frac {2t}{1+t^2}+B\frac {2w}{1+w^2}=C$$

$$A \frac {1-t^2}{1+t^2}+B\frac {1-w^2}{1+w^2}=D$$

share|cite|improve this answer
You nicely reduced the problem to two quadratics. And, good surprise, the solutions for $t,w$ are "quite" simple ! By the way, you have typos in the definitions of $t,w$. I suppose you mean $\tan \frac U2=t, \tan \frac V2=w$ – Claude Leibovici Mar 26 at 12:36

Let $x-y=U, z-y=V$. Then $$A\sin U+B \sin V=C$$ $$A\cos U+B \cos V=D$$

Square both equations: \begin{align} A^2\sin^2 U + B^2 \sin^2 V + 2 AB \sin U \sin V&=C^2\\ A^2\cos^2 U + B^2 \cos^2 V + 2AB \cos U \cos V &=D^2 \end{align} Add to get \begin{align} A^2(\sin^2 U + \cos^2 U) + B^2 (\sin^2 V + cos^2 V) + 2 AB (\sin U \sin V + \cos U \cos V) &=C^2 + D^2\\ A^2 + B^2 + 2 AB (\sin U \sin V + \cos U \cos V) &=C^2 + D^2\\ 2 AB (\sin U \sin V + \cos U \cos V) &=C^2 + D^2 - A^2 - B^2\\ \sin U \sin V + \cos U \cos V &=\frac{C^2 + D^2 - A^2 - B^2}{2AB}\\ \cos (U-V) &=\frac{C^2 + D^2 - A^2 - B^2}{2AB}\\ (U-V) &=\cos^{-1} \frac{C^2 + D^2 - A^2 - B^2}{2AB}\\ \end{align} Since $U - V = (x-y) - (z-y) = x - z$, this gives you \begin{align} z &=x - \cos^{-1} \frac{C^2 + D^2 - A^2 - B^2}{2AB}. \end{align} Now you can plug in $z$ and $x$ in either of your first two equations to find $y$.

Of course, this all depends on $AB \ne 0$.

If either $A$ or $B$ is zero, then you can solve the first equation directly to find $U$ or $V$, and work from there.

share|cite|improve this answer

If you're not fresh at math, complex formalism may not be of much help, but for posterity:

Using $$ e^{i\theta} = \cos \theta + i\sin\theta, $$ your system can be written $$ A e^{i(x - y)} + Be^{i(z - y)} = D + iC. $$ Multiplying through by $e^{iy}$ and dividing by $D + iC$ gives $$ \frac{(A e^{ix} + Be^{iz})(D - iC)}{D^{2} + C^{2}} = e^{iy}. \tag{1} $$ Conjugating, $$ \frac{(A e^{-ix} + Be^{-iz})(D + iC)}{D^{2} + C^{2}} = e^{-iy}. \tag{2} $$ Multiplying (1) and (2) eliminates $y$: \begin{align*} 1 = e^{iy}\, e^{-iy} &= \frac{(A e^{ix} + Be^{iz})(D - iC)}{D^{2} + C^{2}}\, \frac{(A e^{-ix} + Be^{-iz})(D + iC)}{D^{2} + C^{2}} \\ &= \frac{(A e^{ix} + Be^{iz})(A e^{-ix} + Be^{-iz})}{D^{2} + C^{2}}. \end{align*} Expanding and rearranging, $$ D^{2} + C^{2} = A^{2} + B^{2} + 2AB\cos(x - z), $$ whereupon you can proceed as in John Hughes' answer.

share|cite|improve this answer
Is that supposed to be $B^{i(z-y)}$ or $Be^{i(z-y)}$? – David K Mar 26 at 14:53
@DavidK: Whoops, thanks; propagated cut-and-paste slip. – Andrew D. Hwang Mar 26 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.