# Ostobee Zorn vol 2 > # P. 46, no 3. # # This problem asks for the left, tight, and midpint regular estimates of an intgral, which the book abbreviates # as # > L[n] = Sum(f(x[i])*Delta[n],i=0..n-1);M[n] = Sum(f((x[i]+x[i+1])/2)*Delta[n],i=0..n-1);R[n] = Sum(f(x[i])*Delta[n],i=1..n ); # # # The Maple Student package has these # functions built in and may be useful for calculating examples. To use it you must first load the package -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- > \ > > with(student); -------------------------------------------------------------------------------- > # For help on any of these topics, say middlesum do as follows > ?middlesum > # For instance, if f is a function then the general form would be # > middlesum(f(x),x=a..b,n); -------------------------------------------------------------------------------- # This does not look exactly like the form in the book. You should carefully # Following the information given we see that what we want is > MIDSUM:=middlesum((2*x)^(1/3),x=0..5,10);LEFTSUM:=leftsum((2*x)^(1/3),x=0..5,10);RIGHTSUM:=rightsum((2*x)^(1/3),x=0..5,10); -------------------------------------------------------------------------------- > evalf(MIDSUM); # The accompanying picture is > middlebox((2*x)^(1/3),x=0..5,10); > ** Maple V Graphics ** > > # You should make certain that you can indentify each of the following terms in the graphical (pictures) and # analytic expressions (formulas) . > f(x[i]);Delta[n]=(b-a)/n; x[i]=a+i*Delta[n]; -------------------------------------------------------------------------------- # The student package will also calculate the trapezoid approximation. Note that THE TRAPEZOID # APPROXIMATION AND THE MIDPOINT APPROXIMATION ARE NOT THE SAME. -------------------------------------------------------------------------------- > TRAPEZ:=trapezoid( (2*x)^(1/3),x=0..5,10); -------------------------------------------------------------------------------- > evalf(TRAPEZ); -------------------------------------------------------------------------------- # Make sure that you understand why they are not the same. Its because for any function whose graph is not a # straight # line its NOT TRUE that > ITSNOTTRUETHAT :=f( (x+y)/2) = f(x/2)+f(y/2); -------------------------------------------------------------------------------- # You should take the time to look at the MIDSUM graph, draw in the trapezoid sums and see that the areas aren't # the # same. You should also understand why they are the same if the ITSNOTTRUETHAT rule holds. # # NOTE: there is an error in the middlebox of the Windows version of Maple Release 4 (the latest one). You can # see from almost any example where the graph of f is not a straight line that there is a problem: the graph does not # go # through the middle of the tops of the boxes (why is this a problem?). The display shown  is actually the area that # would be calculated by the trapezoid rule. If you are intrested you can actually see the error in the code with the # following command: # > interface(verboseproc=2) ;print(student[middlebox]); # the older versions have a line that looks like this # # `` mbox := <[a,0,a,f(1/2*a+1/2*b),b,f(1/2*a+1/2*b),b,0]|f,a,b>; '' # # Note that you can see the mid point value being calculated. Look in the new version on Windows and see if you # can pick out the problem. # # # p. 47 no 10. # # The Riemann Integral is > > Limit(Sum(f(x[i])*Delta[n], i=1..n),n=infinity)=Int(f(x),x=a..b); -------------------------------------------------------------------------------- # Given a random sumation its usually very difficult to re-arrange and interepret its sums to find a function f and # limits a and b such that the limiting value of the sum is the integral. They may not even exist. However if one is # told at the outset that they do then its often not so hard to do. Consider the given problem -------------------------------------------------------------------------------- > Limit(1/n*Sum((i/n)^3, i=1..n),n=infinity)=Int(f(x),x=a..b); -------------------------------------------------------------------------------- # We can surmise that > f(x)=x^3; Delta[n]=1/n; -------------------------------------------------------------------------------- # We need a and b. If f(x) = x^3 then > f(x[i])=(i/n)^3; -------------------------------------------------------------------------------- # suggests x[i] = i/n. Now we look at the index of summation and find the largest and smallest indices - here they # are i=1 and i=n (on other problems they may be i=0 and i=n-1). Thinking about the definition we know that that # for the left and right sums > a=x[0]; b=x[n]; # This tells us that a=0 and b=1. Now if we go back and calculate the right Riemann sum of f(x)=x^3 on the interval # [0,1] we get exactly the sum in the problem. -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- # p 47 no 12 # # The hint wants you to note that the denominators of the coefficients are 1*2, 2*3,3*4, 4*5, ..., j*(j+1); With that in # mind we quiclky see that one way to write this is > Sum(5/(i*(i+1))*(1.8+i*.5)^2,i=1..4); # # Although a carefully considered reason why it should not be is acceptable the sum actually is NOT part of a # Riemann sum # approximation to the integral of x^2 from 0 to 4. . The end points of the interval (the PARTITION) would have to # be # > x[0]:=0;x[1]:=2.5;x[2]:=x[1]+5/6; x[3]:=x[2]+5/12; x[4]:=x[3]+5/20; -------------------------------------------------------------------------------- # Note that 2.3 lies in the first interval, 2.8 in the second, 3.3 does NOT lie in the third (which is [3.333, 3.75] , and # 3.8 in in the fourth. -------------------------------------------------------------------------------- >