# Why is this plotted summation of two sine functions not eveloped?

I am simply plotting a sum of two different sine waves:

$$x(t)=a\sin(\omega_0t)+b\sin((1+\epsilon)\omega_0t)$$

However, when I do this myself, the result is different:

I notice the red sum wave simply has the frequency of the higher frequency wave, and its amplitude's pattern follows the amplitude's pattern of the other one, not oscillates between $\pm g(t)=\pm\sqrt{a^2+b^2+2*a*b*\cos(\epsilon\omega_0*t)}$ as it theoretically should be.

Where did I do wrong? Here are the code input for MathStudio:

Slider([b, e], .1, 10, 0.1)
w=1;a=1
Plot(a*sin(w*x), color=PaleGreen)
Plot(b*sin((1+e)*w*x), color=LightBlue)
Plot(a*sin(w*x)+b*sin((1+e)*w*x), color=Crimson)
/*Plot(sqrt(a^2+b^2+2*a*b*cos(e*w*x)) */

• You should see the effect if you make $\epsilon << 1$ – WW1 Jul 1 '17 at 20:41
• When the two sine waves have almost the same frequency you get the upper graph. When one has much lower frequency than the other you get the lower graph. – md2perpe Jul 1 '17 at 23:35
• @WW1 why does that happen? The article uses $\epsilon=0.1$, which I also used, but I didn't see the expected result. – Ooker Jul 2 '17 at 4:52
• Why do you say you used the same number as the article? $10 \neq 0.1.$ If you have another attempt with the slider at the far left (so that $e = 0.1$) then you should be showing us that attempt instead of the one with $e=10.$ – David K Mar 24 at 19:22
• @DavidK sorry. At the time of posting I don't know the importance of $\epsilon$, so I just pick a random graph. – Ooker Mar 25 at 0:09