MAT 156 LAB 2Topic 1: DerivativesWe first define the function NiMvLSUiZkc2IyUieEcqJEYnIiIk and the expression f3=NiMqJEkieEc2IiIiIw==. Maple treats functions and expressions differently.f:= x->x^3;
f3 := x^2;In these examples f is a function and f3 is an expression. To find the derivative of f we can use either of the following methodsD(f);
diff(f(x),x);
Notice that the first method produced a function and the second just an expression. To find the derivative of f3 we must use diff. There is also a way to find second derivative. In these examples I am assignming names to the derivative and the second derivative.df3 := diff(f3,x);
d2f3:= diff(f3,x$2);
Now we can come back to the function g(x)=NiMsKCokSSJ4RzYiIiIlIiIiKiYiIidGKCokRiUiIiRGKCEiIkYoRig= we studied in Lab 1 and find its minimum. Recall that the points where g'(x)=0 are called critical pointsand we search among these points for (local) maxima and (local) minima. Compute the derivative of g(x) and solve the equation g'(x)=0.Now find the minimum value. It defers from what we saw in the graph only at the third and fourth decimal digit!We also see that the graph of g(x) changes concavity. The points where the graphs changes from concave upwards to concavedownwards (or vice versa) are called inflection points. They are found among the points where g''(x)=0. Find the inflection points for g(x).D(D(g));plot(g(x), x=-1..4);Example: Graph the function h(x)= NiMsKCokSSJ4RzYiIiIjIiIiKiYiI0NGKEYlRihGKCIjOkYo. How do you know that the initial graph is not good enough?Write a complete statement.This cannot be the whole story, since h(x) is a quadratic polynomial, so its graph should be a parabola. To find the peak of the parabola (called vertex), we notice that it is the minimum and we identify it by finding the critical point h'(x)=0. Plot the parabola to show its vertex.Topic 2: Velocity and Distance travelled.In this rest of this lab we will explore a velocity function and the distance we travelled. NiMtJSQ8LD5HNiktJSQ8fGdyPkc2JC0lJVRpbWVHNiMlJHNlY0ctJSlWZWxvY2l0eUc2IyomJSNmdEciIiJGLCEiIi1GJzYkIiIhIiM/LUYnNiRGMiIjSS1GJzYkIiIjIiNRLUYnNiQiIiQiI1ctRic2JCIiJSIjWy1GJzYkIiImIiNdIt ends up that the table has been created using the following complicated function.f := t->-22108.111351860603123*t^12+267716.97873114933992*t^7-28550.588718383953421*t^4-.69089471139707261503e-1*t^18-593.25933891402415755*t^2+88214.018798090967877*t^5-182944.24328666353298*t^6+5693.6391073166057753*t^3-285572.24388626189800*t^8+227046.45357947547549*t^9-136597.49693854806554*t^10+62764.645490312705181*t^11+1.5172197744989322043*t^17+5957.3207937003999701*t^13-1217.1081971634308471*t^14+185.14666942246783552*t^15-20.307901075143421783*t^16+.14466922546287623311e-2*t^19+33.706872407075593812*t+20;We do not care about the formula above.Topic 3: Plotting left-hand-sums.Maple allows us to see graphically left-hand sums using the command leftbox(function, variable= lower limit .. upper limit, number of intervals), as seen below. Notice that we must use in the function the same variable as in variable. First we introduce the package for students:with(student): Digits:=20:leftbox(f(t), t=0..5, 5);The command Digits:=20 asks Maple to work with 20 decimal digits. This is a choice that I found to be good for this lab. It does not have to be the case always.For future use we will give names to our plots. This can be done the same way as any other expression. However, we do not want to seethe result immediately, so we will use colon, rather than semicolon.lhs5:=leftbox(f(t), t=0..5, 5):It ends up that we do not get a good approximation of the distance we travel. To improve our results we use data for our velocity every half second, rather than every second. This gave us the table: NiMtJSQ8LD5HNigtJSQ8fGdyPkc2JCIiISIjPy1GJzYkLSUmRmxvYXRHNiQiIiYhIiIiI0UtRic2JCIiIiIjSS1GJzYkLUYuNiQiIzpGMSIjTi1GJzYkIiIjIiNRLUYnNiQtRi42JCIjREYxIiNV<<3 | 44> , <3.5 | 46> , <4 | 48> , <4.5 | 49>, <5| 50>>;Write a command that produces graphically the left-hand-sum with 10 intervals.Write a command that gives a name to the previous plot. Create plots (and names) for the left-hand sum with 20, 40, 80 and 160 subintervals. You should be able to see how closer they fit under the curve and that the area under the curve seems to be the limit of the left-hand sums as the number of subintervals increases to infinity.Topic 4: Plotting right-hand sums.In Maple there is a command also for seeing graphically the right-hand sums. We use rightbox( function, variable= lower limit .. upper limit, number of subintervals). See the example:rightbox(f(t), t=0..5, 5);We can also name the plot. An appropriate name would be rhs5.rhs5:=rightbox(f(t), t=0..5, 5):Write commands to see graphically the right-hand sums with 10, 20, 40 , 80, 160 subintervals. Write commands that name these plots.Write your comments on what you notice for the right-hand sums, e.g. are they underestimates, or overestimates and why? Do they increase or decrease when the number of subintervals increase? Where do they converge? Topic 5: Comparing left-hand sums with right-hand sums.Now we would like to see the left-hand sums and the right-hand sums simultaneously. To do this we first load the plots package:with(plots):Let us first display the left-hand sum and the right-hand sum with 5 subintervals. The command is display(name_1, name_2);display(lhs5, rhs5);Write commands that show you at the same time the left-hand sums and the right-hand sums with the same number of subintervals for NiMlIm5H=10, 20, 40, 80. What do you notice about the error in the approximation?Now we will work with the function g(x)=1/x and the integral NiMtJSRpbnRHNiQqJiIiIkYnJSJ4RyEiIi9GKDtGJyIiIw== .Graph the left-hand sums and right-hand sums with n=2, 4, 8, 16, 32, 64 subintervals.