Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Using Computer-Generated

Animations as an Aid in
Teaching Wave Motion and
Sound
Marvin De Jong, Southwest Missouri State University, Springfield, MO

W hen students encounter the mathematics wave,


of wave motion, they are at a new level of
mathematical sophistication, a step up y = A sin [kx – 2 ft)], (1)
from kinematics formulas and F = ma. We have found
that graphing the equations of wave motion and pro- is one of the more difficult expressions for students
ducing animations of various aspects of wave motion in introductory physics to visualize and understand.
on a computer, coupled with live examples of the Understanding is difficult in part because there are
same phenomena, are helpful in understanding the two variables, x and t, and several parameters (the
mathematics of wave motion and connecting it to the amplitude A, the wave number k, the wave velocity
real world. Without some real-world examples, the v, the frequency f, the period T, and the wavelength
kind of work described here, although quite visual, is ) that are related in a variety of ways, some of
not terribly exciting to students jaded by computer which follow:
games and television. Simultaneously relating the
mathematics of wave motion to the computer graph- 2 1 v
k = ,  = f = ,  = 2 f.
ics and to demonstrations of the same or similar phe-  T 
nomena seems to have a more dramatic and long-last-
By the time they reach physics, students have also
ing effect than using either by itself. This article de-
forgotten that a graph of y = f(x – a) is simply the
scribes the graphics and animations that we generate
with a computer algebra system (CAS), namely, graph of y = f(x) displaced a units to the right, a result
Mathematica. Other software can also produce ani- encountered in high school or college algebra, and a
mations.1,2 Although many students have seen func- fact that would make Eq. (1) more easily understood.
tions and graphs that involve trig functions in mathe- Students may find Eq. (1) in a variety of forms in
matics classes, they may not have connected them to introductory physics texts. For example, another pop-
the topic of wave motion. A CAS or spreadsheet ani- ular form of Eq. (1) is
mation utilizes the power of a computer to help make
this connection clear. Finally, achieving the same re- y = A sin[k(x – vt)].
sults by asking students to graph functions with paper
and pencil is clearly impossible, although some of the (Note: In the classroom, we use f for frequency rather
pencil and paper activities described by Arnold Arons3 than  because on the blackboard or in writing, it is
are both realizable and extremely useful. easy to confuse  with v, the velocity. My students
don’t like “.”)
Animating a Traveling Wave One activity I use to help students understand
The expression that describes a sinusoidal traveling these equations and their relationship to actual phe-

524 DOI: 10. 10.1119/1.1631622 THE PHYSICS TEACHER ◆ Vol. 41, December 2003
wave appears to move. From a single image a student
can measure the wavelength, while from multiple im-
ages at various values of the time, a student can mea-
sure the velocity and the frequency (or period). At es-
sentially the same time in the student’s experience, a
demonstration of a real wave traveling down a rope is
helpful to connect the phenomenon with the anima-
tion. The usefulness of the animation lies in the fact
that it helps to connect the mathematical model, Eq.
(1), with reality. This feature is aided by the fact that
in Mathematica the use of Eq. (1) is very explicit; it is
not simply a set of references to various cells.
The instructions we use for creating the animation
are unique to Mathematica. However, it should not
be difficult to translate the ideas in this article to other
CAS’s or spreadsheets. In any case, here are the Math-
ematica instructions that generate a table of 32 images
of the wave at times separated by 1/32 s.

 f t]
y = Sin[k x - 2
k = f = 1
Table[Plot[y, {x,0,6}], {t,0,1, .5/16}]

In subsequent animations and graphs we will omit


the Mathematica programs because they are available
from the author by email. Nevertheless, it is
extremely important for students to see that Eq. (1),
in one form or another, does appear in the program.
What Mathematica is doing is neither profound nor
subtle. It is simply saving us a lot of time. I do not
use these animations to teach Mathematica, but at a
minimum I want the students to know that we are
graphing some form of Eq. (1) or a combination of
such equations.
Neither the number of images nor the time be-
tween images is critical. Simply experiment with these
Fig. 1. Several examples of the sequence of images values until you are satisfied with the animation.
used to animate a traveling wave. Once the series of images is generated, Mathematica
has a menu command that will animate the images;
nomena is to use this equation within Mathematica to that is, Mathematica displays the images one after the
animate a traveling wave, and with the same set of im- other, in sequence, giving the appearance of a wave
ages the students make some simple measurements of moving to the right. Changing the sign of the 2f
the parameters. The essential idea is to make a succes- term makes the wave travel to the left. In Fig.1 we
sion of images of the sinusoidal wave at various times, show several of the images from the sequence used to
given an amplitude, a wave number, and a frequency. develop the animation.
These images are played back in succession, and the

THE PHYSICS TEACHER ◆ Vol. 41, December 2003 525


Fig. 2. Example of an image from the standing wave ani- Fig. 3. Beats: Adding two waves of different frequencies.
mation.

Standing Waves trigonometric identities; that is part of the beauty of


Another animation my students study is that of what we describe in this article. I point out to the stu-
two traveling waves that meet and interfere to make a dents where Eq. (1) shows up in the Mathematica
standing wave. Mathematically speaking, we are su- commands and how the waves are being superim-
perimposing the following two waves: posed (added). I might point out that Aubrecht, Bol-
land, and Ziegler2 produce a similar demonstration
y = A sin[k(x – vt)] and y = A sin[k(x + vt)]. using a Microsoft Excel spreadsheet, but add waves of
slightly different frequencies. Readers may wish to ex-
In the animation we reserve the interval along the x- plore those possibilities as well as several others.
axis from 0 to 2 to view the wave traveling from
the left and the interval from 4 to 6 to view an Beats
identical wave coming from the right. In the middle Next we examine the superposition of two waves
interval, from 2 to 4 , we view the superposition traveling in the same direction but with slightly differ-
of the two waves (the standing wave). Refer to Fig. ent frequencies to produce beats. The results are
2, where we show one of the images used in the ani- shown in Fig. 3. A Play command in Mathematica
mation. Note in Fig. 2 that we have chosen the allows the two waves being combined to actually gen-
parameters so that only one antinode is possible. erate the sound, so the students can actually hear the
There are many other variations. beats they see displayed in Fig. 3. To do this we
During the same laboratory that the students are choose two frequencies that are 10 to 15 Hz apart
studying this animation, we demonstrate real standing rather than the 44-Hz difference used to generate Fig.
waves on a spring that stretches about three meters 3. I might add that students enjoy doing this little ac-
across the blackboard, so the students can recognize tivity, probably because many are aware of how instru-
the nodes and antinodes in both the real situation and ments are tuned and appreciate knowing the physics
the mathematical model by generating some standing behind the phenomenon. In a small, informal work-
waves themselves. The students will also do another shop type of class, have students bring in their own in-
laboratory exercise related to standing waves on struments and attempt to tune them to the same note.
strings (or in pipes) shortly after this one. The simul- I also set up two sound-generator/speaker systems,
taneous exposure to both the mathematics and the connect the outputs to a dual-trace oscilloscope, and
real phenomenon helps students gain an appreciation demonstrate beats in that way, a demonstration that is
of both. The CAS does the tedious arithmetic of applicable to a large class.
adding the two waves with no need to deal with tricky

526 THE PHYSICS TEACHER ◆ Vol. 41, December 2003


Fig. 4. Two-dimensional interference. Fig. 5. Intensity pattern for the interference of two
sources located at (2, 0) and (-2, 0).

Interference of Two Coherent If you want to illustrate the intensity pattern rather
Sources in Two Dimensions: A than the amplitude pattern, then before doing a densi-
Simulated Ripple Tank ty plot, you must have Mathematica do a time average
Next we move to interference in two dimensions. of the square of the amplitude. The result is shown in
Mathematically we put coherent wave sources at Fig. 5. Of course, this intensity pattern cannot be ani-
points (a, 0) and (–a, 0) on the x-axis and look at the mated; you have taken the time average and time is no
resultant interference pattern in the x-y plane, such as longer in the picture. What you can do is animate a
might be seen at some instant in a ripple tank. Then sequence of images such as the one in Fig. 5 using the
we make images for a sequence of times and animate source separation as the variable rather than time.
this sequence. Only one of the images is shown in Fig. Such an animation quickly provides students with
4. Once again, Mathematica does the arithmetic and some intuition of how the source separation affects
the trig identities one typically finds in textbooks are the interference pattern. Or, you could fix the source
not needed. Of course, seeing both the animation, separation and change the wavelength. In any case,
which is very nice, and a real ripple tank is illuminat- this is a good time to couple the computer graphics to
ing. One of the short exercises we do to begin to give a demonstration with a laser and double slits with
the student some additional power over the mathe- variable spacing. More sophisticated graphics of inter-
matics is to have them find an expression for the dis- ference patterns have been described by Mechtly and
tance from an arbitrary point (x, y) in the x-y plane to Bartlett.4
the point (a, 0), and also the distance to (0, a), be-
cause it is the difference in these distances that is cru- Fourier Synthesis
cial. Have them set up a coordinate system, indicate Now we experience a small change in the direction
the location of the sources, show an arbitrary point in of this article to look at Fourier synthesis and Fourier
the x-y plane, and calculate the distance to the point analysis, topics that we cover only briefly in my calcu-
from each source. Little exercises like these help to fo- lus-based introductory physics class, but which appear
cus their attention on the mathematics of interfer- to be of significant interest to students, in part because
ence, which they then slowly begin to understand. synthesizers are almost everyday items. Typically, we

THE PHYSICS TEACHER ◆ Vol. 41, December 2003 527


synthesize a square wave from the appropriate Fourier
coefficients and sine waves, all of which is easily done
in a CAS. We can then plot the reconstructed wave
with an increasing number of terms in the sum and
show how this increases the accuracy of the synthesis.
Animating a sequence of synthesized square waves
with the number of terms as a variable illustrates the
synthesis principal to the students, who are expected
to understand the general concept of synthesis rather
than the details. One of the synthesis results is shown
in Fig. 6.

Fourier Analysis Fig. 6. Synthesizing a square wave by adding sine waves


of the appropriate amplitudes.
Analyzing an amplitude-versus-time waveform is
something the students find very interesting, and
Mathematica makes it quite easy to do this without process, after which we make a few remarks about the
buying expensive equipment. The first step is to richness of the spectrum of some instruments com-
record a waveform from a voice or some instrument. pared to others.
Most computers have an accessory program that, in The data from the WAV file is then Fourier ana-
connection with an inexpensive microphone, allows a lyzed, and the results are shown in Fig. 8. There are
sound bite to be recorded and stored as a WAV file. peaks at 150 Hz, 300 Hz, and 450 Hz. You can see I
The sampling rate, 22050 Hz, is an important missed the C note I was hunting for by more than a
parameter to find the time interval between samples. few Hz. I am no Pavarotti. In any case, students like
Mathematica reads this WAV file, and a single com- to sing (although some are bashful) and play their in-
mand produces the discrete Fourier transform of the struments for the purpose of doing a Fourier analysis,
data in the WAV file. An example waveform of a per- and they like to have a printed version of the analysis.
son (me) trying to hum a C (one octave below middle Of course, they understand more clearly what is tak-
C) is shown in Fig. 7. It also appears that there may ing place in the analysis after they first become famil-
be some analog-to-digital conversion noise on the iar with the concept of Fourier synthesis.
waveform. What I do in class is have students bring Related to Fourier analysis and an idea gleaned
their instruments and we go through the same from an article by Saba and Rosa,5 another activity we

Fig. 7. Graph of part of the imported WAV file. Fig. 8. Discrete Fourier transform of the data pictured in
Fig. 7.

528 THE PHYSICS TEACHER ◆ Vol. 41, December 2003


have done is to place a tape recorder on a quiet stretch
of highway (during the off-season here in tourist heav-
en) and have a student drive his/her car over it (hope-
fully missing the tape recorder) with the horn blow-
ing. Converting the results to a file and making a
spectrum analysis of the sound with the car approach-
ing and receding demonstrates the Doppler effect and
allows the speed of the car to be measured. Saba and
Rosa have a safer approach to this experiment that
makes use of one of the many low-cost spectrum ana-
lyzers that are available on the Internet.

Conclusions
We use these animations or demonstrations in sev-
eral classroom and laboratory exercises, and it seems
that the students not only enjoy them, but also have a
modest “Eureka” feeling when they see the mathemat-
ics, the graphs, and the real phenomenon all together.
If anyone would like to have copies of the Mathemati-
ca notebooks that generate the images, please contact
the author at mld545f@smsu.edu.

References
1. Ole Anton Haugland, “Spreadsheet waves,” Phys. Teach.
37, 14 (Jan. 1999).
2. Gordon J. Aubrecht II, T. Kenneth Bolland, and
Michael G. Ziegler, “Animations in spreadsheets,” Phys.
Teach. 37, 540–541 (Dec. 1999).
3. Arnold Arons, A Guide to Introductory Physics Teaching
(Wiley, New York, 1990), p. 203.
4. Bruce Mechtly and Albert A. Bartlett, “Graphical repre-
sentations of Fraunhofer interference and diffraction,”
Am. J. Phys. 62, 501–510 (June 1994).
5. Marcelo M.F. Saba and Rafael Antonio da S. Rosa, “A
quantitative demonstration of the Doppler effect,”
Phys. Teach. 39, 431–433 (Oct. 2001).
PACS codes: 01.50H, 01.40Gb, 01.50M, 43.75

Marvin De Jong, ex-professor (retired), is currently work-


ing on distance-learning projects for the Missouri Virtual
School at Southwest Missouri State University.
Missouri Virtual School, SMSU, 901 S. National Ave.,
Springfield, MO 65804

THE PHYSICS TEACHER ◆ Vol. 41, December 2003 529

You might also like