Instructor Hentzel Office Phone: 515-294-8141 E-mail: hentzel@iastate.edu Math Department Fax: 515-294-5454 http://www.math.iastate.edu/hentzel/class.165.09 Textbook: Calculus by Varberg, Purcell, Rigdon, ninth edition. Friday, October 30 4.2 The Definite Integral Assignment: Page 231: Problems 2, 6, 16, 30, Main Idea: We find where your car is located, not how much gas is used. Key words: Riemann Sums, Norm, Mesh Size, Upper Sums, Lower Sums Positive Area, Negative Area Goal: Introduce the Riemann Sums. ##################################################################### Previous Assignment: Page 222: Problems 20, 26, 39, 46 Page 222 Problem 20 Find the sum 10 SUM [ (i-1)(4i+3) ] i=1 ##################################################################### 10 2 SUM [ 4 i -i - 3 ] i=1 10 2 10 10 4 SUM i - SUM i - 3 SUM 1 i=1 i=1 i=1 4 10 11 21/6 - 10 11/2 - 30 = 1455 ================================= Sum[(i-1)(4i+3), {i,1,10}] ================================= ##################################################################### Page 222 Problem 26 Prove the following formula for a geometric sum. n+1 n k 2 3 n a - ar SUM a r = a + a r + a r + a r + ... + a r = --------- (r =/= 1) k=0 1-r ##################################################################### 2 3 n Proof: a + a r + a r + a r + ... + a r 1-r ------------------------------------------ 2 3 n a + a r + a r + a r + ... + a r 2 3 n n+1 - a r - a r - a r - ... - a r - a r ------------------------------------------------------- n+1 a - a r Thus n k n+1 (1-r) SUM a r = a - a r k=0 n+1 n k a - a r so SUM a r = ---------------- k=0 1-r ##################################################################### Page 222 Problem 39 A grocer stacks oranges in a pyramid like pile. If the bottom layer is rectangular with 10 rows of 16 oranges and the top layer has a single row of oranges, how many oranges are in the stack? ##################################################################### 10 16 + 9 15 + 8 14 +7 13 + 6 12 + 5 11 + 4 10 + 3 9 + 2 8 + 1 7 = 715 9 SUM (10-i)(16-i) i=0 9 2 SUM 160 -26 i + i i=0 9 9 9 2 160 SUM 1 - 26 SUM i + SUM i i=0 i=0 i=0 160 10 - 26 9 10/2 + 9 10 19/6 = 715 ##################################################################### Get["font.math"]; A = Table[0,{i,1,10}]; f[{x_,y_,z_}] := Graphics3D[ {RGBColor[x/18,1-y/10,1-z/10],PointSize[0.02], Point[{x,y,z}]}]; A[[1]] = Table[ f[{x,y,1}], {x,1,16},{y,1,10}]; A[[2]] = Table[ f[{1/2+x,1/2+y,2}], {x,1,15},{y,1, 9}]; A[[3]] = Table[ f[{2/2+x,2/2+y,3}], {x,1,14},{y,1, 8}]; A[[4]] = Table[ f[{3/2+x,3/2+y,4}], {x,1,13},{y,1, 7}]; A[[5]] = Table[ f[{4/2+x,4/2+y,5}], {x,1,12},{y,1, 6}]; A[[6]] = Table[ f[{5/2+x,5/2+y,6}], {x,1,11},{y,1, 5}]; A[[7]] = Table[ f[{6/2+x,6/2+y,7}], {x,1,10},{y,1, 4}]; A[[8]] = Table[ f[{7/2+x,7/2+y,8}], {x,1, 9},{y,1, 3}]; A[[9]] = Table[ f[{8/2+x,8/2+y,9}], {x,1, 8},{y,1, 2}]; A[[10]] = Table[ f[{9/2+x,9/2+y,10}], {x,1, 7},{y,1,1}]; p1 = Show[A,PlotLabel->"P222 p39 Oranges 16x10",AspectRatio->Automatic]; Export["/math/www/hentzel/class.165.09/oct30.p39u.pdf",p1]; ##################################################################### Get["font.math"]; A = Table[0,{i,1,10}]; f[{x_,y_,z_}] := Graphics3D[ {RGBColor[1,0,0],PointSize[0.02],Point[{x,y,z}]}]; A[[1]] = Table[ f[{x,y,1}], {x,1,16},{y,1,10}]; A[[2]] = Table[ f[{1/2+x,1/2+y,2}], {x,1,15},{y,1, 9}]; A[[3]] = Table[ f[{2/2+x,2/2+y,3}], {x,1,14},{y,1, 8}]; A[[4]] = Table[ f[{3/2+x,3/2+y,4}], {x,1,13},{y,1, 7}]; A[[5]] = Table[ f[{4/2+x,4/2+y,5}], {x,1,12},{y,1, 6}]; A[[6]] = Table[ f[{5/2+x,5/2+y,6}], {x,1,11},{y,1, 5}]; A[[7]] = Table[ f[{6/2+x,6/2+y,7}], {x,1,10},{y,1, 4}]; A[[8]] = Table[ f[{7/2+x,7/2+y,8}], {x,1, 9},{y,1, 3}]; A[[9]] = Table[ f[{8/2+x,8/2+y,9}], {x,1, 8},{y,1, 2}]; A[[10]] = Table[ f[{9/2+x,9/2+y,10}], {x,1, 7},{y,1,1}]; p1 = Show[A,PlotLabel->"P222 p39 Oranges 16x10",AspectRatio->Automatic]; Export["/math/www/hentzel/class.165.09/oct30.p39v.pdf",p1]; p2 = Show[p1,ViewPoint->{0,0,8}]; Export["/math/www/hentzel/class.165.09/oct30.p39w.pdf",p2]; p3 = Show[p1,ViewPoint->{0,9,0}]; Export["/math/www/hentzel/class.165.09/oct30.p39x.pdf",p3]; p4 = Show[p1,ViewPoint->{9,0,0}]; Export["/math/www/hentzel/class.165.09/oct30.p39y.pdf",p4]; p5 = Show[p1,ViewPoint->{9,9,8}]; Export["/math/www/hentzel/class.165.09/oct30.p39z.pdf",p5]; ##################################################################### Page 222 Problem 46 Find the area of the indicated inscribed or circumscribed polygon. y = x+1 from x=0 to x=2, 8 cells. ##################################################################### 1/4 ( 1/4+1 + 2/4+1 + 3/4+1 + 4/4+1 + 5/4+1 + 6/4+1 + 7/4+1 + 8/4+1) = 17/4 8 1/4 SUM i/4+1 i=1 8 8 1/16 SUM i + 1/4 SUM 1 i=1 i=1 1/16 8 9/2 + 1/4 8 = 17/4 ##################################################################### Get["font.math"]; f[x_] := x+1; p1 = Plot[f[x],{x,0,2}]; p2 = Table[ Plot[f[n 1/4],{x,(n-1)/4,n/4}, PlotStyle->{RGBColor[1,0,0]}],{n,1,8}]; p3 = Table[ ParametricPlot[ {(n-1) 1/4,y},{y,0,f[n/4]}, PlotStyle->{RGBColor[1,0,0]}],{n,1,8}]; p4 = ParametricPlot[ {2,y},{y,0,f[2]},PlotStyle->{RGBColor[1,0,0]}]; p5 = Show[p1,p2,p3,p4, PlotLabel->"P222 p46 y = 1+x", PlotRange->All, AspectRatio->Automatic, AxesLabel->{x,y}, AxesStyle->Directive[Orange,15], TicksStyle->Directive[Red,12], AxesOrigin->{0,0} ]; Export["/math/www/hentzel/class.165.09/oct30.p46.pdf",p5]; ##################################################################### New Material: The Definite Integral. A Riemann Sum for y = f(x) on [a,b] is n SUM f(# ) (x -x ) i=1 i i i-1 Where a = x < x < x ... < x = b is a partition of [a,b] 0 1 2 n and x <= # <= x i-1 i i ##################################################################### Actually, as complicated at that appears, it is not that complicated. We want to find the area under a curve y = f(x). | | . | .--| | .__| | | . .___'---| | | | .__|--| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------+----------------------------------------- | a b ##################################################################### So we add up the areas of the rectangles to get the area under the curve. Where do we put the top of the rectangle. It really does not matter where, as long as it intersects the curve. We can easily get the top of the rectangle to cross the curve by drawing it through a point f(#) for some # in the sub interval. The vertical lines are drawn at points a = x < x < x < x < ... < x = b 0 1 2 3 n which is called a partition. The points where the function is evaluated are # . The maximal width of the rectangles i from this partition is called the mesh of the partition. ##################################################################### Get["font.math"]; f[x_] := Sqrt[x + 4 Sin[x] ]; a = Plot[f[x],{x,0,20},PlotStyle->{Thickness[0.005]},PlotRange->All]; left = Table[ ParametricPlot[ {i,y},{y,0,f[i+1/2]}, PlotStyle->{RGBColor[1,0,0],Thickness[0.005]},PlotRange->All],{i,1,19}]; right = Table[ ParametricPlot[ {i+1,y},{y,0,f[i+1/2]}, PlotStyle->{RGBColor[1,0,0],Thickness[0.005]},PlotRange->All],{i,1,19}]; top = Table[ ParametricPlot[ {x,f[i+1/2]},{x,i,i+1}, PlotStyle->{RGBColor[1,0,0],Thickness[0.005]},PlotRange->All],{i,0,19}]; bottom = Table[ ListPlot[ {{i+1/2,0}},PlotStyle->{RGBColor[0,0,1]}, PlotRange->All],{i,0,19}]; spots = Table[ ParametricPlot[ {i+1/2,y},{y,0,f[i+1/2]}, PlotStyle->{RGBColor[0,0,1]},PlotRange->All],{i,0,19}]; ans = Show[left,right,top,bottom,spots,a, PlotLabel->" Example of Riemann Sums",PlotRange->All]; Export["/math/www/hentzel/class.165.09/oct30.riemann.pdf",ans]; ##################################################################### Naturally, given the mesh size, it is possible, and even quite likely that there will be lots of different Riemann sums with that mesh size. The partition points can be chosen in many many different ways, and even after the partition points are specified, the choices of the points # can be chosen anywhere in the i th cell. i Never-the-less, Riemann says that when the function is continuous, these various choices do not matter and the value of all Riemann sums with a small mesh size are quite similar. .**** | .****** | .******* | .********* | .'********** many many values Riemann Says that this --> |<************ possible for the point exists. This is | `*********** Riemann Sums. the value of the integral | `******** | `****** | ***** | **** | *** | ---------------------------+------------------------------------ | Mesh Size ##################################################################### Points about the Riemann Sums. (1) You may as well choose the partition equally spaced and the #'s as the left end, (* or the right end, or whatever is convenient *). The limit is independent on the particular choice of the partition or the #'s. (2) Area underneath the X-axis will be negative and will subtract from the positive area above the x-axis. b c c (3) INT f(x) dx + INT f(x) dx = INT f(x) dx a b a b b (4) INT c f(x) dx = c INT f(x) dx a a ##################################################################### Page 231 Problem 12 Evaluate the definite integral using the definition. x=2 2 INT x +1 dx x=0 ##################################################################### n 2 2/n SUM (i 2/n) + 1 i=1 2 n 4 i 2/n SUM ------- + 1 i=1 2 n 8 n 2 2 n ------ SUM i + ---- SUM 1 3 i=1 n i=1 n 8 n(n+1)(2n+1) 2 ---- -------------- + ---- n 3 6 n n 8 ---- (1+1/n)(2+1/n) + 2 6 ##################################################################### The limit is the integral is 8/3 + 2 = 14/3 Thanks to Riemann, we do not have to sandwich the area between an upper sum and a lower sum. He told us that anything we use for the altitudes will converge to the actual area. ##################################################################### x=+a 2 2 Find INT Sqrt[a - x ] dx x=-a ##################################################################### x=+a Find INT |x| dx x=-a ##################################################################### x=b Find INT x dx x=a ##################################################################### x=Pi Set up a Riemann Sum to evaluate INT Sin[x] dx x=0 Do not evaluate the Riemann Sum ##################################################################### Get["font.math"]; f[x_] := Sin[x]; n = 20; a = Plot[f[x],{x,0,2 Pi}]; left = Table[ ParametricPlot[ {(i-1) Pi/n, y}, {y,-0.001,f[(i-1) Pi/n]}, PlotStyle->{RGBColor[1,0,0]}],{i,1,n}]; right = Table[ ParametricPlot[ { (i+1) Pi/n, y},{y,-0.001,f[(i) Pi/n]}, PlotStyle->{RGBColor[1,0,0]}], {i,0,19}]; top = Table[ ParametricPlot[ {x,f[i Pi/n]},{x,i Pi/n ,(i+1) Pi/n}, PlotStyle->{RGBColor[1,0,0]}],{i,0,19}]; ans = Show[a,left,right,top,PlotLabel->" y = Sin[x] "]; Export["/math/www/hentzel/class.165.09/oct30.sin.pdf",ans]; ##################################################################### Page 231 Problem 17 x=5 Evaluate INT f(x) dx x=0 / 2x if 0 <= x <= 1 Where f(x) = ( 2 if 1 < x <= 2 \ x if 2 < x <= 5 ##################################################################### Get["font.math"]; a = Plot[2x,{x,0,1},PlotRange->All]; b = Plot[2,{x,1,2},PlotRange->All]; c = Plot[x,{x,2,5},PlotRange->All]; d = Show[a,b,c,PlotLabel->"Page 231 Problem 17",PlotRange->All]; Export["/math/www/hentzel/class.165.09/oct30.17.pdf",d]; #####################################################################