# How to write $x \sin A + y \sin B$ as single trigonometric funtion

I came upon this while doing waves:

How do you write $x \sin A+y \sin B$ in the form of $z\sin(\cdots)$?

I have absolutely no idea on how to proceed.

Edit: It was $z\sin(C)$ . My mistake. Maybe there is a mistake in my assumption that it can be expressed in that way. So I'll give the reason behind it

Waves can be expressed as $$y_{1}=A_{1}\sin(kx+\omega t+\delta_{1})$$ and $$y_{2}=A_{2}\sin(kx+\omega t+\delta_{2})$$

Let net be $y$

Therefore, $$y=y_{1}+y_{2}$$

Clearly, $$\frac{\partial y}{\partial t} = -k\frac{\partial y}{\partial x}$$

So, y can be expressed as a linear combination of x and t (leading to the conclusion that sum of two propogatory waves in the same direction fives another propogatory wave). Its probably a sine or cos function as we are adding up two sines. While we were doing superposition of waves, we assumed same amplitude for mathematical simplicity but I can vaguely remember my teacher telling me it was trivial for different amplitudes but I can't figure it out now.

Sorry if I've made a stupid mistake as I am still a beginner in waves.

Edit again: -k in partial differential equation.

• None can be seen on Wolframalpha: wolframalpha.com/input/?i=xSinA%2BySinB in terms of alternate representations – S.C.B. Mar 12 '16 at 14:13
• If $x=y=1$ there seems to be a hope as there is a formula for sina+sinb – Archis Welankar Mar 12 '16 at 14:16
• If $x^2+y^2\ne 1$ you will need complex numbers for this. – DanielWainfleet Mar 12 '16 at 14:27
• @user254665 : What you have in mind is not at all clear to me. If you have $x\sin A + y\sin B$, you can write that as $$\sqrt{x^2+y^2}\left( \frac x {\sqrt{x^2+y^2}} \sin A + \frac y {\sqrt{x^2+y^2}} \sin B \right) = \sqrt{x^2+y^2}(u\sin A + v\sin B),$$ and then $u^2+v^2=1$. Then you could say something like $u=\cos\alpha$ and $v=\sin\alpha$. But where do you go from there? If you'd had $\sin A$ and $\cos A$ instead of $\sin A$ and $\sin B$, it would be easy, but it said $\sin A$ and $\sin B$, where $A$ and $B$ are different variables.Why would the fact that $x^2+y^2\ne1$ matter? $\qquad$ – Michael Hardy Mar 12 '16 at 14:31
• @MichaelHardy. The Q was to write $x\sin A+y\sin B=\sin C$, not $z\sin C.$ If $0\ne x^2+y^2\ne 1$ this can be done but not with real $C$. – DanielWainfleet Mar 12 '16 at 14:41

The question is, if $y_1$ and $y_2$ are the following functions of $x$ and $t$, \begin{align} y_1 &= A_1 \sin(kx + \omega t + \delta_1) \\ y_2 &= A_2 \sin(kx + \omega t + \delta_2), \end{align} how do we find a definition of $y_1+y_2$ as a function of $x$ and $t$ in the form $$y_1 + y_2 = A_3 \sin(kx + \omega t + \delta_3)?$$
To keep the formulas a little more manageable, let $u = kx + \omega t$. Using the angle-sum formula for sine, \begin{align} \sin(kx + \omega t + \delta_1) &= \sin\delta_1 \cos u + \cos\delta_1 \sin u, \\ \sin(kx + \omega t + \delta_2) &= \sin\delta_2 \cos u + \cos\delta_2 \sin u. \end{align} Therefore \begin{align} y_1 + y_2 &= A_1(\sin\delta_1 \cos u + \cos\delta_1 \sin u) + A_2(\sin\delta_2 \cos u + \cos\delta_2 \sin u) \\ &= (A_1\sin\delta_1 + A_2\sin\delta_2)\cos u + (A_1\cos\delta_1 + A_2\cos\delta_2)\sin u. \end{align} So if $A = A_1\sin\delta_1 + A_2\sin\delta_2$ and $B = A_1\cos\delta_1 + A_2\cos\delta_2$, we're looking for $A_3$ and $\delta_3$ that will generally satisfy $$A_3 \sin(u + \delta_3) = A \cos u + B \sin u.$$ Working from this answer to a related question, we want $A_3$ and $\delta_3$ such that $(A_3)^2 = A^2 + B^2$ and $\tan\delta_3 = \frac AB$. Recognizing that once we find a suitable $\delta_3$, we can always add or subtract any whole multiple of $2\pi$ without changing the truth of any of our equations, the solution is something of the form \begin{gather} A_3 = \pm\sqrt{A^2 + B^2}, \\ \delta_3 = \arctan \frac AB \quad\text{or}\quad \delta_3 = \pi + \arctan \frac AB. \end{gather} But since $A_3 \sin\left(u + \left(\pi + \arctan \frac AB\right)\right) = -A_3 \sin\left(u + \left(\arctan \frac AB\right)\right)$, we really have only two solutions to consider, and might as well set $A_3$ to the positive square root of $A^2 + B^2$. And then we merely need consider what happens when $u=0$, that is, check whether $A_1 \sin(\delta_1) + A_2 \sin(\delta_2)$ is positive or negative, to decide whether $\sin(\delta_3)$ must be positive or negative and therefore whether to set $\delta_3 = \arctan \frac AB$ or $\delta_3 = \pi + \arctan \frac AB$.
Alternatively, as one of my physics professors, Ken Lane, liked to say, "let's complexify" the problem. We know that in general, $$e^{i\theta} = \cos \theta + i \sin \theta.$$ If we take the real and imaginary parts of this function, we have two sinusoidal functions $\frac\pi2$ radians out of phase. As I recall, Prof. Lane liked to take the real part of this function as the "wave", which is convenient if we want a phase-shifted cosine, but you're looking for a phase-shifted sine, so it will be more convenient to take the imaginary part. The imaginary part of $e^{i\theta}$ is $\newcommand{\Im}{\mathop{\mathrm{Im}}} \Im\left(e^{i\theta}\right) = \sin\theta$, and $$\Im\left(A_k e^{i(kx + \omega t + \delta_k)}\right) = A_k \sin(kx + \omega t + \delta_k).$$ So we can rewrite $y_1$ and $y_2$ as the imaginary parts of \begin{align} z_1 &= A_1 e^{i(kx + \omega t + \delta_1)}, \\ z_2 &= A_2 e^{i(kx + \omega t + \delta_2)}. \end{align} Adding the two functions together, \begin{align} z_1 + z_2 &= A_1 e^{i(kx + \omega t + \delta_1)} + A_2 e^{i(kx + \omega t + \delta_2)} \\ &= \left(A_1 e^{i\delta_1} + A_2 e^{i\delta_2}\right) e^{i(kx + \omega t)} \\ &= (A_1 \cos\delta_1 + A_2 \cos\delta_2 + i (A_1 \sin\delta_1 + A_2 \sin\delta_2)) e^{i(kx + \omega t)} \end{align} Let $A = A_1 \sin\delta_1 + A_2 \sin\delta_2$ and $B = A_1 \cos\delta_1 + A_2 \cos\delta_2$; then we need merely write the complex number $B + iA$ in the form $A_3 e^{i\delta_3}$, which we do by setting $A_3 = \sqrt{A^2 + B^2}$ and either $\delta_3 = \arctan\frac AB$ (if $A$ is positive) or $\delta_3 = \pi + \arctan\frac AB$ (if $A$ is negative). We then have $$z_1 + z_2 = \left( A_3 e^{i \delta_3} \right) e^{i(kx + \omega t)} = A_3 e^{i(kx + \omega t + \delta_3)}$$ and $$y_1 + y_2 = \Im\left( z_1 + z_2 \right) = A_3 \sin(kx + \omega t + \delta_3).$$