From the Numerical. to the Theoretical in. Calculus

Similar documents
A REVIEW OF CALCULUS CONCEPTS FOR JDEP 384H. Thomas Shores Department of Mathematics University of Nebraska Spring 2007

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Topics Covered AP Calculus AB

5: The Definite Integral

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

APPROXIMATE INTEGRATION

The Regulated and Riemann Integrals

Section 6.1 Definite Integral

Review of Calculus, cont d

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

Anti-derivatives/Indefinite Integrals of Basic Functions

7.2 The Definite Integral

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

Overview of Calculus I

The Evaluation Theorem

Polynomials and Division Theory

Goals: Determine how to calculate the area described by a function. Define the definite integral. Explore the relationship between the definite

Chapter 7 Notes, Stewart 8e. 7.1 Integration by Parts Trigonometric Integrals Evaluating sin m x cos n (x) dx...

1B40 Practical Skills

Unit #9 : Definite Integral Properties; Fundamental Theorem of Calculus

Section 6: Area, Volume, and Average Value

Math 131. Numerical Integration Larson Section 4.6

Chapter 8.2: The Integral

Definition of Continuity: The function f(x) is continuous at x = a if f(a) exists and lim

How can we approximate the area of a region in the plane? What is an interpretation of the area under the graph of a velocity function?

Quadratic Forms. Quadratic Forms

2 b. , a. area is S= 2π xds. Again, understand where these formulas came from (pages ).

Review of basic calculus

Section 4: Integration ECO4112F 2011

Math 1B, lecture 4: Error bounds for numerical methods

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

( ) as a fraction. Determine location of the highest

( ) where f ( x ) is a. AB Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

Chapter 6 Notes, Larson/Hostetler 3e

p-adic Egyptian Fractions

ODE: Existence and Uniqueness of a Solution

AB Calculus Review Sheet

Math& 152 Section Integration by Parts

Beginning Darboux Integration, Math 317, Intro to Analysis II

Definite integral. Mathematics FRDIS MENDELU

( ) Same as above but m = f x = f x - symmetric to y-axis. find where f ( x) Relative: Find where f ( x) x a + lim exists ( lim f exists.

Math 360: A primitive integral and elementary functions

The First Fundamental Theorem of Calculus. If f(x) is continuous on [a, b] and F (x) is any antiderivative. f(x) dx = F (b) F (a).

6.5 Numerical Approximations of Definite Integrals

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

4.4 Areas, Integrals and Antiderivatives

Definite integral. Mathematics FRDIS MENDELU. Simona Fišnarová (Mendel University) Definite integral MENDELU 1 / 30

Chapter 5. Numerical Integration

Lecture 3: Equivalence Relations

1 The Riemann Integral

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals

( ) where f ( x ) is a. AB/BC Calculus Exam Review Sheet. A. Precalculus Type problems. Find the zeros of f ( x).

Review of Gaussian Quadrature method

We partition C into n small arcs by forming a partition of [a, b] by picking s i as follows: a = s 0 < s 1 < < s n = b.

Interpreting Integrals and the Fundamental Theorem

Improper Integrals. Type I Improper Integrals How do we evaluate an integral such as

7.1 Integral as Net Change and 7.2 Areas in the Plane Calculus

Chapter 9 Definite Integrals

INTRODUCTION TO INTEGRATION

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

If u = g(x) is a differentiable function whose range is an interval I and f is continuous on I, then f(g(x))g (x) dx = f(u) du

Improper Integrals, and Differential Equations

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

f(a+h) f(a) x a h 0. This is the rate at which

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

NUMERICAL INTEGRATION. The inverse process to differentiation in calculus is integration. Mathematically, integration is represented by.

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17

AP Calculus Multiple Choice: BC Edition Solutions

LECTURE. INTEGRATION AND ANTIDERIVATIVE.

A. Limits - L Hopital s Rule ( ) How to find it: Try and find limits by traditional methods (plugging in). If you get 0 0 or!!, apply C.! 1 6 C.

Chapter 6 Techniques of Integration

f(x) dx, If one of these two conditions is not met, we call the integral improper. Our usual definition for the value for the definite integral

First midterm topics Second midterm topics End of quarter topics. Math 3B Review. Steve. 18 March 2009

Chapters 4 & 5 Integrals & Applications

P 3 (x) = f(0) + f (0)x + f (0) 2. x 2 + f (0) . In the problem set, you are asked to show, in general, the n th order term is a n = f (n) (0)

Bridging the gap: GCSE AS Level

SYDE 112, LECTURES 3 & 4: The Fundamental Theorem of Calculus

Numerical Integration

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 17

c n φ n (x), 0 < x < L, (1) n=1

Math 113 Exam 1-Review

u(t)dt + i a f(t)dt f(t) dt b f(t) dt (2) With this preliminary step in place, we are ready to define integration on a general curve in C.

Sections 5.2: The Definite Integral

7.1 Integral as Net Change Calculus. What is the total distance traveled? What is the total displacement?

Recitation 3: More Applications of the Derivative

Chapter 0. What is the Lebesgue integral about?

An Overview of Integration

Unit Six AP Calculus Unit 6 Review Definite Integrals. Name Period Date NON-CALCULATOR SECTION

Lecture 14: Quadrature

Vectors , (0,0). 5. A vector is commonly denoted by putting an arrow above its symbol, as in the picture above. Here are some 3-dimensional vectors:

Riemann Integrals and the Fundamental Theorem of Calculus

Integration Techniques

Euler, Ioachimescu and the trapezium rule. G.J.O. Jameson (Math. Gazette 96 (2012), )

Math 100 Review Sheet

and that at t = 0 the object is at position 5. Find the position of the object at t = 2.

MATH 144: Business Calculus Final Review

Review of Riemann Integral

Transcription:

From the Numericl to the Theoreticl in Clculus Teching Contemporry Mthemtics NCSSM Ferury 6-7, 003 Doug Kuhlmnn Phillips Acdemy Andover, MA 01810 dkuhlmnn@ndover.edu

How nd Why Numericl Integrtion Should Precede the Fundmentl Theorem The short nswer is: "We mesure re, we don't define it." (Jerry Uhl) HOW TO INTRODUCE NUMERICAL INTEGRATION FIRST. Assumptions: Students know the derivtives of the usul elementry functions, including polynomils, trig functions, exponentil nd logs. In ddition they know the power rule for non-integer exponents, the product, quotient nd chin rules. They hve done few ntiderivtive prolems, minly velocity/distnce types. Introducing re under curve: L n nd R n. On the first dy of integrtion I sk the sic question: Wht is this re? How cn we mesure this re? One pproximtion leds to the left-hnd Riemnn sum in the usul fshion: L n = f (x 0 )h + f (x 1 )h +... + f (x n 1 )h where h =. Note tht I only consider pproximtions using rectngles of equl n width. The first time through clculus is not the time to generlize to things like prtitions, norms of prtions, refinements, etc. We immeditely consider the right-hnd Riemnn sum nd discuss why it is not priori possile to choose which is etter, the Left Hnd Rule or the Right Hnd Rule. At this point the clss writes short TI-83 progrm, clled INTEGRAL or AREA, tht clcultes this sum with, nd n s user inputs. This is good time to tech nd/or review For-End loops. (A listing of the finl version of the INTEGRAL progrm is t the end of these notes.) The first integrl progrm using Left nd Right hnd rules only nd ssumes tht the function is in Y1 is listed here. 1

INTEGRAL Progrm :ClrHome :Input "LOWER LIMIT=",A :Input "UPPER LIMIT=",B :Prompt N :(B-A)/N->H :0->L:0->R :A->X :For(J,1,N) :L+Y1*H->L :X+H->X :R+Y1*H->R :End :Disp "L, R",L,R Trpezoid nd Midpoint Rules At this point the clss usully invents the trpezoid rule themselves: T n = 1 (L n + R n ) This leds to modifiction of the INTEGRAL progrm.. I then suggest to the clss nother wy, the Midpoint rule, which uses the y-coordinte t the middle of the suintervl for the height of the rectngles. One cn compre the Trpezoid nd Midpoint rules in the following wy: nd T n = f (x 0 ) + f (x 1 ) h + f (x ) + f (x ) 1 h +... + f (x ) + f (x ) n 1 n h M n = f x 0 + x 1 h + f x 1 + x h +... + f x n 1 + x n We now mke nother, this time more sutle, chnge in our INTEGRAL progrm to llow us to clculte M n. h

Simpson's Rule without prols. For L n nd R n there ws no priori reson for choosing one or the other. Ech seems to e eqully ccurte nd so when we verge them for the trpezoid rule, we weight ech of them the sme. Cn we do similr thing with the Trpezoid nd Midpoint rules? We cn compre the ccurcy of the Trpezoid nd Midpoint rules y looking t some exmples tht we lredy know. By using our INTEGRAL progrm we see tht s n increses, our estimtes of the re under y = cos(x) etween x = 0 nd x = π pproch 1. Tking it s fct tht this re is indeed 1, let's compre the errors of the Trpezoid nd Midpoint rules, i.e let's exmine T n 1 nd M n 1. Here re three cses using n = 5, 10 nd 0 with the resulting errors or devitions from 1 for the trpezoid nd midpoint pproximtions. N T n 1 M n 1 5 -.00838.00414 10 -.00057.00109 0 -.000514.00057 Note tht the Mid-point pproximtion error is out hlf tht of the Trp pproximtion nd is of opposite sign. In this cse the Trp rule is too smll nd the Mid rule is too ig ut the Mid rule is out twice s close to the ctul re. We cn lso compre the ccurcies of T n nd M n y the following rgument. Consider one rectngle in the midpoint rule: M M 3

Keeping the point mrked M fixed on the curve, rotte the top of the rectngle, extending it t the sme time, until you mke it tngent to the curve t M. Wht is the re under the trpezoid formed with this tngent line s the non-prllel top? With little considertion, one cn show tht this re is the sme s the re of the orginl rectngle. This mens tht the strightforwrd Midpoint rule, s esy to clculte s the Left- nd Right-hnd rules, cn e thought of s the Tngent to the Midpoint Trpezoid Rule. Which is more ccurte, T n or M n? First nswer this question: Which is etter pproximtion to function, tngent line or secnt line. The nswer gives support to the rgument tht M n is etter pproximtion. So does the following heuristic rgument. For functions tht re concve up, the Midpoint rule is too smll nd the Trp rule is too ig. (Other wy round for concve down.) The picture ove lso suggest tht the error for Trp is twice s lrge in mgnitude s the error for Mid nd is of opposite sign, point we discovered numericlly erlier. Since M n is closer to the true vlue thn T n y fctor of two nd M n ndt n re on opposite sides of the true vlue, tht suggests we use weighted verge of the two. Consequently we define Simpson's rule s: S n = M n + T n 3 WARNING: Note the suscript. If we use n sudivisions for the Trp rule nd n sudivisions for the Midpoint rule, we hve effectively used n sudivisions for Simpson's rule this wy. 4

WHY DO NUMERICAL INTEGRATION FIRST? By now I hve lso introduced the integrl nottion f( x) dx to represent the re. By doing severl prolems pproximting this integrl, the students come to know tht f( x) dx is rel numer, not clss of functions. Additionlly, they c cn verify the ovious f (x) dx + f (x)dx = f (x) dx nd f (x)dx = 0. They cn even verify nd think out why c f (x)dx = f (x)dx (h is negtive in one of the sums). Finlly, I hve the clss perform this exercise: Let Y1=cos(X) nd evlute the following for vrious vlues of 0 cos(x)dx A little discusion llows them to see tht we hve creted new function: For every '' there is exctly one numer ssocited with tht, nmely the re from 0 to. I then sk them to ech find the vlue of this integrl for = 0,.,.4,.6,.8, 1.0, 1.,... s mny s there re students, mye twice s mny with every one doing two. When I first did this exercise we plotted the points on the ord: (0,0) (.,.199) (.4,.389) (.6,.565) (.8,.717) etc These questions were sked y students s we plotted them; 1. Why re they going down? (Eventully it does). Why re they negtive? (Ditto) 3. Why is it sin? If students cn sk these questions on their own, I ws convinced tht this method of introducing the integrl ws vlule. At this point we cn prove the Fundmentl Theorem in the usul wy, hving motivted it with the ove nd severl other exmples. However we cn lso explore ntiderivtives y solving differentil equtions grphiclly vi slope fields nd numericlly with Euler's method. 5

Slope Fields nd Euler's Method Suppose we wnted to find solutions to differentil eqution of the form y = g(x, y). Exmples of such differentil equtions include: y = y (1) y = x () y = x y (3) y = cos y (4) y = exp( x ) = e x (5) y = 1 + x 3 x (6) Equtions (1) through (4) re solvle y nlytic techniques ut equtions (5) nd (6) re not. Nevertheless, we cn get some qulittive informtion out the solutions of ll of the ove y looking t the slope fields for ech. SLOPE FIELDS If first-order differentil eqution cn e put in the form y = g(x, y), then we cn determine the slope of the solution y = f (x) through ny point (x, y). Grphiclly, we cn drw short line of the proper slope through ech of severl points (x, y) in the plne. The resulting picture of short slope lines is clled slope field. I think of slope field s series of conditionl sttements: If solution psses through the point (x, y), this is the slope it would hve. Consider simple cse: f (x) = x. On piece of grph pper, here chosen very smll to mke it esier, select grid of points nd t ech point selected drw short segment whose slope is x, the first coordinte of the point. This is the resulting picture: y x We know the solutions to this differentil eqution re f (x) = x + C, nd if we mentlly overly these on the grid ove, we cn see how the solutions follow the slope field. 6

In prctice this cn e very time consuming or t lest tedious, ut computer or progrmmle clcultor cn do the tsk for us. In the following exmples, TI-83 progrm drew the slope fields. The listing for this progrm is given t the end. Before we proceed, let's remind ourselves of the following theorem found in lmost ny text on elementry differentil equtions. Theorem. For first order differentil eqution y = g(x, y) with intil condition y(x 0 ) = y 0, sufficient (though not necessry) condition tht unique solution y = f (x) exist is tht g nd g e rel, finite, single-vlued, nd continuous over y rectngulr region of the plne contining the point (x 0, y 0 ). In simpler terms, if g(x, y) is suitly nice, we cn sfely mke the ssumption tht unique solution exists. In ll of the cses we shll exmine, the ove conditions re stisfied. Wht this mens is tht given specific point in our slope field there is exctly one solution tht psses through this point. Exmple 1. y = y Before we sketch the slope field, notice tht if y = y then y = y = y. Similrly, ny order derivtive of y is equl to y. Below is the slope field for this eqution on the viewing window [-4.7, 4.7] X [-3.1, 3.1] (Unless otherwise stted, ll viewing windows will hve these dimensions.) y = y We esily recognize the exponentil functions f (x) = Ae x s solutions nd cn esily visulize them on top of the slope field. 7

Exmple. y = x (Left to reder to expnd ove slope field.) Exmple 3. y = x y Note tht y = 1 y =1 (x y) = 1 x + y. We then conclude tht y > 0 if y < x y > 0 if y > x 1 y = 0 if y = x y = 0 if y = x 1 y < 0 if y > x y < 0 if y < x 1 The slope field for this eqution shows tht ny solution stisfies the ove conditions. y = x y Note tht nywhere long the line y = x, the slope is zero. It is esy to sketch qulittive solutions to the differentil equtions y following the slope fields, ut here gin the computer cn help using numericl methods to pproximte solutions. 8

EULER'S METHOD The first numericl method is Euler's method, strightforwrd, simple (nd hence prone to inccurcies t times) method for pproximting solutions to y = g(x, y). It is nlogous to using the left hnd rule for pproximting integrls. If we know tht the point (x 0, y 0 ) is on our curve nd we define our new x 1 to e x 1 = x 0 + h where h is the step-size or increment. Then the new y is given y y 1 = y 0 + g(x 0, y 0 )h. We pproximte y y using the tngent line which hs slope given y g(x 0, y 0 ). The new point is connected to the old point nd the process is repeted, generting n pproximte solution to the differentil eqution. Tht is, we find x = x 1 + h nd y = y 1 + g(x 1,y 1 )h. Note tht we reclculted the slope t the point (x 1,y 1 ). We repet this s mny times s needed. Below is the originl slope field nd next to it is slope field with severl solutions sketched on it using Euler's method for y = x y One question tht immeditely rises, is the existence of possile symptote to ll of the solutions. They ll seem to converge to line. In fct, if we you nlytic techniques (using integrting fctors) to solve y = x y we get the generl solution to e y = x 1+ Ce x It is now cler tht the line y = x 1 is n symptote for ll solutions to our eqution. 9

Exmple 4. y = cos y Using nlytic techniques, nmely seprting vriles, we get sec y dy = dx Integrting nd rememering the trick for integrting secnt, we get ln sec y + tn y = x + C But wht do these curves look like? Cn you sketch one? Question: Wht does the solution tht goes through the point (-4, 3) look like? Answer: Huh? Slope fields cn help. Below is the slope field for y = cos y. y = cos y Exmining it crefully, we see tht the lines y = π nd y = π re importnt. Both re fixed points in the sense tht if y = π or y = π, then cos y = 0 nd so there is no chnge in y. However, there is very ig difference etween the two lines. The line y = π is n ttrctive fixed point. If you strt within neighorhood of y = π the solution will converge to the line: It will e "ttrcted" to the line. On the other hnd, the line y = π is repelling fixed point. If you strt even slightly wy from y = π further wy nd eventully converges to nother fixed point. the curve moves 10

Below re Euler solutions with different strting points ll close to ech other. x 0 = 4, y 0 = π, x 0 = 4, y 0 = π, +.01 x 0 = 4, y 0 = π,.01 I leve it to the reder to determine wht the curve through (-4, 3) looks like. Euler's Method nd the Fundmentl Theorem If the derivtive is function of x lone, i.e. dy dx = f (x), then Euler's method cn e used to illuminte the Fundmentl Theorem of Clculus. Suppose we know the derivtive nd strting point for function so tht we re given point (, f ()) nd the derivtive f (x) nd we wish to evlute (estimte) f () where for this rgument < (lthough it doesn't hve to e). If we define h = n following: nd then use Euler's with step size h nd n steps, we get the 11

x 0 = f (x 0 ) = f ()... x 1 = x 0 + h f (x 1 ) f (x 0 ) + f (x 0 )h x = x 1 + h f (x ) f (x 1 ) + f (x 1 )h x n 1 = x n + h f (x n 1 ) f (x n ) + f (x n )h x n = x n 1 + h f (x n ) f (x n 1 ) + f (x n 1 )h Note tht x n = nd f (x n ) = f (). If we sustitute the next to lst eqution for f (x n 1 ) into to the lst one we get f (x n ) f (x n ) + f (x n )h + f (x n 1 )h Sustitute the previous eqution ove nd get f (x n ) f (x n 3 ) + f (x n 3 )h + f (x n )h + f (x n 1 )h. Repeting this we get f (x n ) f (x 0 ) + f (x 0 )h + f (x 1 )h +... + f (x n 1 )h Rememering tht f (x 0 ) = f () nd f (x n ) = f () we see tht the lst eqution just sys tht f () f () f (x 0 )h + f (x 1 )h +... + f (x n 1 )h nd the right hnd side of this eqution is just the Left-hnd Riemnn sum pproximting the integrl of f (x) nd so we re led to f () f () = f (x)dx which is the Fundmentl Theorem. 1

Progrm listings: INTEGRAL Progrm :ClrHome :Input "LOWER LIMIT=",A :Input "UPPER LIMIT=",B :Prompt N :(B-A)/N->H :0->L:0->M:0->R :A->X :For(J,1,N) SLOPEFLD Progrm :Func:FnOff :PlotsOff :ClrDrw :ClrHome :Disp "AXES ON (1) :Disp "OR OFF (0)" :Input A :If A=0 :Then:AxesOff :Else:AxesOn :End :Disp "HOW MANY MARKS?" :Input "ACROSS: ",A :Input "DOWN: ",D :(Xmx-Xmin)/A->H :(Ymx-Ymin)/D->V :For(I,1,D) :For(J,1,A) :Xmin+(J-1)H+H/->X :Ymin+(I-1)V+V/->Y :Y1->M :Y-.30MH->S :Y+.30MH->Z :X-.30H->P :X+.30H->Q :If s (Z-S)>.6V :Then :Y+.30V->Z :Y-.30V->S :(Z-Y)/M+X->Q :(S-Y)/M+X->P :End :Line(P,S,Q,Z) :End:End :L+Y1*H->L :X+H/->X :M+Y1*H->M :X+H/->X :R+Y1*H->R :End :(L+R)/->T :(M+T)/3->S :Disp "L, R, T,M,S",L,R,T,M,S EULER Progrm :Func:FnOff :Input "X START=",A :Input "Y START=",B :Input "STEP SIZE=",H :Input "NO. STEPS=",N :A->X:B->Y :For(I,1,N) :X->U:Y->V :Y+Y H->Y :X+H->X :Line(U,V,X,Y) :End 13

Runge-Kutt techniques re nlogous to Simpson's rule. Below is the code for progrm tht uses fourth order Runge-Kutt technique to numericlly pproximte solution to first order differentil eqution y = g(x,y). RK4GRAPH Progrm :Func:FnOff :Input "X START=",A :Input "Y START=",B :Input "STEP SIZE=",H :Input "NO. STEPS=",N :A->X:B->Y :For(I,1,N) :X->U:Y->V :Y1->K :X+H/->X :V+H*K/->Y :Y1->L :V+H*L/->Y :Y1->S :X+H/->X :V+H*S->Y :Y1->T :V+(H/6)(K+L+S+T)->Y :Line(U,V,X,Y):End Doug Kuhlmnn Phillips Acdemy Andover, MA 01810 dkuhlmnn@ndover.edu 6 Ferury 003 14