# How to find the phase-shift from the sum of two sines?

I want to find out how interference of two sine waves can affect the output-phase of the interfered wave.

Consider two waves,

$$E_1 = \sin(x) \\ E_2 = 2 \sin{(x + \delta)}$$

First off, I don't know how to prove it, but I can see visually (plotting numerically) that the sum of these waves looks a new sine wave.

I want to find out what the phase of $E_1 + E_2$ looks like. First I tried finding using functions like ArcSin() and Ln() but ran into trouble for both methods. For example when I try ArcSin(Sin[x] + 2*Sin(x - $\delta$)), I get answers that disagree with my numerical answers.

Numerically, I solve for zeros and find the one with a positive derivative in a 2-pi region.

Now I plot the phase-shift of $E_3$ as a function of $\delta$ (in blue) and compare it to $E_2$ (in purple): Is there a "formula" I can use to find this answer without having to trace through one of the zeros? I think the key when using something like ArcSin is using the right normalization (I think it only works for sine of amplitude 1), but I'm not sure exactly the proper way of doing it.

\begin{align} & \sin x + 2\sin(x+\delta) \\[10pt] = {} & \sin x + 2\sin x\cos\delta + 2\cos x \sin\delta \\[10pt] = {} & (1+2\cos\delta) \sin x + (2\sin\delta) \cos x \\[10pt] = {} & A\sin x + B\cos x \\[10pt] = {} & \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) \\[10pt] = {} & \sqrt{A^2+B^2\,\,} \big( \cos\varphi \sin x + \sin\varphi \cos x \big) \\ & \qquad \text{These coefficients can be written as the cosine and sine} \\ & \qquad \text{of some angle $\varphi$ because the sum of their squares is $1.$} \\[10pt] = {} & \sqrt{A^2+B^2\,\,} \, \sin(x+\varphi). \end{align}

In this case we have $$A^2+B^2 = (1+4\cos\delta + 4\cos^2\delta) + 4\sin^2\delta = 5 + 4\cos\delta.$$

We can write $E_1$ and $E_2$ as the imaginary parts of $e^{ix}$ and $2 e^{i(x+\delta)}$, and by linearity $E_1 + E_2$ will be the imaginary part of the sum of these two complex numbers:

$$e^{ix} + 2e^{i(x+\delta)} = e^{ix}(1 + 2 e^{i\delta}) = e^{ix}(1 + 2 \cos \delta + i 2 \sin \delta) = e^{ix}\left(\sqrt{1+ 4 \cos\delta + 4 \cos^2\delta + 4 \sin^2 \delta}e^{i\operatorname{atan2}(2\sin\delta,1+2\cos\delta)}\right)$$ $$= \sqrt{5+ 4 \cos\delta} e^{i[x + \operatorname{atan2}(2\sin\delta,1+2\cos\delta)]}.$$

Taking the imaginary part, we therefore find

$$E_1 + E_2 = \left(\sqrt{5+ 4 \cos\delta}\right) \sin\left(x + \operatorname{atan2} \left( 2\sin\delta, 1+2\cos\delta\right) \right),$$

so the phase-shift is given by

$$\operatorname{atan2}\left(2\sin\delta,1+2\cos\delta\right).$$

• Note the conspicuous typographical difference between $i\text{atan2}(\cdots)$ and $i\operatorname{atan2}(\cdots).$ With \operatorname{atan2} the amount of space to the left and right of $\operatorname{atan2}$ depends on the context. I edited this answer accordingly. $\qquad$ – Michael Hardy Aug 6 '18 at 4:46
• @MichaelHardy Thanks for the tip. – Matthew Kvalheim Aug 6 '18 at 5:32