Math 126 Spring 2014 Computer Lab 2 General Information This lab should be completed using Mathematica. Mathematica is installed on the machines in the math computer lab in the Math Center (KAP 265/265) and the lab assistants there can help you should you need it. Should you want you to work on this lab on the weekend or in the evenings, the computers in Leavey Library, Waite Phillips Hall, and King Hall are available and have Mathematica. If you haven’t used Mathematica before, I recommend that you read through F. J. Lin’s “Introduction to Mathematica for Math 125 and 126” and R. E. Bruck’s “Mathematica Crib Sheet” to have at your side. These can be found on Blackboard in the Mathematica Folder. Remember also that there are lab assistants in the math computing lab to help you. This lab has two parts. Each part explores an application of integration. The lab should be completed using Mathematica. Please turn in this booklet with the answers written in the spaces provided, and a printout of each Mathematica notebook you created in the process. Please be sure to edit your notebook(s) before printing to exclude any extraneous commands. Part 1: Average Values of Functions In this part we use Mathematica to explore the value of limb→a fave,[a,b] , where fave,[a,b] denotes the average value of f(x) on the interval [a, b]. The average value of f(x) on the interval [a, b] is defined as 1 b−a R b a f(x)dx. First we find its value for a variety of functions, f and values of a. Looking at the answers we obtain we make a conjecture about its value for a general function, f, and general value of a. We try to understand why this conjecture should be true and then we push the limits of the truth of the conjecture and come up with an example of where it is false. 1. Define the function, fave[a, b], to calculate the average value of f(x) on the interval [a, b]. You can do this with the commands: Clear[f ] fave[a ,b ] = (1/(b-a))*Integrate[f[x], {x, a, b}] 2. Define f(x) to be the function f(x) = x 4 and have Mathematica calculate limb→2 fave,[2,b] as follows: f[x ] = xˆ4 Limit[fave[2, b], b → 2] What do you get? Now have Mathematica calculate limb→−3 fave,[−3,b] . What do you get? 3. Clear f and redefine it to be the function f(x) = e x 2 . Recall that e in Mathematica is represented with a capital letter, E. Calculate limb→3 fave,[3,b] . What do you get? Calculate limb→1.7 fave,[1.7,b] . What do you get? 4. Clear f again and redefine it to be the function f(x) = sin x x . What is the value of limb→4 fave,[4,b]? 5. Consider your answers to questions 2, 3, and 4 above. Make a conjecture about the value of limb→a fave,[a,b] for a general f and a. 6. Why do you think that the conjecture in question 5 is true? To answer this, think about what fave,[a,b] represents and what its value is when b is very close to a. 7. Now that you’ve convinced yourself that the conjecture is true, find a function and a number a for which the conjecture is false. Explain why it is false for your choices of f and a. (Hint: continuity is the key word here.) Part 2: Arc-length of x n In this part we explore the arc-length of the curve y = x n , 0 ≤ x ≤ 1 for different values of n. We make a conjecture about what’s happening to the arc-lengths as n gets larger and larger. We then sketch the curves and use the sketches to explain why our conjecture is true. 1. Define arclen to be the arc-length of the curve y = x n on the interval 0 ≤ x ≤ 1. You can do this with the command: arclen = Integrate[Sqrt[1 + D[xˆn, x]ˆ2], {x, 0, 1}] Notice that Mathematica returns a rather complicated expression. This is because the antiderivative involved in this calculation cannot be expressed in terms of elementary functions. 2. Find the value of arclen when n = 1 by simply typing: arclen/.n → 1 What do you get? . 3. Find the numerical value of arclen when n = 10, 20, 100, 500 and 1000. Remember to use //N at the end of the command to get Mathematica to express the answer numerically rather than in terms of the cryptic Hypergeometric2Fl function. Fill in the table below. Value of n Arclength of y = x n 1 10 20 100 500 1000 4. What appears to be happening to the arclengths as n gets larger and larger? 5. Plot the graphs of y = x n for the values of n we used above. You can do this with the single command: Plot[{x, xˆ10, xˆ20, xˆ100, xˆ500, xˆ1000}, {x, 0, 1}, PlotRange → {0, 1}] Notice that we set the PlotRange option in order to be able to see the complete curves from y = 0 to y = 1. Use your graphs to explain why your answer to question 4 is correct.

  • 8 years ago
Math 126 Computer Lab 2
NOT RATED

Purchase the answer to view it

blurred-text
  • attachment
    define_the_function_a.pdf
  • attachment
    define_the_function_a1.pdf
  • attachment
    define_the_function_a2.zip