121 - Experiment 01
121 - Experiment 01
121 - Experiment 01
I. Introduction
The purpose of this laboratory is to review the properties of some simple functions that will be used later to describe various physical phenomena. If you have not already done so, you should read the Mathematics Review (sections VIII and IX) in the front of the laboratory manual. This laboratory presupposes that you already know something about the concept of a function, a function table, and its representation by a graph. pon completion of this laboratory, you will be e!pected to be thoroughly familiar with the linear, "uadratic, sine, and cosine functions. To test and aid your understanding, you will make graphs of these functions by hand and by computer graphics.
II. Prelab
#s a pre$laboratory e!ercise, make all the graphs and fill in all the function tables that you are re"uested to do by hand. That way, all your lab time can be used to run the computer. %oing a correct prelab in advance will give you bonus points& 'ee item ( of the )ules and *rading +rocedures at the beginning of the laboratory manual.
27
2omputer programs for the various laboratories have been written and are stored internally on a hard disk. These programs can be loaded into the computer memory and e!ecuted by the central processing unit (2+ ). These operations, and the input of data to the computer, are done via the keyboard. The instructions entered with the keyboard and the output of the computer are displayed on the %isplay 1onitor. ,ocate (but do not press&) the keys corresponding to the letters of the alphabet and the integers. They are generally positioned according to the standard typewriter layout. ,ocate the additional keys indicated below that may be of use in your various labs.
To start the computer running for the +hysics 343 ,aboratory, take the following steps5 #. Turn on the power using the switch on the power strip. 0. 2heck that the computer c.p.u. and the monitor are on. The monitor has a light to show when it is on, and writing will appear on the screen if the computer is on. 2. .ither pull down the Physics menu with the mouse, or hit #lt + on the keyboard.
28
%. .ither select Physics 121 by clicking on it with the mouse, or scroll to it using up$ down arrow keys and then hitting enter. .. .ither click on Plots, or scroll to it and hit enter. 6. 6ollow the instructions on the screen. *. If you get hung up, hit 2trl 0reak or call your T#.
'hift The Shift key is always used in con7unction with a second key and changes from lower case to upper case for letters, or to the symbols indicated on the top of the key (e.g., 8 9 : key enters ;). The <2aps ,ock= key will give all upper case letters, but does not change the method of inserting symbols such as ;. 0ackspace moves the cursor to the left and removes one 0ackspace character for each keystroke. It can be used to correct mistakes. .nter .nter acts as a carriage return and enters the typed line into the computer for immediate action. 0efore entering a line make sure that it is correct. If not, correct it by using the backspace key and typing over. #lt 2trl p and %own arrow >eys This key is used in con7unction with other keys in a manner similar to the shift key. This key is used in con7unction with other keys in a manner similar to the shift key.
29
?ame 88888888888888888888888 ,ab +artner ?ame 88888888888888888888888 'core 88888888888888888888888 A. he !i"ear Fu"ctio" ,inear functions are described by e"uations of the form
y = ax + b .
@ere x is the input variable and y is the output variable. The "uantities a, b are fi!ed parameters (that is, definite known numbers) which specify the particular linear function of interest. .ach such function is called li"ear because its graph is a straight line. The parameter a is called the slo#eA it controls the rise or fall of the line with respect to the horiBontal. The parameter b is called the y (vertical) i"terce#tA it determines the value that y takes when x = C. 3. 'uppose the parameters a, b have the values a D 4, b D l. sing a calculator, complete the function table below. ,et x range over the values $E to E with increments of .: between successive x values.
y = ax + b a=2 b =1
30
4. +lot on the ne!t page selected points from the function table you have 7ust completed. 'elect the ! and y scales in a way that is both convenient and yet conveys ade"uate information about the function plotted. 1ake sure all the values of ! and y fit on the page, but are not bunched too close together. In the same spirit, it is not always necessary to plot every point in the function table. 6or this figure, and those to follow, plot only enough points to get a feeling for how the function behaves. 'ome functions re"uire more points than others. 'ome parts of the graph, for e!ample regions where the function is changing rapidly, may re"uire more points than others. %raw a smooth, simple curve through the points. ,abel the a!es.
y D a$ 9 % a D 4, % D 3
E. *iven a function table or a graph for a linear function, let (x3,y3) and (x4,y4) be two points in the table or on the graph. 'ince two points determine a straight line, it should be possible to compute a and % from (x3,y3) and (x4,y4). Indeed, the slope a is given by the relation
a = ( y 2 y1 ) ( x 2 x1 ) .
-nce the slope a has been found, the y intercept % is given by the relation
b = y1 ax1 .
+ick two points on the graph you have 7ust made in part #4 above. se them to compute a and % from the formulas above, and verify that you do indeed get the correct values for a and %. 'how your work below.
31
I.
2alculate and plot the linear function using the computer. ?ote that a single program is used to calculate all of the functions for this lab, the particular function being selected from the menu. To e!ecute the program carry out the following steps5 a. 'elect the linear function from the menu. %oing so causes e!ecution of the linear function program. It will ask you for the values of the parameters a and b. Type, 4 and 3 (separated by a comma), and press the .?T.) key. ?e!t it will ask you for the X1I?, X1#X, and the increment @ (step siBe) between successive x values. Type $E, E, .: and press the .?T.) key.
32
b. Jhen the computation is finished the computer will ask if you want to see the function table. (2hoose to display 4C values of x. This fills the screen.) ,ook at this table. ?ote that the computer uses computer notation for displaying numbers. %o the numbers agree with the table you preparedK 888888888888
c. +lot the contents of the table by continuing. &o "ot #ri"t the gra#h' 'ketch the graph in the space below. @ow does it compare with your graphK
d. se the computer to compute and plot the linear function with the parameter values a D l, b D 4A keep X1I?, X1#X, and @ the same as before. Agai"( )o "ot #ri"t the gra#h' @ow does the plot compare with that found for a = 4, b = 3K 'ketch it below.
e. .!periment with the linear function by running the computer program several times with different values of a and b, including both positive and negative values. &o "ot #ri"t your gra#hs.
:.
se the computer to plot a linear function that goes through the points (3,4) and (E,:). +ress + to print a copy of the graph. %o this twice to get a copy for each lab partner, and sign your copy. 2ircle the points (3,4) and (E,:). Include this printed graph as part of your lab report.
33
*.
where x is the input variable, y the output variable, and the "uantities a, b, c are parameters. ?ote that putting a D C gives the linear function as a special case. The "uadratic function e"uation
y , a$2 - %$ - c
?ote that the "uantity [x + b (2a )] , since it is a s"uare, is always positive or Bero. 2onse"uently, the "uadratic function has an e$tremum (ma!imum or minimum 2 depending on the sign of a) when [x + b (2a )] DC, or e"uivalently
2
x = b (2a ) .
3. 'uppose the parameters a, b, c have the values a D $l, b D l, c D l. sing a calculator, complete the function table below. The tabulated values of y should be accurate to : significant figures. ,et x range over the values $4 to 4 with increments of .4 between successive x values.
y D a$4 9 %$ 9 c a D $l, % D l, c D l $
$4.C $3.L $3.G $3.I $3.4 $3.C $C.L $C.G $C.I $C.4 C.C $3.GI $3.CC $C.II C.CI C.II C.HG 3.CC
$
C.4 C.I C.G C.L 3.C 3.4 3.I 3.G 3.L 4.C
y
3.3G 3.4I 3.4I 3.3G 3.CC C.HG C.II C.CI $C.II $3.CC
34
4. +lot below selected points from the function table you have completed. 'elect appropriate scales. %raw a curve through the points and label the a!es. Mou should get an inverted #ara%ola. ,abel the e!tremum, and state whether it is a minimum or a ma!imum. (If you make a mistake and find you need a new piece of graph paper, there is an e!tra copy at the end of this lab.
y D a$4 9 %$ 9 c a D $3, % D 3, c D 3
35
E. 2alculate and plot the "uadratic function using the computer. a. .!ecute the "uadratic function program, list the first few entries of the function table, and plot the contents of the table as you did before. &o "ot #ri"t a"y gra#hs' se the same parameter values etc. as you used before when making the function table and graph by hand. %o your and the computerNs function tables agreeK ('ketch your graph below.)
b. .!periment with the "uadratic function by running the computer program several times with different values of the parameters a, b, and c, including both positive and negative values. &o "ot #ri"t a"y gra#hs' Jhat controls whether the parabola opens upward or downwardK %oes the e!tremum occur at x = b (2a ) K Jrite a formula in terms of a,b,c for the value of y at the e!tremum.
I. +lot a "uadratic function that has a mi"imum at (x =C, y = $4). +rint a copy of the graph for each lab partner, and sign your copy. Include this printed graph as part of your lab report.
..
y = a sin (bx )
where a and b are parameters. The sine function is useful in describing oscillatory phenomena. (6or the language buffs, the word sinuous, which means serpentine or wavy, comes from the same root as sine.) #s will be seen shortly, the parameter a controls the amplitude or amount of oscillation, and the parameter b controls the rate (fre"uency) of oscillation.
36
3. 'uppose the parameters have the values a D l, b D l. sing a calculator, complete the function table below. The calculated values of y should be accurate to : significant figures. ,et x range from $E.4 to E.4 with increments of .4 between successive x values. # word of caution is necessary at this point. Mour calculator is probably e"uipped to calculate sin(x) when x is e!pressed in degrees, radians, or grads. 'ee sections 0 and 2 of the 1athematics )eview given in +art VIII of the Introduction to *eneral ,aboratory Jork and #rcane and 1athematical 1atters. (,ook in the front of your laboratory manual.) Note that it is a" acce#te) mathematics a") #hysics co"ve"tio" that (unless clearly stated otherwise) whe" writi"g sin ( x ) or sin (bx ) , it is u")erstoo) that $ or bx are to %e e$#resse) i" ra)ia"s. ?ote also that, in this ,aboratory, the symbol x plays a different role than it did in the 1athematics )eview. In the 1athematics )eview x denoted the horiBontal coordinate and f denoted the angle. ?ow x, or more generally bx, denotes the angle$like variable. 'et your calculator to work with angles measured in radians. 2heck it by computing sin (OI), sin (O4), sin (EO4). (?ote that your calculator should have the value of stored in its innards. 'o it is easy to produce OI, O4, etc.) Jhat should the answers beK
sin(OI) D sin(O4) D sin() D sin(EO4) D
?ow complete the table. If some numbers in the table do not look "uite right, do not worry about it until you get to part 4.
y D a sin %$ a D 3, % D 3 $
$E.4 $E.C $4.L $4.G $4.I $4.4 $4.C $3.L $3.G
37
$3.I $3.4 $3.C $C.L $C.G $C.I $C.4 C.C C.4 C.I C.G C.L 3.C 3.4 3.I 3.G 3.L 4.C 4.4 4.I 4.G 4.L E.C E.4
$C.(L:I: $C.(E4CI $C.GI3IH $C.H3HEG $C.:GIGI $C.EL(I4 $C.3(LGH C.CCCCC C.3(LGH C.EL(I4 C.:GIGI C.H3HEG C.LI3IH C.(E4CI C.(L:I: C.(((:H C.(HEL: C.(C(EC C.LCL:C C.GH:IG C.:3::C C.EEI(( C.3I334 $C.C:LEHI
'uppose the amplitude a had the value a D 4 instead of a D 3. Jhat would then be the ma!imum and minimum values taken by yK
38
?ote from the function table that when x is near Bero, sin x and x are nearly the same, providing x is measured in radians. This fact should also be obvious from geometrical reasoning. 2onsider a circle having a radius r of length 3 as shown below.
Figure I-/
%raw a right triangle inside the circle as indicated. To specify the angle x in radians, you simply report the length of the arc l. #lso, since the radius r has the value 3, the sine of x is given by the relation
y = 1(sin x ) = sin x .
It is evident from the drawing that the side y of the triangle and the length l of the arc are very nearly e"ual when l is small.
4. +lot on the ne!t page selected points from the function table you have completed. 'elect the appropriate scales. %raw a curve through the points and label the a!es. There is an error in the function table& 6ind it, circle it, and put in the correct y value. ?ow make sure your plot is right. ?ote that for values of x outside the range of the plot, the sine function merely repeats itself over and over again. 6or this reason sin x is called a #erio)ic function. The interval in x re"uired for repetition is called the #erio) of the function. Jhat is the period of sin xK
period of sin x D
39
y = a sin bx
a = 1, b = 1
40
E. 2alculate and plot the sine function using the computer. a. .!ecute the sine function program, list the first few entries of the function table, and plot the contents of the table. &o "ot #ri"t a"y gra#hs' se the same parameter values as you used before when making the function table and graph by hand. @owever, use an H value of .C: in order to get enough points to make a smooth curve. %o your and the computerPs function tables agreeK ('ketch your graph below.)
8888888888888888888888888888888888888888888888888888
88888888888888888888888888888888888888888888888888888
b.
se the computer to plot the sine function with the parameter values a D l, b D 4A keep the values of X1I?, X1#X, and H the same as those you used in part Ea, 7ust above. &o "ot #ri"t a"y gra#hs' @ow does the plot compare with that obtained in part E.aK (1ake a sketch below.)
88888888888888888888888888888888888888888888888888888
888888888888888888888888888888888888888888888888888
c. .!periment with the sine function by running the computer program several times with different values of the parameters a and b, including both positive and negative values. &o "ot #ri"t a"y gra#hs' I. 2onsider the function
y = (5.2) sin[(4.6)x] .
41
.vidently y is a periodic function. Its ma!imum value is called its am#litu)e. The interval in x re"uired for repetition is called its #erio). a. Jhat is its amplitude numericallyK amplitude D
y = (5.2) sin[(4.6)x] .
+rint a copy of the graph for each lab partner, and sign your copy. Indicate the amplitude and period on your printed copy. %oes the period agree with the results of part 2.I.b given aboveK
&.
y = a cos(bx )
where a and b are parameters. The cosine function is also useful in describing oscillatory phenomena. 3. 2alculate and plot the cosine function. a. .!ecute the cosine function program and plot the contents of the function table. &o "ot #ri"t a"y gra#hs' se the parameter values a D 3 and b D 3. #gain use an H value of .C: in order to get enough points to make a smooth curve. 'ketch your graph below.
b. .!periment with the cosine function by running the computer program several times with different values of the parameters a and b, including both positive and negative values. &o "ot #ri"t a"y gra#hs' 4. 2onsider the function
y = (5.2) cos[(4.6)x ]
42
.vidently y is a periodic function. a. Jhat is its amplitudeK amplitude D b. Jhat is its periodK period D E. +lot a cosine function with two complete oscillations on the screen. Jhat are the ma!imum and minimum values of yK Jhat is the amplitudeK Jhat is the periodK +rint a copy of the graph for each lab partner, and sign your copy. -n your copy, list the values of a and b, the ma!imum and minimum value of y, the amplitude, and the period. Include this printed graph as part of your lab report.
43
44