Fun with Waves and Functions

Rob Mason
Olney Central College

masonr@iecc.edu

Introduction

This exercise deals with the graphs of sinusoidal waves.  Students will learn the general form of the time independent sinusoidal function.  They will explore the manner in which changes in the general form alter the graph of the function.  Next, the students will also be introduced to the form of a time-dependent sinusoidal function.  They will animate graphs to observe how a time-dependent wave moves along its axis.  Finally, the students will investigate how both time-independent and time-dependent waves can be combined into composite waves.  They will then be given the opportunity to further explore these ideas with both periodic and non-periodic functions.

Form of a Sinusoidal Function

The most common form for a sinusoidal function is given by f(x)=A sin [B(x-C)] + D.  The constant A is the amplitude of the function.  The constant B determines the period of the wave.  The period, T, is defined as \(TraditionalForm\`\(2  π\)\/\(\(|\)\(B\)\(|\)\)\), where 2π is the natural period for the sine or cosine function.  Phase shift is determined by the constant C.  Vertical shift is controlled by the constant D.  Let's start out with a very simple sine function, and examine the effects of these contants one at a time.

You may change the plot window for the graph within the Plot command.  The combination {x, 0, 2} will graph the function of x from zero to two.  A PlotRange of {-2, 2} will set the lower limit of the y-axis at -2, and the upper limit at 2.  Feel free to alter these values so that your graphs are fully visible.

First, the amplitude of the wave

Examine the graphs of the following functions:

Clear[f1,  f2,  f3,  x];
f1[x_] := Sin[π*x];
f2[x_] := 2  Sin[π*x];
f3[x_] := 0.5*Sin[π*x];
Plot[f1[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f1[x]"}, 
        PlotLabel -> "Sin[πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[f2[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f2[x]"}, 
        PlotLabel -> "2Sin[πx]", 
        PlotStyle -> {RGBColor[1, 0, 0], 
            Thickness[0.01]}];
Plot[f3[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f3[x]"}, 
        PlotLabel -> "0.5Sin[πx]", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];

Now, look at the same functions on a single graph:

Plot[{f1[x], f2[x], f3[x]}, {x, 0, 2}, 
        PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f[x]"}, 
        PlotStyle -> {{RGBColor[0, 1, 0], 
              Thickness[0.01]}, {RGBColor[1, 0, 0], 
              Thickness[0.01]}, {RGBColor[0, 0, 1], 
              Thickness[0.01]}}];

How does the value of A affect the graphs?

Define f1[x], f2[x] and f3[x] so that f2[x] is three times the height of f1[x] and f3[x] is twice the height of f2[x].  Graph your results.

What would happen to your graphs if A was a negative number?  Test your prediction with the functions that you defined.

Second, the period of the wave

Examine the graphs of the following functions:

Clear[f1,  f2,  f3,  x];
f1[x_] := Sin[π*x];
f2[x_] := Sin[2*(π*x)];
f3[x_] := Sin[(1/2)*(π*x)];
Plot[f1[x], {x, 0, 2}, PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f1[x]"}, 
        PlotLabel -> "Sin[πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[f2[x], {x, 0, 2}, PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f2[x]"}, 
        PlotLabel -> "Sin[2(πx)]", 
        PlotStyle -> {RGBColor[1, 0, 0], 
            Thickness[0.01]}];
\(\(Plot[f3[x], {x, 0, 2}, PlotRange -> {\(-1\), 1}, 
        AxesLabel -> {"x", "f3[x]"}, 
        PlotLabel -> \*""Sin[\!\(1\/2\)(πx)]"", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];\)\)

Now, look at the same functions on a single graph:

Plot[{f1[x], f2[x], f3[x]}, {x, 0, 2}, 
        PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f[x]"}, 
        PlotStyle -> {{RGBColor[0, 1, 0], 
              Thickness[0.01]}, {RGBColor[1, 0, 0], 
              Thickness[0.01]}, {RGBColor[0, 0, 1], 
              Thickness[0.01]}}];

How does the value of B affect the graphs?

The function f1[x] represents a single period of the sine function.  What do f2[x] and f3[x] represent?

Change the constant B so that f2[x] displays five periods and f3[x] displays a quarter of a period.  Graph the functions.

Third, the phase shift of the wave

Examine the graphs of the following functions:

Clear[f1,  f2,  f3,  x];
f1[x_] := Sin[π*x];
f2[x_] := Sin[π*x + 1];
f3[x_] := Sin[π*x - 1];
Plot[f1[x], {x, 0, 2}, PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f1[x]"}, 
        PlotLabel -> "Sin[πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[f2[x], {x, 0, 2}, PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f2[x]"}, 
        PlotLabel -> "Sin[πx+1]", 
        PlotStyle -> {RGBColor[1, 0, 0], 
            Thickness[0.01]}];
Plot[f3[x], {x, 0, 2}, PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f3[x]"}, 
        PlotLabel -> "Sin[πx-1]", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];

Now, look at the same functions on a single graph:

Plot[{f1[x], f2[x], f3[x]}, {x, 0, 2}, 
        PlotRange -> {-1, 1}, 
        AxesLabel -> {"x", "f[x]"}, 
        PlotStyle -> {{RGBColor[0, 1, 0], 
              Thickness[0.01]}, {RGBColor[1, 0, 0], 
              Thickness[0.01]}, {RGBColor[0, 0, 1], 
              Thickness[0.01]}}];

How does the value of C affect the graphs?

Define f2[x] and f3[x] so that f2[x] is shifted three units to the left of f1[x] and f3[x] is shifted three units to the right of f1[x].  Graph your results.

Next, the vertical shift of the wave

Examine the graphs of the following functions:

Clear[f1,  f2,  f3,  x];
f1[x_] := Sin[π*x];
f2[x_] := Sin[π*x] + 1;
f3[x_] := Sin[π*x] - 1;
Plot[f1[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f1[x]"}, 
        PlotLabel -> "Sin[πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[f2[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f2[x]"}, 
        PlotLabel -> "Sin[πx]+1", 
        PlotStyle -> {RGBColor[1, 0, 0], 
            Thickness[0.01]}];
Plot[f3[x], {x, 0, 2}, PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f3[x]"}, 
        PlotLabel -> "Sin[πx]-1", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];

Now, look at the same functions on a single graph:

Plot[{f1[x], f2[x], f3[x]}, {x, 0, 2}, 
        PlotRange -> {-2, 2}, 
        AxesLabel -> {"x", "f[x]"}, 
        PlotStyle -> {{RGBColor[0, 1, 0], 
              Thickness[0.01]}, {RGBColor[1, 0, 0], 
              Thickness[0.01]}, {RGBColor[0, 0, 1], 
              Thickness[0.01]}}];

How does the value of D affect the graphs?

Define f2[x] and f3[x] so that f2[x] is shifted (1/2) unit down and f3[x] is shifted one unit up.  Graph your results.

Finally, putting it all together

\(Here\ is\ the\ graph\ of\ a\ standard\ sine\ function\ along\ with\ the\ the\ graph\ of\ the\ function\ transformed\ so\ that\ it\ is\ three\ times\ the\ height, \ \(1\/\(\(3\)\(\ \)\)\) 
      the\ width\ \((three\ times\ the\ period)\), \ 
    shifted\ 1.5\ units\ to\ the\ left\ and\ two\ units\ \(\(down\)\(.\)\)\)

Clear[f1,  f2,  x];
f1[x_] := Sin[π*x];
f2[x_] := 
        3*Sin[(1/3)*(π*x + 1.5)] - 2;
Plot[{f1[x], f2[x]}, {x, 0, 9}, PlotRange -> {-5, 5}, 
        AxesLabel -> {"x", "f[x]"}, 
        PlotStyle -> {{RGBColor[0, 1, 0], 
              Thickness[0.01]}, {RGBColor[1, 0, 0], 
              Thickness[0.01]}}];

Define and graph a function,  f3[x],  
    that is half of the height ,  
    shifted two units to the right,  (1/2) the period,  
    and shifted 1.5 units down (compared to f1[
              x]).

Waves on the Move

The common form for a function of position and time that describes a sinusoidal wave of period T and wavelength λ is D(x,t) = A sin (kx - ωt + (Subscript[ϕ, o])) where A is the wave amplitude, k is the wave number ( k = ((2  π)/λ)),  ω is the angular frequency ( ω = ((2  π)/T)), and (Subscript[ϕ, o]) is the phase constant.  Notice that the form is similar to f(x) = A sin [B(x - C)] + D.  The ωt term leads to a horizontal shift that is a function of time which gives the wave its motion.  The phase constant also leads to a phase shift, but it is a fixed value that determines the starting point of the wave.  We use the D(x,t) model in order to describe naturally occuring phenomena such as sound, light, or mechanical vibration.

First, let's look at time-independent waves (t = 0)

Examine the graphs of the following functions:

Clear[f, g, x];
f[x_] := 3*Sin[π*x];
g[x_] := 3*Sin[3*π*x];
Plot[f[x], {x, 0, 2}, AxesLabel -> {"x", "f[x]"}, 
        PlotLabel -> "3Sin[πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[g[x], {x, 0, 2}, AxesLabel -> {"x", "g[x]"}, 
        PlotLabel -> "3Sin[3πx]", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];

How does changing from 'πx' to '3πx' alter the graph?

Does the starting position of the graph change for either graph?

Substitute different values for both 'A' and 'k 'in f[x] and g[x].  Notice how the changes affect the graphs.  Are your results any different than what you would have expected using the f(x) = A sin [B(x - C)] + D form?

Next, we will examine a horizontal phase shift (t = 0 and (Subscript[ϕ, o]) ≠ 0)

Examine the graphs of the following functions:

Clear[f,  g,  h,  x];
f[x_] := 3*Sin[3*π*x];
g[x_] := 3*Sin[3*π*x - 1];
h[x_] := 3*Sin[3*π*x + 1];
Plot[f[x], {x, 0, 2}, AxesLabel -> {"x", "f[x]"}, 
        PlotLabel -> "3Sin[3πx]", 
        PlotStyle -> {RGBColor[0, 1, 0], 
            Thickness[0.01]}];
Plot[g[x], {x, 0, 2}, AxesLabel -> {"x", "g[x]"}, 
        PlotLabel -> "3Sin[3πx-1]", 
        PlotStyle -> {RGBColor[0, 0, 1], 
            Thickness[0.01]}];
Plot[h[x], {x, 0, 2}, AxesLabel -> {"x", "h[x]"}, 
        PlotLabel -> "3Sin[3πx+1]", 
        PlotStyle -> {RGBColor[1, 0, 0], 
            Thickness[0.01]}];

How do the second and third graphs differ from the first?

Substitute different values for '(Subscript[ϕ, o])' in g[x] and h[x].  Notice how the changes affect the graphs.

How is (Subscript[ϕ, o]) similar to the constant C in the f(x) = A sin [B (x  -  C)] + Dform?  How is it different?

Now, look at what happens with a traveling wave (t ≠ 0)

Examine the graphs of the following function.  Animate the graphs by highlighting the cell brackets to the right of the graphs, going to the Cell menu, and selecting Animate Selected Graphics.

Clear[f, x, t];
f[x_, t_] := 3*Sin[3*π*x - π*t];
Table[
      Plot[f[x, t], {x, 0, 2}, PlotRange -> {-3, 3}, 
        PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.01]}, 
        AxesLabel -> {"x", "D[x,t]"}, 
        PlotLabel -> {"f[x,t]"}], {t, 0, 6,  .25}]

What is demonstrated by animating the graphs?

Now, animate the next set of graphs.

Clear[g, x, t];
g[x_, t_] := 3*Sin[3*π*x + π*t];
Table[
      Plot[g[x, t], {x, 0, 2}, PlotRange -> {-3, 3}, 
        PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.01]}, 
        AxesLabel -> {"x", "D[x,t]"}, 
        PlotLabel -> {"g[x,t]"}], {t, 0, 6,  .25}]

How does the animation of the graphs for g[x,t] differ from those of f[x,t]?

Try different variations of the functions by changing 'A', 'k', and 'ω'.  You may also want to try changing the upper limit of 't' or the increment of 't' [The last two numbers in {t, 0, 6, .25}].  Animate your results, and note the changes.

Now that we have discussed both time-dependent and time-independent waves behave when their properties are varied.  Now let us look at the interaction between two waves.

Superposition of Waves

One wave characteristic is the ability of two or more waves to combine to form a single wave.  The resulting wave can either have a greater amplitude (constructive interference) or a smaller amplitude (destructive interference).  We will examine how the resulting wave changes as ω, k, (Subscript[ϕ, o]) and direction change.

First, we will examine two waves with the same ω and k values that are traveling in opposite directions.

Animate the following set of graphs.

Clear[f, g, x, t];
f[x_, t_] := 3*Sin[3*π*x - π*t];
g[x_, t_] := 3*Sin[3*π*x + π*t];
Table[
      Plot[f[x, t] + g[x, t], {x, 0, 2}, PlotRange -> {-6, 6}, 
        PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.01]}, 
        AxesLabel -> {"x", "D[x,t]"}, 
        PlotLabel -> {"f[x,t]+g[x,t]"}], {t, 0, 
        6,  .25}]

What happens to the amplitude of the wave?

Does this wave appear to move?  Explain this behavior.

Change the amplitude of f[x,t] or g[x,t], and animate the resulting graphs.  How do the results change?

Next, let's combine waves that differ by a phase constant.

Animate the next set of graphs.

Clear[f, g, x, t];
f[x_, t_] := 
        3*Sin[3*π*x - 2*π*t + 0];
g[x_, t_] := 
        3*Sin[3*π*x - 2*π*t];
Table[
      Plot[f[x, t] + g[x, t], {x, 0, 2}, PlotRange -> {-6, 6}, 
        PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.01]}, 
        AxesLabel -> {"x", "D[x,t]"}, 
        PlotLabel -> {"f[x,t]+g[x,t]"}], {t, 0, 
        6,  .25}]

What is the amplitude of the resulting traveling wave?

Change the phase constant for f[x,t] from 0 to 1 and animate the resulting graphs.  How did the amplitude of the wave change?

Repeat the last step for phase constants of 2, 3, π and 4.  Do you notice a trend in the wave amplitudes as the phase constant changes?

Now we will examine two waves with no phase difference, but different values of k and ω.

Animate the graphs below.

Clear[f, g, x, t];
f[x_, t_] := 
        3*Sin[3*π*x - 2*π*t];
g[x_, t_] := 
        3*Sin[2*π*x - 3*π*t];
Table[
      Plot[f[x, t] + g[x, t], {x, 0, 2}, PlotRange -> {-6, 6}, 
        PlotStyle -> {RGBColor[0, 0, 1], Thickness[0.01]}, 
        AxesLabel -> {"x", "D[x,t]"}, 
        PlotLabel -> {"f[x,t]+g[x,t]"}], {t, 0, 
        6,  .25}]

How do the resulting graphs differ from previous graphs?

Experiment with different values of A, k and ω for f[x,t] and g[x,t].  Notice how your changes affect the composite graph.

The superposition of waves can be used to combine more than two waves.  In fact, there is no limit to the number of different waves that can be combined.  The overall results do not differ from the example above except for the maximum possible amplitude of the resultant wave.  You are encouraged to experiment with this on your own.

Further Exploration

The format used for the sine function is applicable to other functions as well.

	Graph the following functions.  
	Identify the constants A, B, C and D in each of the functions.  
	Change each of the constants, and observe the change to the graph.  
	Try adding the functions together, and graphing the results.  

	1.  f (x) = 2*(([5*(x - 3)])^2)+ 1
	2.  f (x) = 4*Cos[2*(π*x+3)] - 2
	3.  f (x) = 3*(E^([2*(x - 1)])) +  4

\(Notice\ that\ the\ format\ used\ for\ the\ time - 
        dependent\ sine\ function\ is\ applicable\ to\ other\ functions . \ 

Graph\ the\ following\ functions . \ 
Animate\ the\ graph\ for\ each\ function . \ 
\ Identify\ the\ constants\ k\),\(ω\ and\ ϕ\_o\ in\ each\ of\ the\ functions . \ 
\ \ \ \ \ Change\ each\ of\ the\ constants\), \(and\ observe\ the\ change\ to\ the\ graph . 
\ \ \ \ \ \ Try\ adding\ the\ functions\ together\), and graphing the results.

     1.   f(x)= 2*(((3*x  -  2*t  +  1))^2)
	2.   f (x)  =  
        3*Cos (2*x  -  3*t  + 2)
	3.   f (x)  =  
        2*(E^((4*x + 2*t - 1)))