Graphing Oscillating Functions Tutorial

During this tutorial you will be asked to look at a graphs and you will encounter a number of numerical calculations. You should have your calculator handy to check these calculations. It's important to actually do this in order to get the maximum benefit.

A class of functions which occur frequently in all sciences are those which are oscillatory, and in particular, those which are characterized by a sine or cosine. These functions arise in many ways in science but your first introduction to them will probably be in the study of waves.

Waves can be realized in many ways and in many media, but here we will examine transverse waves on a string because, in this case, the wave on the string is a picture of the graph we want to be able to draw. However, this example will be similar to many other waves (for example, water waves, sound waves, light waves, etc.). The purpose of this tutorial is not to teach you the physics of waves. It is assumed that in your other studies, you have learned the equations of travelling and standing waves.

 

Wave function
Panel 1
\(y = A \sin(\omega t \pm kx)\)

 

Let's start with the travelling wave first. The equation of a travelling wave is \(y = A \sin(\omega t \pm kx)\). As you can see, this equation tells us the displacement \(y\) of a particle on the string as a function of distance \(x\) along the string, at a particular time t. It could also be \(y\) as a function of t at a particular place, \(x\), on the string. The former case is used as the example here. 

Much confusion arises in students' minds at this point when asked to graph such a function.

You must realize that you can't draw a graph of this whole function because it's a function of two variables, \(x\) and \(t\). You can do two things. You can imagine taking a snapshot of the string and showing \(y\) vs \(x\) at a given time or you can choose a particle on the string at some given position \(x\) and see how its displacement varies with time. But normally, you can't do both at once. (Three-dimensional graphs are hard to draw, but some computer graphics programs can now do them easily.)

Let's look at the first alternative as shown above. That is, the snapshot at some time \(t\) and see how the displacement of the various parts of the string vary with \(x\). Let's deal with some of the symbols first. In our convention, the negative or positive sign means a wave is travelling right or left, respectively. "\(A\)" is the amplitude of the wave; that is, its maximum displacement. The maximum value of the sine function is 1 so the maximum value of \(y\) is \(A\).

 "\(\omega\)" is called the angular frequency. It is measured in radians per second (\(s^{-1}\)). Since there are \(2\pi\) radians in one complete cycle, then \(\omega = 2\pi f\), where \(f\) is the frequency in cycles per second or Hertz.

The quantity "\(k\)" is called the wave vector and is equal to \(2\pi /\lambda,\), where "\(\lambda \)," is the wavelength.

The quantities "\(A\)" and "\(\lambda\)," are shown in the figure. The wave travels with the speed "\(v\)" given by \(v = f\lambda\), . Now, anyone can sketch a sine curve like this and label it but the real problems in this graph have been avoided.

How does it intersect the \(y\) axis and at what positions from the origin does it cross the \(x\) axis? We know that these crossings are \(\lambda\), apart but how far is any one of them from the origin? The way to show you how to do this is best done by using a specific example.

Let's take the case of \(y = 0.5\sin (3t - 3\pi x)\). First, what do we know about this wave? Let's make a list.

  • \(\omega\) = 3 radians/second
  • therefore \(f = 3/(2\pi,)Hz\)
  • \(k = 2\pi \) metres -1
  • therefore \(\lambda = 2/3\) metre

The amplitude is 0.5 metres and the wave is travelling to the right. Make sure you understand this.

\(y = 0.5\sin (3\cdot t - 3\cdot \pi \cdot x)\)

\(\omega = 3 rad\cdot s^{-1}\)

\(f = \frac {3}{2\pi}\cdot cycles \cdot s^{-1} (hertz)\)

\(k = 3\cdot \pi m^{-1}\)

\(\lambda = \frac {2\cdot \pi}{3\cdot \pi} = \frac 23 m\)

The negative sign means that the wave move to the right.

 

Traveling wave function
Panel 2
at \(t = 3\pi s\)
\(y = 0.5 \sin (9\pi - 3\pi x)\)
\(y = 0\) when \((9\pi - 3\pi x) = 0\) \(\therefore x = 3m\)

 

Let's suppose we're asked to plot \(y\) vs \(x\) for this wave at time \(t = 3\pi\) seconds (see Panel 2).

The function we are to plot is, therefore, \(y = 0.5\sin (9\pi - 3\pi x)\). Right off, we know the maximum and minimum values of the function. They are +0.5 and -0.5 metres. So the function lies between the dashed lines.

Now, where does it cross the \(x\) axis? That's the same as asking "For what values of \(x\) is \(y = 0\)?"

Well, \(y = 0\) when \(\sin (9\pi - 3\pi x) = 0\). And one time when \(A \sin (\theta) = 0\) is when its argument is 0.

Therefore \(y = 0\) when \((9\pi - 3\pi x) = 0\). That is, when \(x = 3\) metres. So we know that the function goes through the point \(y = 0\), \(x = 3.\). This is indicated with a blue dot. But if it's 0 here, it's 0 every \(\lambda\) or 2/3 metres on either side of it. These crossing points are also indicated these with blue dots.

How is the function going through these blue dots? Is it rising, or falling? Well, let's imagine increasing x by a little bit.

That means \((9\pi - 3\pi x)\) has decreased by a little bit (because of the minus sign) and \(\sin(9\pi - 3\pi x)\) will get a little smaller. But it was 0 at the blue dots. Therefore, if x increases, that is, moves to the right, y will go a bit negative, so, the sine function is going down and to the right through these points. Of course, you also know that half-way between these points, it must go up and to the right through the red dots.

Now you know everything and can sketch in the whole wave.

Here's another situation to consider. Suppose the original wave function had been \(y = -0.5 \sin(3t - 3p\; x)\). Notice it's the same as before except for a minus sign in front. One way to handle this is to do the analysis exactly as before but everything gets reversed in the y direction by the minus sign.

At \(t = 3\pi\) seconds, for example, the crossing points are as before but instead of the wave going down and to the right through them, they will go up and to the right. All other considerations are the same and the graph can be sketched easily as shown in . Make sure you understand this.

 

wave function
Panel 3
at \(t = 3\pi s\)
\(y = -0.5 \sin (9\pi - 3\pi x)\)

 

Let's look briefly at another case. Suppose a graph of our travelling wave is wanted at \(t = 3.2\pi\) seconds.

Now our equation is \(y = 0.5 \sin(9.6\pi - 3\pi x).\) You can now see that the "zero-crossing" occurs at a point given by \((9.6\pi - 3\pi x) = 0\) or \(x = 3.2\) metres. We also have "zero-crossings" every 2/3 of a metre on either side of this. These are indicated in blue. Again, the crossings half-way between go the other way and the graph can be sketched.

 

Travelling Wave Function
Panel 4
\(y = -0.475 m, x = 0m\)

 

At \(t = 3.2\pi s\)
\(y = 0.5 \sin(9.6\pi - 3\pi x)\)
\(y = 0\) when \((9.6\pi - 3\pi x) = 0\)
So, \(x = 3.2\) m

At \(x = 0\),
\(y = 0.5\sin (9.6\pi )\)
\(y = 0.5\sin (9.6\pi - 8\pi)\)
\(y = 0.5\sin(1.6\pi)\)
\(= 0.5\sin (288^\circ )\)
\(y = 0.5\sin (288-360)\)
\(= 0.5\sin (-72)\)
\(y = -0.5\sin (72^\circ )\)
\(= -0.5 (0.95)\)
\(y = -0.475\) m

Now, the value of the function is obviously not \(0\) at \(x = 0\), but of course the value is easy to find. At \(x = 0, \) \(y = 0.5\sin(9.6\pi ).\) Remember the \(9.6\pi\) is in radians and since the sine function repeats itself every \(2\pi\) radians, we can take \(8\pi\) radians away from it, leaving \(\sin (1.6\pi ).\)

Recall that \(\pi\) radians is \(180^\circ\), so that \(1.6\pi\) is 288°. \(\sin (288^\circ) = -\sin (72^\circ) = -0.95.\) So \(y\) at \(x = 0\) is negative and is, in fact, \(-0.475 \) metres. Again, the sketch of the graph is completely determined. Study panel 4 carefully.

Let's now look at the problem of graphing a standing wave. A general equation of a standing wave is \(y = (2A \cos \omega t) \sin kx. \) All the symbols are the same as we defined previously. The \(2A \cos \omega t\) is put in parentheses to emphasize that what we have is the sine of function of \(x\) with an amplitude of \(2A \cos \omega t\) which varies periodically in time. Again, let's look at a specific example.

Suppose we're asked to sketch the standing wave \(y = 0.5 \cos (7\pi t) \sin (3\pi x)\) First let's list all the things we know. \(\omega = 7\pi\) radians/second, so \(f = 7\pi /2\pi = 7/2\) cycles/second. \(k = 3\pi\) metres-1 so \(\lambda = 2\pi /3\pi = 2/3\) metre.

Now, again we can only plot the standing wave if we're told the time at which the graph is wanted, that is, the time at which the snapshot picture is to be taken. For example, what's the graph at time \(t = 0?\) Then, \(\cos (7\pi t) = 1\) and the function is \(y = 0.5\sin (3\pi x).\) As before, this has a maximum value of \(0.5\) metres.

 

Graph of wave
Panel 5
at \(t = 0\)
\(y = 0.5 \sin 3\pi x\)

 

Where are the crossing points? Well, \(y = 0\) when \((3\pi x) = 0,\) which means \(x = 0,\) so the function is a positive sine curve with wavelength = 2/3 metre. Make sure you understand the graph above.

\(f = \frac{7}{2} Hz\)

\(\therefore T = \frac {2}{7}s\)

\(t= \frac{1}{14}\) \(s = \frac{1}{14} \times \Biggl ( \frac{7}{2} \cdot \frac{2}{7} \Biggr ) = \frac{1}{4} \cdot T\)

Suppose you're now asked to sketch the standing wave at time \(t = 1/14\) second. If you really know your stuff, you'll immediately see that this is \(1/4\) of a period after \(t = 0.\) You see this in panel 7. Since \(f = 7/2\) cycles/second, then the period equals \(2/7\) second, and \(1/14\) second is just \(1/4\) of the period. Now, you know that, at \(1/4\) of a period and \(3/4\) of a period, the displacement of a standing wave is 0 everywhere, so the problem is solved. 

But just to see that it is so, let's work it out in detail. Substituting \(t = 1/14\) second into our standing wave equation gives for the amplitude \(0.5\cos(7\pi 1/14) = 0.5\cos(pi /2).\). Since \(\cos(\pi /2) = 0,\) then y is \(0\) everywhere.

Finally, what's a graph of the standing wave at \(t = 1/10\) second? Now our equation is \(y = 0.5\cos [7\pi (1/10)] \sin (3\pi ).\) Looking at the amplitude term, this is the \(\cos (0.7\pi )\) or \(\cos (126^\circ ).\) \(\cos (126^\circ ) = - \cos (54^\circ ) = -0.588. \) This multiplied by \(0.5\) is\(-0.294.\) The graph is thus the negative sine curve with an amplitude of \(0.294\) metres, shown below.

 

graph of the standing wave at t = 1/10
Panel 6