Www.math.tamu.edu



Instructions.

Complete Lab 8 in Python using the following hints

This lab MUST be completed in groups. No individual work will be accepted.

Teams will work together on the posted problems. Details on how to work on the problems and what to submit are explained in the "Overview" of the Lab Schedule (). 

This lab with overview at ) focuses mostly on Section 4.6, "Graphing with Calculus and Computers", showing that just looking at the graph of a function does NOT always tell the full story!  In addition, there is a question related to the Mean Value Theorem, and understanding the reasoning behind L'Hospital's Rule.

Here are the key Python commands used, along with links to the online help pages.  New commands are italicized and has been added to the online documentation.

symbols: 

(Used to create symbolic variables.  NOTE that in #1 and #2, the variable is forced to be real to eliminate possible complex solutions in the critical values.)

diff: 

(Needed for all problems.)

print: 

(All answers and explanations should be given using print commands.)

simplify: 

(Used to print the simplified derivative in #1a and can also be used to print the simplified f '  and f '' in #2-3)

subs: 

(Needed on all problems: to determine the "C" in #1c, to find the test-values of f ' and f '' around the critical values in #2 and #3, and to apply the Linear Approximation formula in #4c)

plot: 

(Used in #2-4 to plot the function-and Linear Approximations in #4.  Can also be used to plot the derivative and second derivative to determine the signs graphically. On #4, you can also use the extend command to show the functions and Linear Approximations in different colors.  This is not required although.)

ylim: 

(Can be used within the plot commands to change the ymin and ymax of the graph. As stated in the Overview, trying to manipulate this to see everything without Calculus is likely pointless in many cases.  I recommend plotting in the default y-range, and if that doesn't look useful, use the "Standard Calculator" range of -10 to 10)

solve: 

(Needed to find the critical values in #2 and #3)

float: 

(Used to convert critical values to decimals in #1-2-necessary since solve gives answers in the form of "RootOf", which is also addressed in the Overview.  While you cannot convert a list to decimals using .evalf(), you CAN do it using list comprehension with the float command as done here!)

for: (list comprehension) 

(Needed for the float conversion of critical value solutions in #1 and #2 and to numerically test the sign of f ' and f '' at numbers around the critical values)

nsolve: 

(On #3, the critical values cannot easily be found algebraically using solve-even using evalf on the results gives solutions with complex residues. This command will numerically solve an equation given an initial "guess" which you can determine from the graph. Check the Overview for more.)

limit: 

(Needed for #4d)

factor: 

(Needed on #4c.  See note below.)

Some Comments

#1 The point of this problem is for you to see that f ' - g ' simplifies to 0, so this means f - g is a constant.  You can then substitute a specific value (any) into f - g to determine that constant (which is also 0), thus proving that f and g are equal!

#4 When you find the Linear Approximations, you should print the factored form of each, which come out to the form P(x-1) and Q(x-1).  Observe that the limit of f/g ends up being P/Q.  You may also notice that P = f '(a) and Q = g'(a), thus giving an explanation of L'Hospital's Rule when f(a)=g(a)=0 and f ' and g' are continuous. 

Let me know if you have any questions or comments about next week's lab.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download