Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004
The idea of wave motion is closely related to the idea of circular or recurring motion. Going around in a circular we return to our starting point again and again, and in cyclic or wave motion we repeat the same thing again and again. The basic form of a wave is derived from the Sine function which we can relate directly to the equation of the circle. In fact, if we move around a circle while the same circle moves forward at the same rate, we can stretch out our circular motion into a sine wave pattern: (animated graphs 1,2)
plot(sin(x), (-3.5,3.5))
#If we graph the function over a greater range, we see the endlessly repeated wave patterns, every 2pi units. #Each unit is called a cyclel its length, here 2pi, is called the Wavelength. Let us see: plot(sin(x), (-10,10))
#We can use the Sine function as our basis for creating simple waveform graphs. #There are 3 fundamental measurable qualities to a simple waveform: #Frequency, Amplitude, and Phase. #Each of these qualities corresponds to a different parameter of our generalized Sine function: #f(x)=A*sin(F*x+P)
#The first parameter, Amplitude, is determined by the difference between the highest and lowest points of the wave, #and the starting point. It is a measure of the intensity of the wave. In the Sine function, the amplitude is 1. #by multiplying the Sine function as a whole by a parameter, we multiply the maximum and minimum range values by #that same parameter, and it is thus our Amplitude: f(x)=A*sin(x) We can see this if we experiment with different #values of the A parameter:
x = var('x') P = plot(sin(x), -5,5, rgbcolor=(0,0,1)) + \ plot(2*sin(x), -5,5, rgbcolor=(1,0,0)) + \ plot(3*sin(x),-5,5,rgbcolor=(0,1,0)) P.show(ymin=-3,ymax=3)
# The Greater the Amplitude parameter, the greater the difference between the high and low parts of the wave.
#The next parameter is the Frequency. This is how many wave cycles occur in any 2pi long segment of the domain. #This must be the number multiplying the independent variable 'x' as any such multiplier rescales the domain: # f(x) = sin(F*x)
#We can see the effect of a Frequency change by changing this parameter in our basic equation and graphing:
x = var('x') P = plot(sin(x), -5,5, rgbcolor=(0,0,1)) + \ plot(sin(2*x), -5,5, rgbcolor=(1,0,0)) + \ plot(sin(3*x),-5,5,rgbcolor=(0,1,0)) P.show(ymin=-1,ymax=1)
#We see that in the same space that contains one blue peak, we get two red peaks and 3 green peaks.
#The idea behind frequency can be expressed in the other way of Wavelength. This is inversely related to the Frequency, #that is to say, the higher the Frequency, the shorter the Wavelength. Since a Frequency parameter of 1 corresponds #to a full cycle of the Sine function stretching from 0 on the x-axis to 2pi on the x-axis, our wavelength for the #standard Sine function is 2pi. In general, Frequency = 2pi/Wavelength and vice versa. We can write our Sine #function in terms of wavelength instead of Frequency: f(x)=sin(2pi/W*x) For f(x)=sin(x); F=1cycle/time unit and #W=2pi length units.
#Our final basic parameter is Phase. This is more subtle than the other two, because the appearance of the wave #doesn't seem to change, but it is of the greatest importance. It is a difference in the timing of 2 waves of #the same frequency. One wave is shifted horizontally with respect to the other. We can create such a horizontal #shift in an equation by adding a constant amount to shift it left or subtracting a constant amount to shift it #to the right. f(x)=sin(x+P) for left shift and f(x)=sin(x-P) for a right shift. This shifting on the position #of one wave with respect to the other represents a difference in phase between 2 waves.
x = var('x') P = plot(sin(x), -5,5, rgbcolor=(0,0,1)) + \ plot(sin(x-1), -5,5, rgbcolor=(1,0,0)) + \ plot(sin(x+1),-5,5,rgbcolor=(0,1,0)) P.show(ymin=-1,ymax=1)
#Notice the red wave sin(x-1) is shifted one unit forward and the green wave sin(x+1) is shifted one unit back #with respect to the blue wave sin(x).
#Interestingly, our ears can readily hear phase differences. If the left ear hears sounds shifted forward in time #relative to the right ear, we hear the sound coming from the left and vice-versa. Stereo sound duplicates this #effect. Each source of sound is phase-shifted between the two channels to give us a sense of where the sound is #situated in space. These phase differences are often only a few thousandths of a second, but our ears can sense them.
#Phase differences are usually handled as RELATIVE differences, rather than the actual amount in space (Wavelength) or #time (Frequency). Instead, the amount of the phase shift is compared to one full cycle of the wave and expressed as a #fraction of that cycle using ANGULAR measurements. The full cycle of the wave is treated as a full circle, that is to #say as 360 degrees or as 2pi radians. We can then express the phase difference as a fraction of the full cycle by #using an angle measure which corresponds to that fraction of a circle. We may treat all phase shifts as forward, in #which case we us an angle of 0 to 360 degrees or 0 to 2pi radians to show the difference. We may also treat angles #of less than a half circle as forward or positive (from 0 to 180 degrees or 0 to pi radians)and those greater than #half a circle as backward or negative (from -180 degrees to 0 or -pi to 0 radians). This is done by simply #subtracting a full cycle from the angle of the phase. The same two systems are used in measuring angles as well.
#The Cosine function is simply the Sine function phase shifted backward by a quarter cycle. We say that the phase of #the Cosine function is shifted by 90 degrees, 1/2pi radians, or simple a quarter wave from the Sine function:
x = var('x') P = plot(sin(x), -5,5, rgbcolor=(0,0,1)) + \ plot(cos(x), -5,5, rgbcolor=(1,0,0)) P.show(ymin=-1,ymax=1)
#Note that the Cosine function (blue) is shifted backwards by pi/2 radians (-90 degrees) or 1/4th of a complete cycle #compared to the Sine function (red). You could also say that the Cosine function is shifted forward by 3/4ths of a #full cycle (3/2pi radians or 270 degrees) compared to the Sine function.)
#If the two waves are "out of phase" by half a cycle (180 degrees or pi radians; it doesn't matter whether forward or #backward), then we say they are in "antiphase" or have "opposite phase".
x = var('x') P = plot(sin(x), -5,5, rgbcolor=(0,0,1)) + \ plot(-sin(x), -5,5, rgbcolor=(1,0,0)) P.show(ymin=-1,ymax=1)
#Here, we see that the negative of the Sine function is in antiphase to the Sine function.
x = var('x') P = plot(cos(x), -5,5, rgbcolor=(0,0,1)) + \ plot(-cos(x), -5,5, rgbcolor=(1,0,0)) P.show(ymin=-1,ymax=1)
#Likewise, the negative Cosine function is opposite in phase to the positive Cosine function.
#In general, given a function representing a simple sign wave, we can convert it to the wave of opposite phase simply #by multiplying it by -1.
#We show phase in the equation by adding or subtracting the phase shifts in RADIANS divided by Frequency. #Obviously, the higher the Frequency, the shorter the wavelength and the shorter the corresponding phase shift factor #must be.
plot(cos(x), (-6.5,6.5))
plot(sin(x+pi/2), (-6.5,6.5))
#Notice the graphs are identical. The Cosine function is the Sine function phase shifted backwards by 1/4th cycle.
#With all this in mind, we are in a position to give the general function for a sine wave. We need to incorporate all 3 #of our basic parameters of Amplitude, Frequency, and Phase. f(x) = A*sin(F*(x-P)); P = 2pi*cyclefraction/F #I have made the sign of the phase factor negative to remind you the phase shift is opposite to the sign of the phase #factor; forward for negative and backward for positive. 2pi*cyclefraction = phase angle in radians.
#Let us examine a typical wave function: f(x)=3*sin(2*(x-pi/4)); Phase shift factor is 1/4 wavelength forward; #that is 2pi*1/4 divided by F=2
plot(3*sin(2*(x-pi/4)), (-5,5))
#Notice the Amplitude, Frequency, and Phase of the graph and how it matches the parameters in the equation.
#Some prefer to incorporate the 2pi wavelength or full cycle component of the Sine function into the Frequency. This #has the effect of making each unit on the x-axis equal to one full cycle or wavelength. It also makes it easier to see #the Frequency and Phase. In this case, the Phase factor equals the fraction of the cycle divided by the Frequency: #f(x)=Asin(2piF(x+P)); P = cyclefraction/F.
#f(x)=A*sin(2pi*F*(x-P)); P = cyclefraction of phase divided by Frequency. #Rewriting the previous equation in this way and graphing it, we get: #f(x)=3sin(2pi2(x-1/8)) Phase = 1/4th of a cycle forward; 1/4 divided by F=2 is 1/8.
x=var('x') plot(3*sin(4*pi*(x-1/8)), (-1,1))
x=var('x') plot(2*sin(6*pi*(x+1/9)), (-1, 1))
#Note that the amplitude is 2 up or down, the frequency is 3, and the phase shift is one third of a wave backward. #Now, looking at the equation, we note that with a Frequency of 3, 3 full wave cycles fit into one unit, and that #a third of a wave cycle = 1/9 since one third/3 = 1/9. We can find the Frequency by dividing the number before pi #by 2 and the cyclefraction of the phase shift by finding P*F. This *2pi=radians or *360=degrees.
#We can find the equation of the wave opposite in phase by changing the sign of A:
x = var('x') P = plot(2*sin(6*pi*(x+1/9)), -1,1, rgbcolor=(0,0,1)) + \ plot(-2*sin(6*pi*(x+1/9)), -1,1, rgbcolor=(1,0,0)) P.show(ymin=-2,ymax=2)
#notice how the red graph of -f(x) is the reflection of the blue graph of f(x). This also shows opposite phase
#We can graph several Sine wave functions to see how they compare: f(x)=1.5sin(2*(2pi)*(x-(1/3)/2)); #f(x)=.8sin(.5*(2pi)*(x+(1/5)/.8)); f(x)=-2.25sin(1.5*(2pi)*(x-(1/4)/1.5) #Written in this way you should easily be able to pick out the phase angle, frequency and amplitude before graphing: # # # # # # # # # #
x = var('x') P = plot(1.5*sin(2*(2*pi)*(x-(1/3)/2)), -3,3, rgbcolor=(0,0,1)) + \ plot(.8*sin(.5*(2*pi)*(x+(1/5)/.5)), -3,3, rgbcolor=(1,0,0)) + \ plot(-2.25*sin(1.5*(2*pi)*(x-(1/4)/1.5)),-3,3,rgbcolor=(0,1,0)) P.show(ymin=-2.5,ymax=2.5)
#Examine carefully the amplitude, frequency, wavelength, and phase angle of each graph to confirm your deduction.