# Tag Archives: envelope curves

## Envelope Curves

My precalculus class recently returned to graphs of sinusoidal functions with an eye toward understanding them dynamically via envelope curves:  Functions that bound the extreme values of the curves. What follows are a series of curves we’ve explored over the past few weeks.  Near the end is a really cool Desmos link showing an infinite progression of periodic envelopes to a single curve–totally worth the read all by itself.

GETTING STARTED

As a simple example, my students earlier had seen the graph of $f(x)=5+2sin(x)$ as $y=sin(x)$ vertically stretched by a magnitude of 2 and then translated upward 5 units.  In their return, I encouraged them to envision the function behavior dynamically instead of statically.  I wanted them to see the curve (and the types of phenomena it could represent) as representing dynamic motion rather than a rigid transformation of a static curve.  In that sense, the graph of f oscillated 2 units (the coefficient of sine in f‘s equation) above and below the line $y=5$ (the addend in the equation for f).  The curves $y=5+2=7$ and $y=5-2=3$ define the “Envelope Curves” for $y=f(x)$.

When you graph $y=f(x)$ and its two envelope curves, you can picture the sinusoid “bouncing” between its envelopes.  We called these ceiling and floor functions for f.  Ceilings happen whenever the sinusoid term reaches its maximum value (+1), and floors when the sinusoidal term is at its minimum (-1).

Those envelope functions would be just more busy work if it stopped there, though.  The great insights were that anything you added to a sinusoid could act as a midline with the coefficient, AND anything multiplied by the sinusoid is its amplitude–the distance the curve moves above and below its midline.  The fun comes when you start to allow variable expressions for the midline and/or amplitudes.

VARIABLE MIDLINES AND ENVELOPES

For a first example, consider $y= \frac{x}{2} + sin(x)$.  By the reasoning above, $y= \frac{x}{2}$ is the midline.  The amplitude, 1, is the coefficient of sine, so the envelope curves are $y= \frac{x}{2}+1$ (ceiling) and $y= \frac{x}{2}-1$ (floor).

That got their attention!  Notice how easy it is to visualize the sine curve oscillating between its envelope curves.

For a variable amplitude, consider $y=2+1.2^{-x}*sin(x)$.  The midline is $y=2$, with an “amplitude” of $1.2^{-x}$.  That made a ceiling of $y=2+1.2^{-x}$ and a floor of $y=2-1.2^{-x}$, basically exponential decay curves converging on an end behavior asymptote defined by the midline.

SINUSOIDAL MIDLINES AND ENVELOPES

Now for even more fun.  Convinced that both midlines and amplitudes could be variably defined, I asked what would happen if the midline was another sinusoid?  For $y=cos(x)+sin(x)$, we could think of $y=cos(x)$ as the midline, and with the coefficient of sine being 1, the envelopes are $y=cos(x)+1$ and $y=cos(x)-1$.

Since cosine is a sinusoid, you could get the same curve by considering $y=sin(x)$ as the midline with envelopes $y=sin(x)+1$ and $y=sin(x)-1$.  Only the envelope curves are different!

The curve $y=cos(x)+sin(x)$ raised two interesting questions:

1. Was the addition of two sinusoids always another sinusoid?
2. What transformations of sinusoidal curves could be defined by more than one pair of envelope curves?

For the first question, they theorized that if two sinusoids had the same period, their sum was another sinusoid of the same period, but with a different amplitude and a horizontal shift.  Mathematically, that means

$A*cos(\theta ) + B*sin(\theta ) = C*cos(\theta -D)$

where A & B are the original sinusoids’ amplitudes, C is the new sinusoid’s amplitude, and D is the horizontal shift.  Use the cosine difference identity to derive

$A^2 + B^2 = C^2$  and $\displaystyle tan(D) = \frac{B}{A}$.

For $y = cos(x) + sin(x)$, this means

$\displaystyle y = cos(x) + sin(x) = \sqrt{2}*cos \left( x-\frac{\pi}{4} \right)$,

and the new coefficient means $y= \pm \sqrt{2}$ is a third pair of envelopes for the curve.

Very cool.  We explored several more sums and differences with identical periods.

WHAT HAPPENS WHEN THE PERIODS DIFFER?

Try a graph of $g(x)=cos(x)+cos(3x)$.

Using the earlier concept that any function added to a sinusoid could be considered the midline of the sinusoid, we can picture the graph of g as the graph of $y=cos(3x)$ oscillating around an oscillating midline, $y=cos(x)$:

IF you can’t see the oscillations yet, the coefficient of the $cos(3x)$ term is 1, making the envelope curves $y=cos(x) \pm 1$.  The next graph clear shows $y=cos(3x)$ bouncing off its ceiling and floor as defined by its envelope curves.

Alternatively, the base sinusoid could have been $y=cos(x)$ with envelope curves $y=cos(3x) \pm 1$.

Similar to the last section when we added two sinusoids with the same period, the sum of two sinusoids with different periods (but the same amplitude) can be rewritten using an identity.

$cos(A) + cos(B) = 2*cos \left( \frac{A+B}{2} \right) * cos \left( \frac{A-B}{2} \right)$

This can be proved in the present form, but is lots easier to prove from an equivalent form:

$cos(x+y) + cos(x-y) = 2*cos(x) * cos(y)$.

For the current function, this means $y = cos(x) + cos(3x) = 2*cos(x)*cos(2x)$.

Now that the sum has been rewritten as a product, we can now use the coefficient as the amplitude, defining two other pairs of envelope curves.  If $y=cos(2x)$ is the sinusoid, then $y= \pm 2cos(x)$ are envelopes of the original curve, and if $y=cos(x)$ is the sinusoid, then $y= \pm 2cos(2x)$ are envelopes.

In general, I think it’s easier to see the envelope effect with the larger period function.  A particularly nice application connection of adding sinusoids with identical amplitudes and different periods are the beats musicians hear from the constructive and destructive sound wave interference from two instruments close to, but not quite in tune.  The points where the envelopes cross on the x-axis are the quiet points in the beats.

A STUDENT WANTED MORE

In class last Friday, my students were reviewing envelope curves in advance of our final exam when one made the next logical leap and asked what would happen if both the coefficients and periods were different.  When I mentioned that the exam wouldn’t go that far, she uttered a teacher’s dream proclamation:  She didn’t care.  She wanted to learn anyway.  Making up some coefficients on the spot, we decided to explore $f(x)=2sin(x)+5cos(2x)$.

Assuming for now that the cos(2x) term is the primary sinusoid, the envelope curves are $y=2sin(x) \pm 5$.

That was certainly cool, but at this point, we were no longer satisfied with just one answer.  If we assumed sin(x) was the primary sinusoid, the envelopes are $y=5cos(2x) \pm 2$.

Personally, I found the first set of envelopes more satisfying, but it was nice that we could so easily identify another.

With the different periods, even though the  coefficients are different, we decided to split the original function in a way that allowed us to use the $cos(A)+cos(B)$ identity introduced earlier.  Rewriting,

$f(x)=2sin(x)+5cos(2x) = 2cos \left( x - \frac{ \pi }{2} \right) + 2cos(2x) + 3cos(2x)$ .

After factoring out the common coefficient 2, the first two terms now fit the $cos(A) + cos(B)$ identity with $A = x - \frac{ \pi }{2}$ and $B=2x$, allowing the equation to be rewritten as

$f(x)= 2 \left( 2*cos \left( \frac{x - \frac{ \pi }{2} + 2x }{2} \right) * cos \left( \frac{x - \frac{ \pi }{2} - 2x }{2} \right) \right) + 3cos(2x)$

$\displaystyle = 4* cos \left( \frac{3}{2} x - \frac{ \pi }{4} \right) * cos \left( - \frac{1}{2} x - \frac{ \pi }{4} \right) + 3cos(2x)$.

With the expression now containing three sinusoidal expressions, there are three more pairs of envelope curves!

Arguably, the simplest approach from this form assumes $cos(2x)$ from the $latex$3cos(2x)\$ term as the sinusoid, giving $y=2sin(x)+2cos(2x) \pm 3$ (the pre-identity form three equations earlier in this post) as envelopes.

We didn’t go there, but recognizing that new envelopes can be found simply by rewriting sums creates an infinite number of additional envelopes.  Defining these different sums with a slider lets you see an infinite spectrum of envelopes.  The image below shows one.  Here is the Desmos Calculator page that lets you play with these envelopes directly.

If the $cos \left( \frac{3}{3} x - \frac{ \pi}{4} \right)$term was the sinusoid, the envelopes would be $y=3cos(2x) \pm 4cos \left( - \frac{1}{2} x - \frac{ \pi }{4} \right)$.  If you look closely, you will notice that this is a different type of envelope pair with the ceiling and floor curves crossing and trading places at $x= \frac{\pi}{2}$ and every $2\pi$ units before and after.  The third form creates another curious type of crossing envelopes.

CONCLUSION:

In all, it was fun to explore with my students the many possibilities for bounding sinusoidal curves.  It was refreshing to have one student excited by just playing with the curves to see what else we could find for no other reason than just to enjoy the beauty of these periodic curves.  As I reflected on the overall process, I was even more delighted to discover the infinite spectrum of envelopes modeled above on Desmos.

I hope you’ve found something cool here for yourself.