MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from...

36
MATH 3A CALCULUS LAB ASSIGNMENTS

Transcript of MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from...

Page 1: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

MATH 3A

CALCULUS

LAB

ASSIGNMENTS

Page 2: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

2

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY

INTRODUCTION These laboratory assignments are designed to help you understand the concepts of calculus by examining problems from the graphical, numerical, and symbolic points of view. These tasks are sometimes difficult or impossible to perform manually, but they can be handled easily using computers and mathematical software. The following labs were written to be used with the software called Mathematica, specifically Wolfram Mathematica 7 for the Classroom, which runs under Windows, Mac OS X, and Linux X86. Since the goal of the labs is to explain calculus, not software, the labs use only those features of Mathematica which are necessary to accomplish the tasks described. Furthermore, although there are usually several alternate ways to carry out a specific command in Mathematica 7, only the method that is simplest and easiest to remember is described. Those who wish to have a more thorough knowledge of the capabilities of Mathematica can access that information through the Help menu. To complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions and write in answers when requested on the lab pages themselves. Some problems will ask you to produce a printout. Turn in the printouts along with the lab pages when the assignment is due. If you need to leave the computer before completing a lab, try to finish the section you are working on. Then, when you are ready, you can resume the lab starting with the next section. Acknowledgements: These labs were written by Mike Petricig of Saddleback College. They are based on the work of James Daniels and Wendy Metzger of Palomar College.

Page 3: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

3

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 1: GRAPHING WITH MATHEMATICA Startup When the Mathematica 7 software starts up, a blank document called Untitled-1 is displayed. Documents in Mathematica are called notebooks. Various commands can be entered into the notebook and then executed to produce a result or a graph. Text information can also be entered to make the notebook more descriptive. The menu bar above the notebook contains a series of drop-down menus which perform various functions. The one that will be most useful for us is a palette, which is a list of buttons that can be clicked on to create Mathematica commands instead of typing them in. At this time, click on the Palettes menu and then click on the first item, the Basic Math Assistant. The window that opens contains four sections. We will use mainly the first two, so expand them by clicking on the triangles next to Calculator and Basic Commands. This window and the notebook window can be moved around and/or resized. The screen might then look something like this:

Page 4: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

4

At this point we should mention that to quit Mathematica, you can just click on the Close button in the upper right corner on the top bar. If a box appears asking: Save changes to 'Untitled-1' before quitting?, click on Don’t Save. Normally, you will not need to save any of your work for this course. Graphing an Equation We are now going to graph the equation 2y x= . In the Basic Commands section of the palette, click on the tab labeled 2D. Then click on the button labeled Plot. A template for the Plot command now appears in the notebook. The boxes labeled function, var, min, and max are placeholders that must be filled in by you. Since the function box is highlighted, in the Calculator section of the palette, click on the button labeled with the letter x (next to the letter y), then on the Superscript button , and then on the button labeled with the number 2. Now that we have x2 in the function box, click on the Tab button to move to the var box, and then again click on the letter x button to enter the variable for the function. Once again click on the Tab button to move to the min box, and click on the Subtraction button , then the number 4 button. Lastly, click again on the Tab button to move to the max box, and then click on the number 4 button. To execute the command, click on the button labeled Enter. The top of the screen should now look like this:

Note that Mathematica automatically assigns the name In[1] to the input command that you created, and the name Out[1] to the output that resulted. Subsequent commands will be named In[2], In[3], etc. Each input or output is called a cell. Along the right edge of the notebook you can see brackets which show the extent of each cell, and a larger bracket enclosing the input/output pair. The horizontal line below the graph marks the end of this first pair. If you make a mistake while creating the command, use the Backspace key on your keyboard to erase it. You can also click on the Edit menu and click on Undo to reverse your last keystroke. If a command has been executed and you see that it is incorrect, you can click in the input cell next to the mistake and fix it with the Backspace or Delete keys, and then click on Enter again. The old output cell will be deleted and replaced with a new one. Finally, if you just wish to remove a cell and start over, click on the cell bracket, then press the Delete key, or right-click and select Cut, or select Cut from the Edit menu.

Page 5: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

5

When filling in the Plot command template, we used the buttons on the palette. We could have instead used the corresponding keys on the keyboard. In place of the Superscript button, you can use the exponent symbol ^, which is Shift 6 on the keyboard. Also, in place of the Enter button, you can use the Enter key at the far right of the keyboard on the numeric keypad. The other Enter key (Return on the Macintosh) will just go down to the next line without executing the command. Furthermore, the Plot command and all other Mathematica commands can be typed directly into the notebook without using a palette. However, you would have to remember or look up the exact syntax and follow closely these three rules: All commands begin with an uppercase letter, square brackets [ ] are used only for function arguments, and curly braces { } are used only for lists or ranges of values. By using a palette, the format of the command is set up automatically. Adjusting the Plot On the graph that you created, notice that the x-axis is numbered from -4 to 4, since those are the values that you specified for x in the Plot command. The values on the y-axis are determined automatically by Mathematica. If you want to show a certain portion of the y-axis, you can specify the endpoints of the y-axis by inserting an option called PlotRange into the Plot command. For example, let’s repeat the last plot but with the y-axis also numbered from -4 to 4. In the Calculator section of the palette, click on the button labeled Input from Above. The previous Plot command should now be repeated below the graph. Then on the 2D tab of the Basic Commands section, click on the button labeled Range. After the box appears, click on the second item in the box, PlotRange → {y min, y max}. Notice that this option has now been automatically inserted into the correct position in the Plot command. Since y min is highlighted, click on the Subtraction button in the palette, then the number 4 button. Click on the Tab button to move to the y max box, and then click on the number 4 button. Finally, click on the Enter button. In the graph that results, the y-axis is now numbered the same as the x-axis. You might notice that the x-axis seems stretched out compared to the y-axis, since one unit on the x-axis is longer than one unit on the y-axis. To fix this, we can add another option to the Plot command. Click again on the Input from Above button to get a copy of the previous command. Then, on the 2D tab, click on the button labeled Other. When the box appears, click on the first item in the box, AspectRatio → Automatic. It is again automatically inserted into the correct position in the Plot command, so click on Enter to get a new graph having the same scale on both axes. Sometimes we may want to get a wider overall view of a graph, and sometimes we may want to focus in near a certain point on the graph. Unfortunately, Mathematica does not have a zoom feature for 2D plots. We can achieve the same effect though by changing the max and min values for x and y in the Plot command. For example, let’s zoom out on the previous graph. Click on the Input from Above button and use the mouse and keyboard to change each -4 to -20 and each 4 to 20, then click or press Enter to get a wider view of the graph. Move the scroll bar so that you can see both this graph and the previous one at the same time. Comparing the two graphs, how does the shape of the new one seem different from the previous one? (Write your answer here →) __________________________________ Now let’s zoom in. Rather than making a new Plot command, let’s just modify the last one we did. Use the mouse and keyboard to change each -20 to -0.5 and each 20 to 0.5, then click or press Enter to

Page 6: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

6

get a close-up view near the origin. Again move the scroll bar so that you can see this new graph and the one above it at the same time. Comparing the two graphs, how does the shape of the new one seem different from the one above it? _________________________________________________________ Locating Points Now let’s plot the parabola 2 8 10y x x= − + and try to find its vertex graphically. First let’s delete the last graph and its Plot command by clicking on the outer cell bracket that encloses them. When the bracket is highlighted, press the Delete key, or right-click and select Cut, or select Cut from the Edit menu. Now click on the Input from Above button to get a copy of the previous command. With the mouse, place the cursor between x2 and the comma (but not up in the exponent!). Then type or click: -8x+10. Also change each -4 to -8 and each 4 to 8, then type or click Enter to obtain the graph. In order to estimate the coordinates of the vertex of this parabola, scroll to the bottom of the 2D tab of the Basic Commands section, and click on the button labeled Drawing Tools…. The 2D Drawing palette pops up. Click on the Get Coordinates tool , and when you move the mouse onto the plot, the cursor becomes a cross, and its coordinates are displayed. Now move the cross to the vertex of the parabola. Notice that the coordinates are close to the values (4, -6). Using algebra, it can be shown that the vertex is in fact (4, -6), but the cross will not display those values because it moves in small jumps and can’t land on that exact point. So this tool can only be used to get a rough estimate of the coordinates of a point on the graph. A more accurate estimate can be made after zooming in near the point. In order to turn off the Get Coordinates tool, click on the Select/Move/Resize tool on the 2D Drawing palette. Then click on the Close button for the 2D Drawing palette to close it. Now draw the last curve that you have on your screen onto the graph below:

Page 7: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

7

Domain and Range Next you will graphically determine the domain and range for each of the following functions by plotting each equation as we did previously, and if necessary zooming until you can reasonably determine how far the curve extends along the x-axis and the y-axis. Write down your answers for the domain and range using interval notation. (Note: Before beginning a new problem, make sure the horizontal line appears below the last graph. If it doesn’t, just click below the graph. Then you can click the Input from Above button to modify the previous command.) 1. 2 sin (1 )y x= Domain:________________ Range:_______________ (Hint: Use the Sin button on the Advanced tab of the Calculator section.) 2. 4 30.3 0 8.y x x= + Domain:________________ Range:_______________ (Hint: After entering an exponent, press the right-arrow key on the keyboard to get out of it.) 3. 29y x= − Domain:________________ Range:_______________ (Hint: Use the Radical button in the Calculator section.) 4. 23 cosy x= Domain:________________ Range:_______________ (Hint: The exponent must be entered after the argument, like this: 3 Cos[x]2) 5. 2y x= − + Domain:________________ Range:_______________

(Hint: Use the Abs button on the x tab in the Basic Commands section for absolute value.) 6. 4y x= − Domain:________________ Range:_______________ Transformations on Functions We will next investigate how to transform a function by shifting, reflecting, or stretching its graph. It will be easier to do this if we use function notation. First, though, if a horizontal line is not present below the last graph, click below the graph in order to display the line and position the insertion point. 1. To create the function 2( ) 4f x x x= − , go to the Advanced tab of the Calculator section, and click

on the button labeled Define Function. In the template that appears in the notebook, the name box is highlighted, so click on the button labeled with the letter f. Click on the Tab button to move to the var box, and click on the letter x button. Click on Tab again to move to the expr box, and click on the buttons needed to create 24x x− . Then click on the Enter button. Notice that this time no output results, because we have only defined a function. Also note that Mathematica uses an underscore after the argument variable and a colon before the equals only when a function is first defined. To graph this, go to the 2D tab of the Basic Commands section, and click on the Plot button. In the template, the function box is highlighted, so click on the letter f button, followed by the Matching square brackets button . Then click on the letter x button to complete f[x]. Now use the Tab button to enter x for var, -4 for min, and 4 for max. Next click on the Range button on the 2D tab and select the second PlotRange option. Use -4 for ymin and 4 for ymax. Then click on the Other button on the 2D tab and select the first option, AspectRatio → Automatic. Finally click on Enter to get the graph.

Page 8: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

8

2. Now we will create the function ( 2)f x + by replacing x by x+2 in f (x). To do this, click on the Input from Above button, then in the new command place the cursor just to the right of the x in f[x], and type or click: +2. Then click on Enter and move the scroll bar so that this graph and the previous one can be seen at the same time. How does this graph compare to the graph of f (x)?

_________________________________________________________________________________

3. Next we will plot ( ) ( 1) 2g x f x= − + . First delete the last command and graph after clicking on

their outer cell bracket. Then click on the Define Function button and use g for name and x for var. For expr, click on f, the Matching square brackets button , and then x-1. Now place the cursor just to the right of the last square bracket and type or click: +2. Then click on Enter. We will just copy the Plot command for f (x) and change the f to g. To copy, either select the entire Plot command by dragging the mouse across it, or just click on its cell bracket. Keep the cursor on the highlighted area and then right-click and select Copy. Now click below the definition of g(x) and then right-click and select Paste. (Instead of right-clicking, you can use Copy and Paste on the Edit menu.) In this new Plot command, change the f to a g. Click on Enter and move the scroll bar so that this graph and the graph of f (x) can be seen at the same time. How does this graph compare to the graph of f (x)?

_________________________________________________________________________________

4. In the same way, define and plot the function h(x) = g(-x). (Note: Don’t delete the plot for g(x).

Also, the letter h is not on the palette. Use the keyboard.) How does this graph compare to the graph of g(x)?

_________________________________________________________________________________

5. Now delete the definitions and plots for g(x) and h(x), so that the graph of f (x) is the last output. We

will now graph the function 2 f (x) as follows: Click on the Input from Above button to get a copy of the Plot command for f (x). In the new command, place the cursor just to the left of f and type or click on the number 2. Then click on Enter. How does this graph compare to the graph of f (x)?

_________________________________________________________________________________

6. We will now compare this to the graph of f (2x). In the last Plot command, delete the 2 that you

just entered. Then place the cursor just to the left of the first x and type the number 2 to get f[2x]. Click on Enter. How does this graph compare to the graph of f (x)?

_________________________________________________________________________________

7. Lastly, we will compare the graph of 2( )xf in the same way. In the last Plot command, delete the

2 that you just entered. Then place the cursor just to the right of the first x and type or click: /2 to get f[x/2]. Click on Enter. How does this graph compare to the graph of f (x)?

_________________________________________________________________________________

Page 9: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

9

Printing Out Your Results For the final two problems you are going to make a printout of the graphs and their related commands. To prepare for this, clear the entire notebook by clicking on the Edit menu and then Select All. This will highlight all the cell brackets, so then press the Delete key, or right-click and select Cut, or select Cut from the Edit menu. Next you will enter your name and class time into the notebook as a text string. To do this, click on the Create Text Cell button in the Calculator section of the palette. Then type your name and class time. Notice that the cell bracket looks slightly different from the one for a regular input cell. To exit the text cell, just click below it to get the horizontal line. The Enter button has no effect in a text cell. This method can be used to place comments anywhere in the notebook. If you need to change the text, just click in it and then modify it. 1. Define the function 4( ) 3(2 4)f x x= − as you did earlier. Then define a new function g(x) that shifts

f(x) 3 units to the right and 5 units down. Plot both functions on the same graph in this manner: Click on the Plot button, and then for the function box, click on the Matching braces button . Inside the braces, type or click: f[x],g[x] . Then use x for var, -8 for min, and 8 for max. Next click on the Range button and select the second PlotRange option. Use -8 for ymin and 8 for ymax. Then click on the Other button and select the first option, AspectRatio → Automatic. Finally click on Enter to get the graph. What are the coordinates of the lowest point on the shifted graph? (Use the Get Coordinates tool , if necessary.)

__________________________

Before printing, make sure that you delete any commands or graphs that were mistakes. Then on the File menu, select Print…, and then click on OK to print out the contents of the notebook

2. Delete everything from the notebook except for your name and class time. Then define the function ( ) sin cosf x x x= + (Use the buttons on the palette for Sin and Cos.) Then plot f(x) from -4 to 4,

using the PlotRange option with the same values, and the AspectRatio → Automatic option. Use the Get Coordinates tool to estimate the amplitude and the period of f (x). (Round the answers to one decimal place.)

amplitude:______________ period:________________

Now, click below this graph and define the function ( ) sing x x= , but don’t plot it. Finally, define a function h(x) which stretches g(x) vertically by a factor of 2 and shifts it 4

π units to the left. (Note: After entering the radical and the 2, use the right-arrow key to exit the radical. Also, the π button is in the Calculator section.) Plot this new function by copying the Plot command for f (x) and changing the f to h. How does this graph compare to the graph of f (x)?

_______________________________________________________________________________ Now delete any mistakes and print out the notebook as you did above. To exit Mathematica, click on the Close button in the upper right corner on the top bar, and then click on Don’t Save. Remember to pick up your printouts.

Page 10: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

10

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 2: ESTIMATING LIMITS Plotting Points In this lab we will estimate the limit of a function at a point by examining a table of values and plotting the corresponding points. We will first learn how to use Mathematica to plot individual points. The ListPlot command is used to plot two or more points. We will plot the points (2, 3) and (-3, 1). After starting Mathematica and opening the Basic Math Assistant palette (if necessary), go to the 2D tab of the Basic Commands section, and click on the ListPlot button. Then enter 2 for x1, 3 for y1, -3 for x2, and 1 for y2. The box with three dots … is for additional points. Since we don’t have any, when that box is highlighted, press the Delete key. Then press the Backspace key to remove the preceding comma. Now go to the 2D tab and click on the Range button. Select the third PlotRange option and enter -4 for x min, 4 for x max, -4 for y min, and 4 for y max. Then click on Enter to get the graph. Creating a Table of Values We will now have Mathematica make a table of values for the function 3( ) 8f x x x= − , using the integers from -4 to 4. To do this, we will use the Table command to make the table of values, and the TableForm command to display it in a vertical format. First, click on the Define Function button on the Advanced tab of the Calculator section. Enter f for name, x for var, and x3-8x for expr (remember to use the right-arrow key to exit from the exponent), then click on Enter. Now go to the List tab of the Basic Commands section and click on the TableForm button, and then click on the Table button. For the list or array box, click on the Matching braces button . Then, inside these braces, type or click: x,f[x] . Next enter x for var, -4 for start, and 4 for end. Finally, click on Enter to get the table of values. The first column contains the values for x, and the second column contains the values for f(x), or y. To plot the values in the table, click on the Input from Above button in the Calculator section. Then modify this command by deleting the word TableForm and replacing it with the word ListPlot. (Remember to capitalize the L and P only, and no space before the P.) Then click on Enter to get the graph. Notice that in order to see all the points in the table, the x- and y-axes must have different scales. Now before making a printout, delete any mistakes you made, and then scroll up and click just above the first ListPlot command to move the insertion point to the top of the notebook. Next, click on the Create Text Cell button in the Calculator section and type in your name and class time. Then select Print… from the File menu and click on OK to get your first printout. After obtaining your printout, prepare for the next one by deleting all the cells except for your name and class time. Estimating Limits

We will now use a table and graph to estimate the following limit: 2

2

2 7 6lim2x

x xx→

− +−

1. We are going to make a table of values from 0 to 4, but this time we will increment each x value by 0.5 rather than by 1 (the default value). To do this, go to the List tab of the Basic Commands section and click on the TableForm button, and then click on the Table button. For the list or array box, click

Page 11: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

11

on the Matching braces button . Then, inside these braces, type or click: x,f[x] . Next enter x for var, 0 for start, and 4 for end. With the cursor positioned after the 4, enter: ,0.5 (notice the comma is first, followed by the zero, which is optional) and then click on Enter.

The next two lines that appear are error messages, because one of the answers in the table says “Indeterminate”. To suppress these messages, click just to the right of the TableForm command and enter: //Quiet and then click on Enter. Write down the results in Table 1 below:

x f(x)

2. To plot the values in the table, click on the Input from Above button in the Calculator section. Then

change the word TableForm to the word ListPlot and click on Enter to get the graph. Notice that there is a gap in the line of points. Which value of x was not plotted?

_____________________ Explain in a few words why Mathematica did not calculate a y-value for that point: _________________________________________________________________________________

3. Since there is a problem at x = 2, we will examine points nearby to determine the function's behavior.

Make a copy of the TableForm command by clicking on its cell bracket, or by dragging the mouse across the entire command. Right-click and select Copy, or select Copy from the Edit menu. Then click below the plot and either right-click and select Paste, or select Paste from the Edit menu. In the new TableForm command, change the 0 to 1.6, the 4 to 2.4, and the 0.5 to 0.1. Then click on Enter to get the new table of values. Next click on the Input from Above button, change TableForm to ListPlot, and click on Enter to get the graph. Notice that these points lie closer to x = 2 than the previous ones, but there is still a "hole" at x = 2. Also note that in order to show the points better, the x-axis starts at 1.6 instead of 0. Copy the table of values into Table 2 below:

x f(x)

Page 12: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

12

4. Now examine values even closer to x = 2. Copy the previous TableForm command and change the three numbers to 1.92, 2.08, and 0.02. Record the results into Table 3 below:

x f(x)

5. Plot this table of points by clicking on the Input from Above button and changing TableForm to

ListPlot. Notice that the y-axis starts at 0.85 and the x-axis starts at 1.95 for a better display of the points.

6. We will make one more table of values to get even closer to x = 2. Copy the previous TableForm

command and change the three numbers to 1.992, 2.008, and 0.002. Plot this table of points by clicking on the Input from Above button and changing TableForm to ListPlot. Next click on the Drawing Tools… button on the 2D tab of the Basic Commands section, and click on the Get Coordinates tool . Now move the cross to the spot where you think the "missing point" should be. Based on the coordinates of the cross and the values in the second column of the table, what is your estimate for the limit of f(x) as x approaches 2?

_____________ 7. Now we will make a printout of these points and the last table of values. First though, close the 2D

Drawing palette. Next we will delete all the cells above the last TableForm command, except for the first two. Scroll up, if necessary, until you can see the plot before the last TableForm command. We can delete these cells one at a time, but it is quicker to select them all at once as follows: Click on the cell bracket before the last TableForm command, but don't release the mouse button. Hold it down and drag the cursor upward to the top of the window. The window will scroll back toward the first cell, highlighting every bracket along the way. Stop the cursor at the first TableForm command and release the mouse button. (Don't go all the way up to the definition of f(x) and the text cell with your name or you will have to re-enter them!) Then press the Delete key, or right-click and select Cut, or select Cut from the Edit menu.

Now the only things remaining should be your name and class time, the definition of f(x), and the final TableForm and ListPlot commands from Step 6 above, along with the corresponding table of values and plot of the points. So then select Print… from the File menu and click on OK to get the printout.

After obtaining your printout, you can prepare for the next one by deleting all the cells except for your name and class time, or you can just modify the commands currently present (but remember to click on the Enter button after each command is modified).

Page 13: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

13

Testing Your Knowledge

For the third and final printout, apply the same 7 steps above to estimating: 22

2lim3 8 4x

xx x→

−− +

In the tables below, write down the results from Steps 1, 3, and 4, but using the new function instead. Don’t round off the results – write down all the digits that Mathematica displays. The table from Step 6 should appear only on your printout. This printout should look as described in Step 7.

x f(x)

x f(x)

x f(x)

What is your estimate for the limit of f(x) as x approaches 2? ______________

Page 14: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

14

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 3: COMPARING AVERAGE AND INSTANTANEOUS VELOCITY Velocity The velocity of a moving object can be obtained from the relationship: distance

timerate = . If we have a function s(t) that gives the position of an object at time t, then we can find the average velocity from time t0 to time t1 by: 1 0

1 0

( ) ( )ave

s t s tt tv −−= . In order to use this expression in Mathematica, it will be

convenient to let 1 0t t t∆ = − . Then, since 1 0t t t= + ∆ , we have: 0 0( ) ( )ave

s t t s ttv +∆ −

∆= as the equation for average velocity. 1. Begin by inserting your name and class time into a text cell at the top of the notebook. For this lab

we will use the position function: 2( ) 130 ln( 5)s t t= + . (Note: You can think of this as the position of a train in miles from a station after t hours. The velocity would then be measured in miles per hour.) Click on the Define Function button on the Advanced tab and enter s for name and t for var. For expr, enter 130 and then click on the Log button on the Advanced tab. Inside the square brackets, enter: t2+5 and then click on Enter. (Notice that Mathematica uses the function Log for the natural logarithm.)

Average Velocity (t0 = 1) 2. We will start by looking at the average velocity from time t0 = 1 hour to some other time t1. In this

case, (1 ) (1)ave

s t stv +∆ −

∆= . We will enter this expression by first clicking on the Fraction button , then entering s followed by clicking on the Matching square brackets button . Inside the brackets, enter: 1+Δt (The Greek letter Δ is entered by going to the Typesetting section of the palette, clicking on the second tab (Symbols and Greek Letters), and then clicking on the Δ button in the fourth row.) Next use the right-arrow key to move the cursor just to the right of the square brackets (or click there), and enter: -s followed by clicking on the Matching square brackets button

and then entering 1 inside the brackets. Next click on the Tab button to move to the denominator and enter: Δt but do not click on the Enter button yet.

3. We are next going to substitute different values for Δt in order to find the average velocity over

smaller and smaller intervals of time. We will start with the interval from t0 = 1 to t1 = 2, so that Δt = 2 – 1 = 1. To substitute this value into the expression, first use the right-arrow key or click to move the cursor just to the right of the fraction. Then click on the ReplaceAll or substitution button

in the Calculator section. Next enter: Δt and then click on the Rule button in the Calculator section. Lastly enter: 1. (Note: the decimal point after the 1 forces the answer to be displayed in decimal form rather than as a fraction) followed by clicking on the Enter button. What value is displayed? ________________

4. Now let's look at a smaller interval, from t0 = 1 to t1 = 1.9. In this case, Δt = .9. Click on the Input

from Above button and change the 1. to .9, then click on Enter. What is the value? _______________

Page 15: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

15

5. To make this process go faster, let's make a table of values for the average velocity using smaller and smaller values for Δt. Since we will have Δt decrease from .8 to 0, we need to use a negative value for the increment. So go to the List tab of the Basic Commands section and click on the TableForm button and then on the Table button. Then click on the Matching braces button and inside the braces enter: Δt, (the comma is necessary). Now use the mouse to drag across the fraction in the previous input cell until the entire fraction is highlighted (but not the part to the right of the fraction). Then, with the cursor on the highlighted area, right-click and select Copy (or select Copy from the Edit menu). Now click just to the right of the comma you entered in the TableForm command, then right-click and select Paste (or select Paste from the Edit menu). Next click on the Tab button and enter: Δt for var, .8 for start, and 0 for end. Then enter: ,-.1 and use the right-arrow key or click to move the cursor to the end of the command. Finally, enter: //Quiet and then click on Enter to get the table of values without any error messages.

Instantaneous Velocity (t0 = 1) 6. As the values of Δt approach 0 (first column), the values of the average velocity (second column)

approach the instantaneous velocity at time t0 = 1 hour. What does the table display for Δt = 0? _______________________ Explain in a few words why this happens: _______________________________________________ Looking at the pattern of numbers in the table, what is your estimate for the instantaneous velocity (rounded to the nearest whole number)? _____________

7. To make this estimate more accurate, let's look at another table of values with even smaller values of

Δt. Click on the Input from Above button and change the .8 to .08, and the -.1 to -.01, then click on Enter. What would you now estimate for the instantaneous velocity (rounded to one decimal place)? _____________

8. To get the most accurate value for the instantaneous velocity, we can have Mathematica

automatically calculate 0

(1 ) (1)limt

s t st∆ →

+∆ −∆ . To do this, go to the Basic Commands section, click on

the third tab (Calculus Commands), and then click on the Limit button. For expr, go up to the fraction that you copied earlier, highlight it, and select Copy. Then click on expr and select Paste. Next click on the Tab button and enter: Δt for var. Click again on the Tab button and enter: 0. for value (including the decimal point). Then click on Enter. What value is displayed? _______________ This value is the instantaneous velocity at time t0 = 1 hour.

9. We are now going to make a printout, so if you have any commands that were mistakes, delete them

first. Then select Print… from the File menu and click on OK to obtain your printout.

Page 16: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

16

Average Velocity (t0 = 2) Now we will examine the velocity at a different value, for time t0 = 2 hours. We want to make a table of average velocities similar to the last table we created, but with t0 = 2 instead of 1. The average velocity would then be (2 ) (2)s t s

t+∆ −∆ . To do this, click on the cell bracket of the last TableForm command and

select Copy. Click below the last output and select Paste. In the numerator of the fraction, change each 1 to a 2, and then click on Enter. Based on the pattern of numbers in the table, what would be your estimate for the instantaneous velocity at time t0 = 2 hours (rounded to two decimal places)? __________ Instantaneous Velocity (t0 = 2) To obtain the most accurate answer, we can again have Mathematica calculate the limit as Δt approaches 0. Copy the previous Limit command and paste it below the last output. In the numerator of the fraction, change each 1 to a 2, and then click on Enter. What value is displayed for the instantaneous velocity at time t0 = 2 hours? ________________ The Average Velocity Function Finally, instead of examining the velocity at specific values like t0 = 1 and t0 = 2, we're going to let t0 vary to be any value, which we'll call t. Replacing t0 by t in the equation for average value gives:

( ) ( )ave

s t t s ttv +∆ −

∆= . Each value of Δt will then give us a function of t rather than an individual number. Let's examine this function by plotting it for several different values of Δt. 1. Let’s define a function called f1 using Δt = .6. Click on the Define Function button on the Advanced

tab of the Calculator section. Enter f1 for name and t for var. Then go to the previous Limit command and drag over the fraction part to highlight it. Select Copy and then click on expr in the function definition and select Paste. In the numerator of the fraction, change each 2 to a t, and then click to the right of the fraction. In the Calculator section, click on the ReplaceAll or substitution button , then enter Δt. Next click on the Rule button , then enter .6 and click on Enter.

2. Although it may not look like it, this new expression is a function, so we can plot it. In the 2D tab of

the Basic Commands section, click on the Plot button. Enter f1[t] for function, t for var, -4 for min, 4 for max, and then click on Enter. This graph is the average velocity function when Δt = .6.

Let’s look at the point on the graph where t = 1. To find the y-value there, just enter: f1[1] and then click on Enter. What value is displayed? ______________ This should be the same number that was in your first table of values next to Δt = .6.

3. Now go back to the definition of function f1, copy it, and paste it below the last output. Change the

name f1 to f2 and the value .6 to .3, then click on Enter. Now copy and paste the previous Plot command, change f1 to f2, and click on Enter to get the graph. Notice that it is very close to the previous curve. Let’s compare the y-value when t = 1. Enter: f2[1] and click on Enter. What value is displayed? ______________ This number should correspond to the one in the first table of values for Δt = .3.

Page 17: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

17

4. Next repeat this process for Δt = .1. Copy and paste the definition of function f2. Change f2 to f3 and .3 to .1, and then click on Enter. Now copy and paste the previous Plot command, change f2 to f3, and click on Enter to get the graph. To get the y-value for t =1, enter: f3[1] and click on Enter. What value is displayed? ______________ This should correspond to the number next to Δt = .1 in the first table of values.

The Instantaneous Velocity Function

If we let Δt approach 0 in the average velocity functions, we will get the instantaneous velocity function

0

( ) ( )( ) limt

s t t s ttv t

∆ →

+∆ −∆= . We can have Mathematica create this function as follows:

5. Click on the Define Function button and enter f for name and t for var. Then scroll up to the last

Limit command and copy it. Now go back down to the definition of function f, click on expr, and then paste the Limit. In the numerator of the fraction, change each 2 to a t, and then click on Enter. Next copy and paste the previous Plot command, change f3 to f, and click on Enter. After a short delay, the graph will appear. This is the instantaneous velocity function, the derivative of the position function s(t).

To find the y-value when t = 1, enter: f[1] and click on Enter. What value is displayed? __________ This should correspond to the value you obtained with the first Limit command.

6. To see how the four graphs are related, we will plot them all on the same set of axes. Go to the 2D

tab and click on the Plot button. Next, in the Calculator section, click on the Matching braces button . Now inside the braces, enter: f1[t],f2[t],f3[t],f[t] and then enter t for var, -4 for min, and 4 for

max. Click on Enter and the graphs appear from left to right, with the three average velocity curves getting closer together and approaching the instantaneous velocity function.

7. Lastly, prepare for the second and final printout by clearing out a lot of the less important

information. Delete all cells except for the following: your name and class time; the function definitions for s(t), f1(t), f2(t), f3(t), and f(t); and the final Plot command and its output. Then select Print… from the File menu and click on OK to obtain your printout.

Page 18: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

18

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 4: ANALYZING FUNCTIONS AND THEIR DERIVATIVES Extreme Values In this lab we will analyze a function by finding the extreme values (or extrema) that it attains over a specified interval of its domain. A relative extremum is either a relative maximum or a relative minimum, and it can occur only at a critical number. A function f (x) has a critical number c when f(c) is defined and either f '(c) = 0 or f '(c) is undefined. We will graph a function and its derivative together so that we can see how the derivative graph can be used to find the critical numbers of the function. This graphical method will aid in understanding the traditional symbolic method for locating extrema. Begin by clicking on the Create Text Cell button in the Calculator section and then enter your name and class time into the notebook. Problem I In this problem, we will find all relative extrema for the function 4 3 2( ) 7 5 10f x x x x x= − − − + . 1. Click on the Define Function button on the Advanced tab and enter the function above in the same

manner as in the previous lab assignments, and then click on Enter. Check to make sure that the function looks correct, and then obtain the derivative by entering: f’[x] (the prime symbol is the apostrophe key), and then click on Enter.

Note that Mathematica displays the answer in the order of increasing powers, which is the opposite of most textbooks. What is displayed for f '(x)? __________________________________________

2. To plot f '(x), click on the Plot button on the 2D tab in the Basic Commands section. Enter f’[x] for function, x for var, -4 for min, and 4 for max. Then click on Enter to get the graph. Notice that the shape of the curve is typical of a cubic polynomial, with three x-intercepts. We are now going to estimate these three zeros of f '(x) to an accuracy of 2 decimal places.

We can see that the curve crosses the x-axis between -2 and 0, so let’s plot it again on that interval. Click on the Input from Above button in the Calculator section, and then in the new copy change the -4 to -2, and 4 to 0. After clicking on Enter, we can see two x-intercepts in the new plot. Let’s first find the leftmost x-intercept, which we will call x1. We can see that it lies between -1.5 and -1.0, so once again click on Input from Above and change the numbers to -1.5 and -1 in the new copy.

After clicking on Enter, we can now see that the x-intercept lies between -1.3 and -1.2. In order to get the value of this zero accurate to 2 decimal places, we need to plot it again. Click on Input from Above and change the numbers to -1.3 and -1.2 in the new copy. After clicking on Enter, the value of x1 can now be obtained either by looking at the values along the x-axis or by using the Get Coordinates tool . What is the value of x1 (rounded to 2 decimal places)? _____________

Page 19: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

19

Now scroll back up to the second plot you made where the middle x-intercept x2 is visible. Since it lies between -0.5 and -0.3, plot it again using those numbers. Then plot it at least one more time using smaller intervals until you can get an answer accurate to 2 decimal places. What is the value of x2 (rounded to 2 decimal places)? _____________ Now scroll back up to the first plot you made where the rightmost x-intercept x3 is visible. It lies between 2 and 3, so repeat the above procedure. What is the value of x3 (rounded to 2 decimal places)? _____________ Once again scroll back up to the first plot you made in order to view the entire curve. Is f '(x) undefined at any values of x? ___________ So, to summarize, what are the critical numbers for f (x)? _________________________________

3. To find the critical values for f (x), that is, the y-values for these critical numbers, go to the Advanced tab and click on the letter f button, followed by the Matching square brackets button . Inside the brackets, type in the value you found earlier for x1, and then click on Enter. Rounding this answer to 2 decimal places, what is the value of f (x1)? _____________ Now click again on f and the square brackets and this time enter in the value you found for x2. After clicking on Enter and rounding to 2 decimal places, what is the value of f (x2)? _____________ Repeat this procedure for x3. Rounded to 2 decimal places, what is the value of f (x3)? ____________

4. Now we will plot f (x) on the same set of axes as f '(x) in order to compare them. On the 2D tab, click on the button labeled More which is just to the right of the Plot button. In the box that appears, click on the first option. For function1, enter: f[x] and for function2, enter: f’[x]. Then enter x for var, -4 for min, and 4 for max. Next click on the Range button on the 2D tab and select the second PlotRange option. Enter -30 for y min and 30 for y max, then click on Enter to get both graphs. The extrema (highs and lows) of f (x) should line up with the critical numbers that you found earlier.

Is the extremum at x1 a relative maximum or a relative minimum? ____________________________ Is the extremum at x2 a relative maximum or a relative minimum? ____________________________ Is the extremum at x3 a relative maximum or a relative minimum? ____________________________ What is the domain of f (x)? ____________________ What is the range of f (x)? ____________________

5. Before making a printout, we will label the graphs to show which one is f (x) and which one is f '(x). To do this, click on the Drawing Tools… button at the bottom of the 2D tab. When the 2D Drawing palette appears, click on the Text tool . Then click near the graph of f (x) (for example, at about the point (-2, 20)). Enter: f[x] and then click somewhere else on the graph. The text is very small, so to make it larger, double-click on it so that a box appears around it. Then on the Format menu, select Size and change the font size, say to 16 Point.

Page 20: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

20

If you are not satisfied with the position of the text, click in the box and hold down the left mouse button, drag the text to another position, and then release the mouse button. (Try it now!) To get rid of the box, click somewhere else on the graph. (Note: If you want to delete a text label, click on it and then press the Delete key, or right-click and select Cut, or select Cut from the Edit menu.)

Now click again on the Text tool , and then click next to the graph of f '(x), say near (-1, -20). This time enter: f'[x] and then click elsewhere. Double-click on it and change the font size. When you are satisfied with the text position, click below the plot and close the 2D Drawing palette. Finally, delete all the earlier Plot commands and their plots, but keep this last one with the labels. Keep also the commands for f[x], f’[x], and the three critical points. If you made any mistakes, delete them and then select Print… from the File menu, and click on OK to obtain your printout. To prepare for the next problem, delete everything except for the text cell with your name and class time.

Problem II

This problem is similar to the last one, but we will use the function ( )4 23( ) 3 2 1f x x x= − + .

1. Define this function and find f '(x) as in the previous problem. (Note: Use the Radical button in the Calculator section.) What is displayed for f '(x)?

__________________________________ 2. Plot f '(x) on the x-interval from -4 to 4. Looking at the graph, the zeros of f '(x) are at x =

________ Based on the vertical asymptotes of the graph of f '(x), f '(x) is undefined at x = _______________ So the critical numbers for f (x) are (going left to right): x1 = , x2 = , x3 = _______ _______ _______

3. Evaluate f (x) at these critical numbers to get the critical values for f (x) (rounded to 2 decimal places if necessary): f (x1) = , f (x2) = , f (x3) =

_________ _________ _________ 4. Now plot f (x) and f '(x) on the same graph for the x-interval from -4 to 4, and compare the extrema

with the critical numbers above. Is the extremum at x1 a relative maximum or a relative minimum? ____________________________ Is the extremum at x2 a relative maximum or a relative minimum? ____________________________ Is the extremum at x3 a relative maximum or a relative minimum? ____________________________ What is the domain of f (x)? __________________ What is the range of f (x)? __________________

5. Use the Text tool to label the plots as f (x) and f '(x), and increase their font size. To prepare for printing, delete the first Plot command and its graph, along with any mistakes you might have made. Then select Print… from the File menu, and click on OK to obtain your printout. Finally, to prepare for the next problem, delete everything except for the text cell with your name and class time.

Page 21: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

21

Increasing and Decreasing Intervals In the remaining problems, we will determine whether an extremum of f (x) is a relative maximum or a relative minimum without referring to the graph of f (x), but instead using only the graph of f '(x). This can be done by noticing that: At a relative maximum, f (x) is increasing on the left side of it, and decreasing on the right side of it. At a relative minimum, f (x) is decreasing on the left side of it, and increasing on the right side of it. We can also use the following facts: If f '(x) > 0 for all x in the open interval (a, b), then f (x) is increasing on (a, b). If f '(x) < 0 for all x in the open interval (a, b), then f (x) is decreasing on (a, b). This suggests the following procedure for determining relative maxima and minima: 1. Locate the critical numbers x1, x2, x3,…, xn of f (x) in the open interval (a, b) and use those numbers to

partition (a, b) into the smaller intervals (a, x1), (x1, x2), (x2, x3), …, (xn, b). 2. Use the graph of f '(x) to determine whether f '(x) is positive or negative on each of these intervals. 3. Based on these results, decide whether f (x) is increasing or decreasing on each interval. 4. Using this information, determine whether there is a relative maximum, a relative minimum, or

neither at each critical number. Problem III

We will examine the function 2

33 4

( ) xx x

f x− +

= on the interval (-3, 3).

1. Define the function above, making use of the Fraction button . Then have Mathematica find f '(x).

Notice that the answer is the sum of two fractions. To combine them, go to the Basic Commands section and click on the second tab (Algebra Commands). Then click on the Together button, followed by clicking on the Output from Above button in the Calculator section. After clicking on Enter, what is displayed for f '(x)?

__________________________ 2. Now plot f '(x) on the x-interval from -3 to 3. Determine the zeros of f '(x) on this interval to an

accuracy of 2 decimal places by re-plotting using smaller and smaller intervals around each x-intercept. The zeros of f '(x) are at x = ___________________ Now scroll up to examine the first plot. Is f '(x) undefined at any x in the interval (-3, 3)? _________ To summarize, the critical numbers for f (x) are (going left to right): x1 = , x2 =

________ ________ 3. Partition (-3, 3) into three smaller intervals using x1 and x2 as described in Step 1 at the top of the

page. The intervals are: ___________________________________________________

On which interval(s) is f '(x) positive? ____________________________ On which interval(s) is f '(x) negative? ____________________________

Page 22: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

22

On which interval(s) is f (x) increasing? ____________________________ On which interval(s) is f (x) decreasing? ____________________________ The function f (x) has a relative maximum at what value(s) of x? __________________ The function f (x) has a relative minimum at what value(s) of x? __________________

4. Now plot f (x) and f '(x) on the same graph for the x-interval from -3 to 3 to verify your answers. Clearly label the plots as f (x) and f '(x) using the Text tool . Then to prepare for printing, delete all the Plot commands and their graphs except for the last one. Delete any mistakes and then print out the notebook. To get ready for the next problem, delete everything but your name and class.

Problem IV This final problem is similar to the previous one, but we will use the function 5 2( ) sin( )x xf x = + on the interval (0, 4π). 1. Define the function above using the Sin button in the Calculator section, and then have Mathematica

find f '(x). What is displayed for f '(x)? _________________________ 2. Now plot f '(x) on the x-interval from 0 to 4π. Determine the zeros of f '(x) on this interval to an

accuracy of 2 decimal places by re-plotting using smaller and smaller intervals around each x-intercept. The zeros of f '(x) are at x =

_____________________ Now scroll up to examine the first plot. Is f '(x) undefined at any x in (0, 4π)? ____________ To summarize, the critical numbers for f (x) are (going left to right): x1 = , x2 =

________ ________ 3. Partition (0, 4π) as in the last problem. The intervals are: ____________________________________

On which interval(s) is f '(x) positive? _________________________ On which interval(s) is f '(x) negative? _________________________ On which interval(s) is f (x) increasing? _________________________ On which interval(s) is f (x) decreasing? _________________________ The function f (x) has a relative maximum at what value(s) of x? __________________ The function f (x) has a relative minimum at what value(s) of x? __________________

4. Now plot f (x) and f '(x) on the same graph for the x-interval from 0 to 4π to verify your answers.

Clearly label the plots as f (x) and f '(x) using the Text tool . Then to prepare for printing, delete all the Plot commands and their graphs except for the last one. Delete any mistakes and then print out the notebook. Hand in all four printouts with your lab assignment.

Page 23: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

23

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 5: GRAPHING WITH FIRST AND SECOND DERIVATIVES Inflection points In the last lab we saw that when f '(x) is positive, f (x) is increasing, and when f '(x) is negative, f (x) is decreasing. This lab will also use the concept that when f "(x) is positive, f (x) is concave up, and when f "(x) is negative, f (x) is concave down. We also saw that relative extrema occur only at critical numbers, that is, values of x where f (x) is defined but f '(x) is zero or undefined. In a similar way, inflection points (where concavity changes) can only occur at values of x where f (x) is defined but f "(x) is zero or undefined. In this lab we will use the graphs of f '(x) and f "(x) to help us determine the shape of the graph of f (x). Begin as usual by inserting your name and class time into a text cell at the beginning of the notebook. Problem I

In the first problem, we will analyze the graph of 2( )3

xf xx−

=−

.

1. Use the Define Function button and the Fraction button to enter the function above. Check to

make sure that it looks correct, and then use the Plot button to plot it on the x-interval from -4 to 4.

Recall that f (x) is undefined at vertical asymptotes, which can occur at zeros of the denominator. What (if any) are the values of x for which f (x) is undefined? __________________

2. Obtain f '(x) by entering: f’[x] and then clicking on Enter. Combine the fractions by clicking on the

Together button (second tab in Basic Commands section), followed by the Output from Above button (Calculator section), and then the Enter button. Plot this first derivative function on the x-interval from -4 to 4. What (if any) are the values of x for which f (x) is defined, but f '(x) = 0 or is undefined? __________________

3. To find f "(x), enter: f’’[x] (use two consecutive apostrophes, not the double quotation mark!), then

click on Enter. Again combine the fractions as you did in Step 2. Plot this second derivative function on the x-interval from -4 to 4. What (if any) are the values of x for which f (x) is defined, but f "(x) = 0 or is undefined? __________________

4. We will now use the x-values found in Steps 1, 2, and 3 to partition the domain of f (x) into open

intervals. The first interval will begin with – ∞ and the last interval will end with + ∞. The intervals and the partition points are entered into the first column of Table 1 on the next page:

Page 24: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

24

intervals and partition points f (x) f '(x) f "(x) shape of the graph of f (x)

( , 3)−∞ − #########

3−

( 3, 0)− #########

0

(0, 3) #########

3

( 3, )∞ #########

In the second column of the table, write in the value of f (x) at each of the partition points (not the intervals). To do this, click on the letter f followed by the Matching square brackets button . Then inside the brackets enter the partition point and click on Enter. (Note: If the function is undefined at a partition point, the output will be Indeterminate or ComplexInfinity. In this case, you can write "U" (for Undefined) or "± ∞" in the table.)

5. Next, scroll back up to examine the graph of f '(x) more closely. For each of the intervals in the

partition, examine whether f '(x) is positive (above the x-axis) or negative (below the x-axis) on that interval. Place a corresponding plus "+" or minus "–" sign in the table column under f '(x) for each interval.

Return to the end of the notebook and obtain the value of f '(x) at each partition point. Use the same method as in Step 4 but with f’ instead of f. Place the results in the table column under f '(x) for each partition point.

6. Now, scroll back up to reexamine the graph of f "(x). For each interval, examine whether f "(x) is

positive (above the x-axis) or negative (below the x-axis) on that interval. Place a corresponding plus or minus sign in the table column under f "(x) for each interval.

Then return to the end of the notebook to obtain the value of f "(x) at each partition point. Use the same method as in Step 4 but with f’’ instead of f. Place the results in the table column under f "(x) for each partition point.

7. Finally, we will see how this all relates to the graph of f (x). Scroll back up to the original graph of f (x) at the start of the notebook. Examine the graph at each partition point to determine whether there is a vertical asymptote, a relative maximum, a relative minimum, or an inflection point there. Write one of these four descriptions in the last column of the table for each partition point. (Notice the connection between the values of f (x), f '(x), f "(x), and the properties of the graph.)

Page 25: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

25

Now examine the graph of f (x) on each interval to determine whether the graph is increasing, concave up; or increasing, concave down; or decreasing, concave up; or decreasing, concave down there. Write one of these four descriptions in the last column of the table for each interval. (Again notice the connection between the values of f '(x), f "(x), and the properties of the graph.)

8. To prepare for printing, delete the Plot command for f "(x) and everything following it. Then

delete the Plot command for f '(x) and its graph. If there were any mistakes, delete those also. Then print out the notebook. On your printout, mark by hand any extrema or inflection points with a large dot. Lastly, delete everything except for your name and class time.

Problem II

Using the same method as the previous problem, we will analyze the graph of 2

2( )1

xf xx−

=−

.

1. Define the function above, check to make sure that it looks correct, and then plot it on the x-interval

from -4 to 4. What (if any) are the values of x for which f (x) is undefined? ______________ 2. Obtain f '(x) and combine the fractions as in the previous problem. Then plot it on the same interval.

What (if any) are the values of x for which f (x) is defined, but f '(x) = 0 or is undefined? __________

3. Obtain f "(x) and combine the fractions. Then plot it on the same interval. What (if any) are the

values of x for which f (x) is defined, but f "(x) = 0 or is undefined? ______________

4. Use the x-values from Steps 1, 2, and 3 to partition the domain of f (x) into open intervals. Write

down the intervals and partition points in the first column of Table 2 below, similar to the way it was done in the last problem. Then for each partition point, find the value of f (x) as in Step 4 of the previous problem, and place it in the second column of the table under f (x).

intervals and partition points f (x) f '(x) f "(x) shape of the graph of f (x)

#########

#########

#########

#########

Page 26: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

26

5. Scroll back up to the graph of f '(x) and examine each interval in the partition to see if f '(x) is positive or negative there. Mark a corresponding plus or minus sign in the table column under f '(x) for each interval. Then, for each partition point, find the value of f '(x) and place it in the same column.

6. Next scroll back up to the graph of f "(x). For each interval, mark a plus or minus sign in the table

column under f "(x) depending on whether f "(x) is positive or negative on that interval. Then, for each partition point, find the value of f "(x) and place it in the same column.

7. Now scroll back up to the graph of f (x). For each partition point and interval, fill in the last column

of the table using the descriptions given in the first problem. 8. Delete the Plot command for f "(x) and everything following it. Then delete the Plot command

for f '(x) and its graph. If there were any mistakes, delete those also. Then print out the notebook. On your printout, mark by hand any extrema or inflection points with a large dot. Lastly, delete everything except for your name and class time.

Problem III For the final problem, we will analyze the graph of 3 2( ) 2 2 1f x x x x= − − + . 1. Define the function above and plot it on the x-interval from -2 to 3. What (if any) are the values of x

for which f (x) is undefined? _______________ 2. Obtain f '(x) as before and plot it on the same interval. To find the zeros of f '(x), we could plot it

using smaller intervals as we did in the last lab assignment. We can get a more accurate answer, however, by having Mathematica solve the equation f '(x) = 0 automatically.

To do this, go to the Basic Commands section and click on the second tab (Algebra Commands). Then click on the NSolve button, which will give the solutions in decimal form. The first box is lhs, which is the left-hand side of the equation, so enter: f’[x] . The next box is rhs, which is the right-hand side of the equation, so enter: 0 . Then enter x for var and click on Enter. A set of two solutions for x are displayed. (Also, note that Mathematica uses a double equal sign for equations.)

Rounded to 2 decimal places, what are the values of x for which f (x) is defined, but f '(x) = 0 or is undefined?

__________________ 3. Obtain f "(x) as before and plot it on the same interval. Find the zeros of f "(x) by again using the

NSolve button. Again rounding to 2 decimal places, what are the values of x for which f (x) is defined, but f "(x) = 0 or is undefined?

___________________ 4. Use the x-values from Steps 1, 2, and 3 to partition the domain of f (x) into open intervals. Write

down the intervals and partition points in the first column of Table 3 on the next page, similar to the way it was done in the previous problem.

Page 27: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

27

Then for each partition point, find the value of f (x) as in Step 4 of the first problem, round it to 2 decimal places, and place it in the second column of the table under f (x).

intervals and partition points f (x) f '(x) f "(x) shape of the graph of f (x)

#########

#########

#########

#########

5. Scroll back up to the graph of f '(x) and examine each interval in the partition to see if f '(x) is

positive or negative there. Mark a corresponding plus or minus sign in the table column under f '(x) for each interval. Then, for each partition point, find the value of f '(x) and place it in the same column. (If an answer should be 0, but it’s slightly off due to rounding, then write 0 as the answer. Otherwise, round to 2 decimal places.)

6. Next scroll back up to the graph of f "(x). For each interval, mark a plus or minus sign in the table

column under f "(x) depending on whether f "(x) is positive or negative on that interval. Then, for each partition point, find the value of f "(x) and place it in the same column. (If an answer should be 0, but it’s slightly off due to rounding, then write 0 as the answer. Otherwise, round to 2 decimal places.)

7. Now scroll back up to the graph of f (x). For each partition point and interval, fill in the last column

of the table using the descriptions given in the first problem. 8. Delete the Plot command for f "(x) and everything following it. Then delete the Plot command

for f '(x) and its graph. If there were any mistakes, delete those also. Then print out the notebook. On your printout, mark by hand any extrema or inflection points with a large dot. Turn in all three printouts with your lab assignment.

Page 28: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

28

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 6: ESTIMATING AREAS WITH RECTANGLES Calculating rectangular areas In this lab we will estimate the area of the region between the curve f (x) and the x-axis, from x = a to x = b. We will do this by dividing the region into vertical strips, and approximating each strip by a rectangle. The total area of the rectangles is then an approximation to the area of the region. To accomplish this, we divide the interval [a, b] into n equally-sized subintervals of width b a

nx −∆ = . If *kx is any point within the k-th subinterval (k = 1, 2, …, n), then f ( *

kx ) can be used as the length of the rectangle which approximates the portion of the region on the k-th subinterval. The area of the

rectangle would then be *( )kf x x∆ , and the total area of the rectangles would be *

1( )

n

kk

f x x=

∆∑ . (Note:

This is assuming f (x) ≥ 0 on the interval [a, b].) The area under a curve Begin the lab by inserting your name and class time into a text cell. For this lab we will estimate the area of the region between f (x) = .1(x – 3)3

+ 3 and the x-axis, from a = 1 to b = 6. To get a picture of this region, define the function above and then plot it on the x-interval from 0 to 7. Notice that the function is positive and increasing on the interval [1, 6]. Midpoint approximation (n = 5) For our first estimate, we are going to use n = 5 subintervals. Thus 6 1 5

5 5 1b anx − −∆ = = = = . We will

let *kx be the midpoint of each subinterval, so that * 1 1

2 2( ) 1 ( )1kx a k x k= + − ∆ = + − . Thus the area of each rectangle is * 1

2( ) (1 ( )1)1kf x x f k∆ = + − . We will let Mathematica add these up for us. Go to the Advanced tab in the Calculator section and click on the Definite sum button . Since we want k to go from 1 to 5, enter k for index, 1 for start, and 5 for end. Then for expr, enter: f[1+(k–1/2)1]1 (Note: Make sure the brackets and parentheses are placed exactly as shown.) Click on Enter to get the total area of the 5 rectangles. What answer is displayed for the area? ____________________ To prepare for a printout, click on the graph so that a box appears around it. Using the mouse, drag the lower right corner of the box down and to the right until the graph is about twice as large as it was. Then click just below the box but above the summation. Now click on the Create Text Cell button and enter: Midpoint approximation with n=5. Next, click on the text cell bracket to highlight it, then right-click and select Size, or select Size from the Format menu. Change the size to 18 Point. Delete any mistakes and then select Print… from the File menu and click on OK. On the printout, draw in by hand the 5 rectangles whose length is determined by the midpoint of each subinterval.

Page 29: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

29

Left endpoint approximation (n = 5) Next we will obtain another estimate by using the left endpoint of each subinterval. In this case, *

kx = ( 1) 1 ( 1)1a k x k+ − ∆ = + − and so the area of each rectangle is (1 ( 1)1)1f k+ − . We can just modify

the previous summation to get this area. Click on the k-1/2 and change it to k-1 in the sum, then click on Enter. What answer is displayed for the area? ____________________ Notice that the result is somewhat smaller than the previous one. This is because when a function is positive and increasing, the left endpoint gives a rectangle whose top is always below the curve, and so it underestimates the area of the region. Now click in the text cell and change the text so that it says: Left endpoint approximation with n=5. Delete any mistakes and then print out the notebook. On the printout, draw in by hand the 5 rectangles whose length is determined by the left endpoint of each subinterval. Right endpoint approximation (n = 5) For our final estimate with n = 5, we will use the right endpoint of each subinterval. In this case, *

kx = 1 1a k x k+ ∆ = + ⋅ and so the area of each rectangle is (1 1)1f k+ . We can again modify the

summation to get this area. Click on the (k-1) and change it to k (there must be a space or * between the k and the 1), then click on Enter. What answer is displayed for the area? _______________________ Notice that the result is somewhat larger than the first one. This is because when a function is positive and increasing, the right endpoint gives a rectangle whose top is always above the curve, and so it overestimates the area of the region. Next click in the text cell and change the text so that it says: Right endpoint approximation with n=5. Delete any mistakes and then print out the notebook. On the printout, draw in by hand the 5 rectangles whose length is determined by the right endpoint of each subinterval. Turn in all three printouts with the lab assignment. Error analysis We will now try to get an idea of how accurate the midpoint approximation is. For a function that is always increasing (or always decreasing), the midpoint approximation – and the actual area – will always be between the left endpoint approximation and the right endpoint approximation. So the maximum error of our estimate would be the difference between both endpoint approximations. To find this maximum error, we can have Mathematica calculate it as follows: Click below the last output and enter the value of the right endpoint approximation that you wrote on this page. Now enter "–" (minus), then enter the value of the left endpoint approximation also from this page. Click on Enter. What is displayed for the maximum error when n = 5? ____________________

Page 30: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

30

Using n = 10 rectangles Delete everything except for your name and the definition for f (x). (Note: If you want to finish this lab at a later time, you would only need to re-enter your name and the definition for f (x), and then continue from here.) In order to get a more accurate estimate of the area, we need to use more rectangles that are smaller in width. We will let n = 10, so that 6 1 5 1

10 10 2x −∆ = = = . We will again calculate the midpoint, left endpoint, and right endpoint approximations, but you will not make any more printouts. For the midpoint, we have * 1 1

2 21 ( ) ( )kx k= + − , so the area of each rectangle is 1 1 12 2 2(1 ( ) ( ) ) ( )f k+ − . So

click on the Definite sum button and enter k for index, 1 for start, and 10 for end. Then for expr, enter: f[1+(k–1/2)(1/2)](1/2) and then click on Enter. (Note: Make sure the brackets and parentheses are placed exactly as shown.) What answer is displayed for the area? _____________________ For the left endpoint approximation, we now have * 1

21 ( 1) ( )kx k= + − , and so the area of each rectangle is 1 1

2 2(1 ( 1) ( ) ) ( )f k+ − . Click on the Input from Above button and modify the summation, changing the leftmost 1/2 to 1. Then click on Enter. What answer is displayed for the area? _____________________ Likewise, the right endpoint approximation gives * 1

21 ( )kx k= + , and so the area of each rectangle is 1 12 2(1 ( ) ) ( )f k+ . Click on the Input from Above button and modify the summation, changing the (k-1) to

k. Then click on Enter. What answer is displayed for the area? _____________________ Now subtract the right and left endpoint approximations to get the maximum error as described previously. Rather than typing the values, you can copy and paste them below the last output. First paste the right endpoint approximation, then enter "–" (minus), and then paste the left endpoint approximation and click on Enter. Notice that after pasting, Mathematica displays the values with more digits and with a backquote character ` after each (which can be ignored). What did you get for the maximum error when n = 10? _____________________ How does this answer compare to the maximum error when n = 5? ______________________________ Improving the estimate with more rectangles We would like to use even more rectangles to get more accuracy, but for each value of n, we have to recalculate ∆x. To simplify this work, we can let n be a variable in the expression for the area, and then substitute in different values for n. We will calculate just the left and right endpoint approximations for n = 100, 1000, and 10000, and enter them into the following table, along with the maximum errors. To begin with, write the values you obtained previously for n = 5 and n = 10 into the first two rows of the table. (Note: Again, if you want to finish this lab at a later time, you would only need to re-enter your name and the definition for f (x), and then continue from here.)

Page 31: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

31

n left endpoint sum right endpoint sum maximum error

5

10

100

1000

10000

limn→∞

Left endpoint sums Now, since 6 1 5

n nx −∆ = = , for the left endpoint we have * 51 ( 1) ( )k nx k= + − and so the area of each

rectangle is 5 5(1 ( 1) ( ) ) ( )n nf k+ − . So click on the Definite sum button and enter k for index, 1 for start, and n for end. Then for expr, enter: f[1+(k–1)(5/n)](5/n) but don’t click on Enter yet. This new summation can be evaluated using different values of n. Click on the ReplaceAll or substitution button in the Calculator section. Next type n, click on the Rule button in the Calculator section, and then enter 100. Now click on Enter to get the area. Put this number in the table under "left endpoint sum" and next to n = 100. We can use the same method for n = 1000. Click on the Input from Above button and change 100 to 1000, and then click on Enter. Write this answer in the table below the previous one. Repeat this procedure for n = 10000 and put the result in the table. Notice that the estimates are getting closer to each other as n gets larger. In order to get the exact area, we need to let n approach ∞. To do this, click on the Limit button on the third tab (Calculus Commands) in the Basic Commands section. For expr, click on the Input from Above button, but then delete the last part: /.n→10000. Then type n for var, and for value, click on the ∞ button in the Calculator section. Then click on Enter to get the exact area. Put the answer in the table next to lim

n→∞.

Right endpoint sums We will next fill in the column under "right endpoint sums" in a similar manner. For the right endpoint, we have * 51 ( )k nx k= + and so the area of each rectangle is 5 5(1 ( ) ) ( )n nf k+ . So click on the Definite

sum button and enter k for index, 1 for start, and n for end. Then for expr, enter: f[1+k(5/n)](5/n) and click on the ReplaceAll or substitution button . Next type n, click on the Rule button , and then enter 100. Now click on Enter to get the area, and write it in the table. Next, use the Input from Above button to substitute the values 1000 and 10000 for n and write the results in the table. Then use the Limit button to find the limit as n approaches ∞, and write it in the table.

Page 32: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

32

The definite integral Lastly, fill in the column of the table under "maximum error" by subtracting the right endpoint values minus the left endpoint values. (Note: Use copy and paste to avoid having to re-enter the numbers.) What happens to the maximum error as n increases? __________________________________________ When we reach lim

n→∞, the value of the area is the same no matter what point is used in the subintervals.

This value for the exact area is also known as the definite integral of f (x) from a to b.

Page 33: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

33

MATH 3A – CALCULUS AND ANALYTIC GEOMETRY Name: ____________________________________

LAB 7: EXPLORING THE FUNDAMENTAL THEOREM OF CALCULUS Fundamental Theorem – First Part The Fundamental Theorem of Calculus describes the relationship between derivatives and integrals.

The first part of the theorem states that if f (x) is continuous on [a, b], ( ) ( ) ( )b

af x dx F b F a= −∫ ,

where F(x) is any antiderivative of f (x) on [a, b]. In the previous lab, we saw that the definite integral

( )b

af x dx∫ can be described as the area of the region between the curve f (x) and the x-axis, from x = a

to x = b. (Note: If f (x) < 0 anywhere on [a, b], the definite integral is the net signed area.) In this lab we will calculate the area for a specific example and compare it to the value F(b) – F(a) obtained from an antiderivative. We will then explore graphically the connection between areas and antiderivatives. 1. Begin as usual by entering your name and class time into a text cell. We will first calculate

6 2 4

2(1 2 03 2). .x x dx− −∫ by finding *

1lim ( )

n

k kn kf x x

→∞=

∆∑ where 6 2 4k

b an n nx − −∆ = = = and

* 42 ( )k nx a k x k= + ∆ = + . (Note: This is the formula for the right endpoint. Since we are taking the limit, *

kx can be any point in the subinterval.) 2. Define the function 2 4( ) 1 2 03 2. .f x x x= − − . To see the region under consideration, plot the function

on the x-interval from 0 to 7. Notice that the region from a = 2 to b = 6 lies entirely above the x-axis.

3. Next we will find the exact area of this region. The expression for the area of a rectangle would be

4 4(2 ( )) ( )n nf k+ . So now click on the Limit button on the third tab in the Basic Commands section.

Then click on the Definite sum button on the Advanced tab in the Calculator section. Next enter k for index, 1 for start, and n for end. For expr, enter: f[2+k(4/n)](4/n) (Note: Make sure the brackets and parentheses are placed exactly as shown.) Then enter n for var, and for value, click on the ∞ button in the Calculator section. Lastly, click on Enter. What answer is displayed for the area of the region?

_____________________ 4. Now we will do an alternative calculation. On the Advanced tab in the Calculator section, click on

the Indefinite integral button . Enter f[x] for expr, enter x for var, and then click on Enter. The output is the antiderivative function F(x), with an integration constant of 0.

5. We want to calculate F(6) – F(2), so click on the Input from Above button. Then click on the

ReplaceAll or substitution button . Next enter x, click on the Rule button , and enter 6. Then click on Enter. What is displayed for F(6)?

_____________________

Page 34: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

34

6. Now click again on the Input from Above button and change the final 6 to a 2. Then click on Enter. What is displayed for F(2)?

_____________________ 7. Now subtract these last two answers. One way to do this is to copy and paste the value of F(6) below

the last output. Next, type "–" (minus), followed by a space. (Note: The space is important because F(2) is negative, and "– –" has a special meaning in Mathematica.) Then copy and paste the value of F(2) after the space, and click on Enter. What value is displayed for F(6) – F(2)?

_______________ (Note: It should be the same answer as the one displayed earlier for the area. This verifies what the Fundamental Theorem is saying, namely that an area can be obtained by using an antiderivative.)

8. Prepare for a printout by deleting any mistakes. Then print out the notebook. On the printout, shade

in by hand the region under the curve from a = 2 to b = 6. Areas and antiderivatives We will next explore graphically the relationship between areas and antiderivatives. To prepare for this, delete everything except your name and class time from the notebook. (Note: If you want to finish this lab at a later time, you only need to re-enter your name and class time and then resume from here.) We are going to calculate the net signed area between the curve 2( ) 4 3 2.f x x x= − + and the x-axis, from a = 0 to b = x. Since x is a variable, this will give us an area function – each value of x will produce a different value for the area. 1. Begin by defining the above function, and then plot it on the x-interval from 0 to 4. Since we want

the area from 0 to x, 0b a x xn n nx − −∆ = = = . Using the right endpoint, the area of each rectangle

would then be ( ) ( )x xn nf k ⋅ .

2. Let’s create an area function called A1 that uses n = 10 rectangles. Click on the Define Function

button and enter A1 for name, x for var, and for expr, click on the Definite sum button . Then enter k for index, 1 for start, n for end, and for expr, enter: f[k(x/n)](x/n) . Next, click on the ReplaceAll or substitution button , then enter n, click on the Rule button , and enter 10. Lastly, click on Enter. To see the graph of this area function, plot it on the x-interval from 0 to 4.

As an example, let's use this function to estimate the net signed area between the graph of f (x) and the x-axis from 0 to x = 2. To find this area, just enter: A1[2] and click on the Enter button. What value is displayed? This is the area estimate using n = 10 rectangles. _____________________

3. Now let’s increase the number of rectangles. Go back to the definition of function A1, copy it, and paste it below the last output. Change the name A1 to A2 and the value 10 to 30, then click on Enter. Now copy and paste the previous Plot command, change A1 to A2, and click on Enter to get the graph. Notice that the new curve is close to the previous one. Let’s compare the area value from 0 to x = 2. Enter: A2[2] and click on Enter. What value is displayed? _____________________ This is the area estimate using n = 30 rectangles.

Page 35: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

35

4. Now repeat the previous step, but this time using 100 rectangles. Copy and paste the definition of

function A2. Change A2 to A3, change 30 to 100, and then click on Enter. Now copy and paste the previous Plot command, change A2 to A3, and click on Enter to get the graph. To get the area from 0 to x = 2, enter: A3[2] and click on Enter. What value is displayed? ____________________ This is the area estimate using n = 100 rectangles.

5. In order to get the exact area function, we will have to take the limit. Click on the Define Function

button and enter A for name and x for var. For expr, click on the Limit button on the third tab in the Basic Commands section. Then go back up to the definition of function A3, and copy the summation (everything starting from the sigma and ending just before the ReplaceAll symbol (/.)). Next go back down to the Limit command, click on expr, and paste the summation. Then enter n for var, and for value, click on the ∞ button. Click on Enter, and then copy and paste the previous Plot command. Change A3 to A and then click on Enter to get the graph. To get the area from 0 to x = 2, enter: A[2] and click on Enter. What value is displayed? _____________________ This is the exact value of the net signed area between the graph of f (x) and the x-axis from 0 to 2.

6. To verify this result in another way, go to the Advanced tab in the Calculator section and click on the

Definite integral button . Then enter 0 for lower, 2 for upper, f[x] for expr, x for var, and then click on Enter. What value is displayed for the definite integral? _____________________ (Note: It should be the same as your previous answer.)

7. To see how the four area functions are related, we will plot them all on the same set of axes. Go to the 2D tab and click on the Plot button. Next, in the Calculator section, click on the Matching braces button . Now, inside the braces, enter: A1[x],A2[x],A3[x],A[x] and then enter x for var, 0 for min, and 4 for max. Click on Enter and the graphs appear from bottom to top, with the area curves getting closer together and approaching the exact area function.

8. Now in order to better compare A(x) to f (x), let's plot them on the same set of axes. Click on the Plot

button and then on the Matching braces button . Inside the braces, enter: f[x],A[x] and then enter x for var, 0 for min, and 4 for max. Then click on Enter.

Let's label these graphs to distinguish them. Click on the Drawing Tools… button at the bottom of the 2D tab. When the 2D Drawing palette appears, click on the Text tool . Then click near the graph of f (x) (the parabola). Enter: f[x] and then click somewhere else on the graph. To make the text larger, double-click on it, and then on the Format menu, select Size and change the font size to 16 Point. Then click somewhere else on the graph to remove the box. Now click again on the Text tool , and then click next to the graph of A(x) (the area function). This time enter: A[x] and then click elsewhere. Double-click on it and change the font size as above. If you are satisfied with the text positions, click below the plot and close the 2D Drawing palette.

Page 36: MATH 3A CALCULUS LAB ASSIGNMENTS - … complete the assignments, read each lab carefully from beginning to end while seated at a computer with Mathematica running. Follow all instructions

36

To see why A(x) is the area function, notice that as x increases from 0, the graph of A(x) increases until it reaches a relative maximum. At this point the graph of f (x) drops below the x-axis, resulting in negative values for the areas of the rectangles in this region. When these negative amounts are added to the total area, it causes the graph of A(x) to decrease until it reaches a relative minimum. At this point the graph of f (x) rises above the x-axis and the rectangles have positive areas there, causing the total area function A(x) to increase again. Another important feature to notice is that f (x) = 0 at the relative extrema of A(x). Also, when A(x) is increasing, f (x) is positive, but when A(x) is decreasing, f (x) is negative. This suggests that f (x) is the derivative of A(x). In other words, A(x) is the antiderivative of f (x). Since A(x) is also an area function, we have just demonstrated graphically how areas and antiderivatives are related.

8. To prepare for a printout, delete everything except for the following: your name; the definitions of f, A1, A2, A3, and A; and the last two Plot commands and their graphs. Delete any mistakes and then print out the notebook.

Fundamental Theorem – Second Part For the last part of this lab, we will verify the second part of the Fundamental Theorem of Calculus,

which states that for a continuous function f (x), ( ) ( )x

a

ddx

f t dt f x = ∫ . Begin by deleting

everything in the notebook except for your name and class time. (Note: If you want to finish this lab at a later time, you only need to re-enter your name and class time and then resume from here.)

We will use an example to verify the second part of the theorem, namely 0

22

21

x tt

ddx

dt−+

∫ = 2

22

1x

x−+

.

1. First define the function 2

22

1( ) t

tf t −

+= and then plot it on the t-interval from 0 to 4.

2. Next create an area function A(x) by clicking on the Define Function button. Enter A for name, x for

var, and for expr, click on the Definite integral button . Now enter 0 for lower, x for upper, f[t] for expr, and t for var. Click on Enter and then plot A(x) on the x-interval from 0 to 4. Move the scroll bar so that both plots are visible at the same time. Notice once again that f is the derivative of the area function A, and so the area function A is the antiderivative of f. Now enter: A[x] and click on Enter to get the formula for A. What is displayed for A(x)? _______________________________

3. To find [ ]( )ddx A x , we will use an alternate notation for the derivative. On the Advanced tab in the

Calculator section, click on the Derivative button . Enter A[x] for expr, x for var, and then click on Enter. What is displayed for the derivative of A(x)? ___________________________________ To make the answer look more like the original function, go to the second tab (Algebra Commands) in the Basic Commands section and click on the Together button. Next click on the Output from Above button in the Calculator section, and then click on Enter. This is now the function that we started with, although using x instead of t (since the area was a function of x).

4. For the final printout, delete any mistakes and then print out the notebook. Turn in all three printouts

with your lab assignment.