# Why, fundamentally, does adding sin graphs together always produce another sin graph?

Consider if you want to graph: $$6\cos x + 3\sin x$$. It produces another sin graph:

The green is the new graph.

I understand the auxiliary angle explanation. We can transform $$6\cos x + 3\sin x$$ into the form $$R\cos(x\pm\alpha)$$. Hence it must be a cos curve.

But I don't intuitively understand why. I don't see why adding 2 random sin/cos curves must give another sin curve. I can appreciate that the output must be repeating/regular, but I don't see why it must be a sin curve in particular.

It could be anything else! Any other squiggly line! Why does it happen to be a sin curve?

• $c_1\sin x+c_2\cos x$ is a family of solution of $y''+y=0$ Commented Aug 9 at 16:13
• Adding two periodic functions of commensurable periods yields a periodic function
– lhf
Commented Aug 9 at 16:14
• @Ihf yes I understand that. But why does the periodic function yeilded have to be a sin curve? Why couldn't it be some other random squiggly line? Commented Aug 9 at 16:15
• Your question has a hidden assumption that the two sin graphs have the same period. Otherwise it's not true. Commented Aug 10 at 0:46
• There's got to be an answer that formalizes the "these are in the same family of solutions to a second order ode & are demonstrably linearly superimposable" line of intuition I can't get out of my head
– neph
Commented Aug 10 at 5:48

Here is a geometric way to see this. $$6 \cos x + 3 \sin x$$ is the dot product $$(\cos x, \sin x) \cdot (6, 3)$$ between a unit vector $$v_x = (\cos x, \sin x)$$ tracing out the unit circle and another fixed vector $$u = (6, 3)$$. The dot product between a unit vector $$v_x$$ and an arbitrary vector $$u$$ computes the projection of $$u$$ onto the direction $$v_x$$. I don't have a good way of drawing a diagram of this (probably Desmos could do this) but try to draw this out on some paper.

So we want to understand why this projection is a translated sine or cosine. But geometrically this should be clear: when $$v_x$$ is parallel to $$u$$ the projection is $$\| u \|$$. Then when we start rotating it traces out a cosine; in fact it traces out

$$v_x \cdot u = \| u \| \cos \theta$$

where $$\theta = x - \arctan \frac{3}{6}$$ is the angle between the two vectors. You've probably seen this formula at some point but I want to be clear that it has a pretty straightforward geometric interpretation. The geometry tells us not only that we get a sine or cosine but what the meaning of the amplitude and the phase shift are; the amplitude is just the length $$\| u \|$$ and the phase shift accounts for the difference between the angles of $$v_x$$ and $$u$$.

Edit: Here's a simple animation in Desmos (it would be great to be able to embed these), with a preview image:

You may also prefer to think about this in terms of keeping the unit vector fixed and rotating the vector $$(6, 3)$$. Then it might be geometrically clearer what's going on although you do have to know how to rotate an arbitrary vector: the result of rotating $$(6, 3)$$ by an angle of $$x$$ counterclockwise is

$$(6 \cos x + 3 \sin x, -6 \sin x + 3 \cos x).$$

You can see this using rotation matrices, or complex numbers, or by computing dot products, or converting to polar coordinates: $$(6, 3)$$ in polar coordinates is $$(3 \sqrt{5}, \arctan \frac{1}{2})$$, and rotating this by $$x$$ gives $$(3 \sqrt{5}, \arctan \frac{1}{2} + x)$$. Converting back to cartesian coordinates gives us the above expression.

Then $$6 \cos x + 3 \sin x$$ is just the projection onto the $$x$$-axis of a rotating vector, which is just a cosine with offset angle as above.

Only sin graphs with the same period.

For me, geometric explanations are always the most intuitive. Sine is but the projection of a cyclical movement.

In the graph below, when the epicycle A moves clockwise from A to A', B moves the same degree relative to the vertical (cardinal) direction. Some geometry tells you that OB and OB' remain of the same length, hence the locus of B is still a cycle.

• IMO this is the intuitive answer I feel like the OP was looking for. Commented Aug 10 at 1:15
• Phase is important here. Commented Aug 10 at 5:49

It helps if you see it through the lens of differential equations and linear algebra.

The point is that the sinusoidal functions of a given period are the solutions to the differential equation $$y''(t) = -\omega^2 y(t)$$ and so form a vector space. The solutions are the functions of the form $$y(t) = a \cos(\omega t) + b \sin(\omega t)$$, and they can also be written as $$y(t) = a\cos(\omega t+C)$$ or $$y(t) = a \sin(\omega t+C)$$; these obey $$y''=-y$$, and conversely, if $$y''(t) = -y(t)$$, we can write it in this form: $$y(t)$$ must achieve a maximum at some point $$y(C) = A$$ (since it's periodic) and then letting $$f(t) = y(t+C)$$, $$f(t)$$ obeys $$f''(t) = -f(t)$$, $$f(0) = A$$, $$f'(0) = 0$$ implies $$f(t) = A \cos(\omega t)$$ and so $$y(t) = A\cos(\omega(t-C)$$.

tl;dr The space of solutions to $$y'' = -\omega^2y$$ is $$\{a \cos(\omega t) + b \sin(\omega t) | a,b \in \mathbb{R}\} = \{A \cos(\omega t+C) | A, C \in \mathbb{R}\}$$

and this forms a vector space, since they are the solutions of a linear, homogenous DE, so adding any two functions of this form and you get another.

If $$A$$ is the total length of your arm and axe handle, and $$x$$ is the angle your arm makes with the ground, then the height of the end of the axe handle above the ground is: $$A\sin x$$.

If the blade of the axe makes a right angle with the handle, and has length $$B$$, then the height of the tip of the blade above the end of the axe handle will be $$B\cos x$$.

Thus $$A\sin x +B \cos x$$ is just the height of the tip of the blade. Clearly this is also $$\sqrt{A^2+B^2}\sin(x+\theta)$$.

• Not only does this explain why you get a sinusoidal function (if both functions in the sum have the same period), it also gives you a fine geometric way to decide exactly what the sum function is. Commented Aug 11 at 16:03

$$\def\ed{\stackrel{\text{def}}{=}}$$ As R.. GitHub STOP HELPING ICE notes in a comment, and athanos lee mentions in his answer, a linear combination of sine functions is another sinusoidal function only if the two functions have the same frequency. When the frequencies of the two sine functions differ, the resulting sine-like function varies periodically in amplitude between the difference between the amplitudes of the two summands and the sum of their amplitudes, with a frequency equal to the difference between their frequencies. This variation in amplitude is referred to as a "beat". The same device of rotating lines used in several of the other answers can be used to give a nice geometrical explanation of this more general case.

In the diagram below, the points $$\ F\$$ and $$\ G\$$ are revolving around the origin at fixed distances, $$\ A\$$ and $$\ B\ ,$$ respectively, with $$\ A\ge B\ ,$$ and with fixed angular velocities, $$\ \omega_1\$$ and $$\ \omega_2\$$ radians per unit time, respectively. At $$\ t=0\ ,\ F\$$ was located on the $$\ x-$$axis, at $$\ (A,0) ,$$ while $$\ G\$$ was located at the point $$\ (B\cos\varphi,B\sin\varphi)\ .$$ At time $$\ t\ ,$$ the $$\ y-$$coordinates of $$\ F\$$ and $$\ G\$$ will therefore be $$\ A\sin\big(\omega_1t\big)\$$ and $$\ B\sin\big(\omega_2t+\varphi\big)\ ,$$ respectively. If $$\ \vec{OH}\ed\,\vec{OF}+\vec{OG}=\vec{OF}+\vec{FH}\ ,$$ then the $$\ y-$$coordinate of $$\ H\$$ will be the sum, $$\ A\sin\big(\omega_1t\big)+B\sin\big(\omega_2t+\varphi\big)\ ,$$ of those of $$\ F\$$ and $$\ G\ .$$

On the other hand, $$\ H\$$ revolves around $$\ O\$$ with a variable angular velocity $$\ \omega_1+\theta'(t)\ ,$$ where $$\ \theta(t)=\angle FOH^\color{red}{\dagger}\ ,$$ and its distance, $$\ L(t)\$$ say, from $$\ O\$$ also varies. Therefore, its $$\ y-$$coordinate is also equal to $$\ L(t)\sin\big(\omega_1t+\theta(t)\big)\ ,$$ and this is not a sinusoidal function unless $$\ \omega_1=\omega_2\ .$$ Since $$\ FH\$$ is parallel to $$\ OG\ ,$$ it follows that the angle between the extension of the line segment $$\ OF\$$ and the line segment $$\ FH\$$ is the same as $$\ \angle GOH=\,\big(\omega_1-\omega_2\big)t-\varphi\ .$$ Thus, if $$\ \omega_1\ne\omega_2\ ,$$ then the line segment $$\ FG\$$ rotates around the (moving) point $$\ F\$$ with a fixed angular velocity $$\ \big|\omega_1-\omega_2\big|\$$ relative to the line segment $$\ OF\ .$$ The rotation will be clockwise if $$\ \omega_1<\omega_2\ ,$$ or anticlockwise if $$\ \omega_1>\omega_2\ .$$ It's clear, therefore, that $$\ L(t)\$$ then oscillates with period $$\ \frac{2\pi}{|\omega_1-\omega_2|}\$$ between a minimum of $$\ A-B\$$ and a maximum of $$\ A+B\ .$$ Likewise, $$\ \theta(t)\$$ oscillates with the same period between a minimum of $$\ {-}\arcsin\left(\frac{B}{A}\right)\$$ and a maximum of $$\ \arcsin\left(\frac{B}{A}\right)^\color{red}{\dagger\dagger}\ .$$ The functions $$\ L(t)\$$ and $$\ \theta(t)\$$ are in fact given by \begin{align} L(t)&=\sqrt{A^2+B^2+2AB\cos\big(\big(\omega_1-\omega_2\big)t-\varphi\big)}\\ \theta(t)&=\sigma(t)\arccos\left(\frac{A^2+L(t)^2-B^2}{2AL(t)}\right)\\ &\hspace{-1em}=\sigma(t)\arccos\left(\frac{A+B\cos\big(\big(\omega_1-\omega_2\big)t-\varphi\big)}{\sqrt{A^2+B^2+2AB\cos\big(\big(\omega_1-\omega_2\big)t-\varphi\big)}}\right)\ , \end{align} where \begin{align} \sigma(t)&\ed\cases{1&if \ 0<\big(\omega_1-\omega_2\big)-\varphi\pmod{2\pi}<\pi\\ 0&if \ \big(\omega_1-\omega_2\big)-\varphi\pmod{2\pi}\in\{0,\pi\} \\ -1&if \ \pi<\big(\omega_1-\omega_2\big)-\varphi\pmod{2\pi}}\\ &=\text{sgn}\left(\sin\big(\big(\omega_1-\omega_2\big)t-\varphi\big)\right)\ . \end{align} The sign factor $$\ \sigma(t)\$$ in the above expression is necessary because the arccos function is non-negative for all the values assumed by its argument, whereas $$\ \theta(t)\$$ is negative whenever $$\ \pi<\big(\big(\omega_1-\omega_2\big)-\,\varphi\big)\pmod{2\pi}\ .$$

If $$\ \omega_1=\omega_2\ ,$$ then $$\ L(t)\$$ and $$\ \theta(t)\$$ are both constant , the length of the line $$\ OH\$$ remains fixed, it rotates about $$\ O\$$ with constant angular velocity, and the $$\ y-$$coordinate of $$\ H\$$ is then a sinusoidal function of time, $$\ L\sin\big(\omega_1t+\theta)\ ,$$ the case treated in all the other answers.

Here's a Desmos animation to illustrate the case $$\ \omega_1\ne\omega_2\ ,$$ and here's one to illustrate the case $$\ \omega_1=\omega_2\ .$$

There's one other special case that deserves mention. When $$\ A=B\$$ the function $$\ \theta(t)\$$ simplifies to $$\ \frac{(\omega_2-\omega_1)t+\varphi}{2}\ ,\ L(t)\$$ simplifies to $$\ 2A\cos\left(\frac{(\omega_2-\omega_1)t-\varphi}{2}\right)\ ,$$ and the $$\ y-$$coordinate of $$\ H\$$ becomes $$2A\cos\left(\frac{(\omega_2-\omega_1)t-\varphi}{2}\right)\sin\left(\frac{(\omega_2+\omega_1)t+\varphi}{2}\right)\ .\tag{1}\label{e1}$$ This is almost invariably the only case treated in a typical introduction to the phenomenon of beats. As the Wikipedia article on beats says, the expression \eqref{e1} can be thought of as "a carrier wave of frequency ⁠$$\ \frac{f_1+f_2}{2}\$$ ⁠ whose amplitude is modulated by an envelope wave of frequency ⁠ ⁠$$\ \frac{f_1-f_2}{2}\$$" $$\left(\text{where }\ f_i\ed\frac{\omega_i}{2\pi}\right).$$ This is a little misleading, however, since it tends to leave one with the impression that the "carrier wave" in the general case will also be one with frequency ⁠$$\ \frac{f_1+f_2}{2}\ ,$$ whereas this is true only when the amplitudes of the two summands are exactly equal.

In the diagram below, the carrier waves $$\ \sin\left(\frac{(\omega_2+\omega_1)t+\varphi}{2}\right)\$$ for the case $$\ \frac{A}{B}=1\$$ and $$\ \sin\big(\omega_1t+\theta(t)\big)\$$ for the case ⁠$$\ \frac{A}{B}=\frac{5}{3}\$$ are plotted on the same axes, with $$\ \varphi=0, \omega_1=3\$$ and $$\ \omega_2=3.3\ .$$ Note that over two periods, $$\ 2\times\left(\frac{2\pi}{\omega_2-\omega_1}\right)\approx41.9\$$ time units, of the envelope function, there are exactly $$21$$ peaks and troughs of the function $$\ \sin\left(\frac{(\omega_2+\omega_1)t}{2}\right)\ ,$$ but only $$20$$ of the function $$\ \sin\big(\omega_1t+\theta(t)\big)\ .$$ Also, while there are exactly $$10$$ peaks and troughs of the function $$\ \sin\big(\omega_1t+\theta(t)\big)\$$ over a single period of the envelope function, making it look very much like a sine wave with period $$\ \frac{2\pi}{\omega_1}\ ,$$ the sizes of the intervals between successive peaks and troughs are not the same, its true period is $$\ \frac{2\pi}{\omega_2-\omega_1}\ ,$$ and it is not in fact an exact sinusoidal function at all.

Here's a link to a Desmos animation to illustrate this special case.

$$\,^\color{red}{\dagger}$$ Bear in mind that the value of $$\ \theta(t)\$$ depicted in the diagram is negative.

$$\,^\color{red}{\dagger\dagger}$$ These extrema occur when the lines $$\ FH\$$ and $$\ OH\$$ are perpendicular.

Hint.

Assuming you know the Moivre's identity: taking

$$\cases{ y_r = a_1\sin x + a_2\cos x\\ y_i = b_1\sin x + b_2\cos x }$$

we have

$$y = y_r + i y_i = c_1 e^{i x}+c_2 e^{i x + i \phi_0} = (c_1 + c_2 e^{i\phi_0})e^{i x}$$

or also:

Given two numbers

$$\cases{ z_1 = \|z_1\| e^{i (x+\phi_1)}\\ z_2 = \|z_2\| e^{i (x+\phi_2)}\\ }\Rightarrow z_1+z_2 = z_3 = \|z_3\|e^{i(x+\phi_3)}$$

Another way more direct:

$$\cases{ a_1 \cos (x)+a_2\sin (x)=\sqrt{a_1^2+a_2^2} \left(\frac{a_1 \cos(x)}{\sqrt{a_1^2+a_2^2}}+\frac{a_2 \sin (x)}{\sqrt{a_1^2+a_2^2}}\right) \\ = \sqrt{a_1^2+a_2^2} \left(\sin\phi\cos(x)+\cos\phi \sin (x)\right)\\ =\sqrt{a_1^2+a_2^2} \sin (\phi +x) }$$

hence

$$6 \cos (x)+3 \sin (x)=3 \sqrt{5} \sin \left(x+\tan ^{-1}(2)\right)$$

• This isn't so intuitive though - at least not to novices. Commented Aug 11 at 0:20
• @Trunk - it is essentially the same as athanos lee's geometric argument, looked at a different way Commented Aug 11 at 12:37

A sinusoid can be seen as the projection of a rotating vector onto the axis $$y$$.

If you consider several vectors rotating at the same angular speed, they form a rigid system. Their sum will also be a vector rotating at the same speed and project to a sinusoid.

• Well-stated; this is the best (and shortest) answer so far. Commented Aug 18 at 15:30
• @user3716267: thank you. I have no merit; I am unable to write long answers. :) Commented Aug 18 at 15:31

Take simple case of $$z = \sin{ax} + \sin{bx}$$ where $$a/b$$ is rational.

Both of these sinusoids start at $$x = 0$$ and $$\sin{ax} = \sin{bx} = 0$$

Now there will be some integral number of cycles of the sinusoid with the smaller period such that it will equal an integral number of sinusoids of the function with the larger period.

At this value of $$x$$, e.g.

$$x_p = N_{1}\frac{2\pi}{a} = N_{2}\frac{2\pi}{b}$$ where $$N_1, N_2 \in N$$

we will have the two sinusoids back together again with $$\sin{ax} = \sin{bx} = 0$$ again and at the end of their cycles.

After this all we get from $$z$$ is a repetition of however $$z$$ varies (and it might be quite zig-zaggy) between $$x = 0$$ and $$x = x_p$$.

In other words, we get a periodic function.

Now, changing the amplitudes and phase differences of the two sinusoids will change the shape and the offset from zero of the curve within period of $$z$$ but it won't change its period value.

So any pair of single-power sinusoids of the form

$$z = A \sin{(ax + a_1)} + B\sin{(bx + b_1)}$$

will also have to be periodic.

If you make a simple sketch of $$z = \sin{x} + \sin{2x}$$ to illustrate this, it's a bit clearer.

Where the two sinusoids have the same period - as in your given example - the resultant will also have this same period. Inspection of your example shows it to be symmetrical as the period is the same, regardless of the phase offset, here $$\pi$$/2.