LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION

Similar documents
2.3 Product and Quotient Rules

Continuity and Differentiability Worksheet

Section 2.7 Derivatives and Rates of Change Part II Section 2.8 The Derivative as a Function. at the point a, to be. = at time t = a is

Consider a function f we ll specify which assumptions we need to make about it in a minute. Let us reformulate the integral. 1 f(x) dx.

Average Rate of Change

Runge-Kutta methods. With orders of Taylor methods yet without derivatives of f (t, y(t))

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER /2019

Precalculus Test 2 Practice Questions Page 1. Note: You can expect other types of questions on the test than the ones presented here!

Lecture XVII. Abstract We introduce the concept of directional derivative of a scalar function and discuss its relation with the gradient operator.

Math 212-Lecture 9. For a single-variable function z = f(x), the derivative is f (x) = lim h 0

4. The slope of the line 2x 7y = 8 is (a) 2/7 (b) 7/2 (c) 2 (d) 2/7 (e) None of these.

A = h w (1) Error Analysis Physics 141

Physically Based Modeling: Principles and Practice Implicit Methods for Differential Equations

Lab 6 Derivatives and Mutant Bacteria

The total error in numerical differentiation

1. Which one of the following expressions is not equal to all the others? 1 C. 1 D. 25x. 2. Simplify this expression as much as possible.

These errors are made from replacing an infinite process by finite one.

Copyright c 2008 Kevin Long

Differentiation in higher dimensions

How to Find the Derivative of a Function: Calculus 1

Order of Accuracy. ũ h u Ch p, (1)

Numerical Differentiation

1. Questions (a) through (e) refer to the graph of the function f given below. (A) 0 (B) 1 (C) 2 (D) 4 (E) does not exist

THE IDEA OF DIFFERENTIABILITY FOR FUNCTIONS OF SEVERAL VARIABLES Math 225

Lesson 6: The Derivative

Practice Problem Solutions: Exam 1

Mathematics 5 Worksheet 11 Geometry, Tangency, and the Derivative

Click here to see an animation of the derivative

Combining functions: algebraic methods

Section 2.1 The Definition of the Derivative. We are interested in finding the slope of the tangent line at a specific point.

Time (hours) Morphine sulfate (mg)

Definition of the Derivative

Section 15.6 Directional Derivatives and the Gradient Vector

LECTURE 14 NUMERICAL INTEGRATION. Find

NUMERICAL DIFFERENTIATION. James T. Smith San Francisco State University. In calculus classes, you compute derivatives algebraically: for example,

The Verlet Algorithm for Molecular Dynamics Simulations

Differential equations. Differential equations

2.8 The Derivative as a Function

Math 102 TEST CHAPTERS 3 & 4 Solutions & Comments Fall 2006

MTH-112 Quiz 1 Name: # :

f a h f a h h lim lim

Notes on wavefunctions II: momentum wavefunctions

1 Limits and Continuity

Bob Brown Math 251 Calculus 1 Chapter 3, Section 1 Completed 1 CCBC Dundalk

b 1 A = bh h r V = pr

5.1 We will begin this section with the definition of a rational expression. We

Solution. Solution. f (x) = (cos x)2 cos(2x) 2 sin(2x) 2 cos x ( sin x) (cos x) 4. f (π/4) = ( 2/2) ( 2/2) ( 2/2) ( 2/2) 4.

Polynomials 3: Powers of x 0 + h

1. Consider the trigonometric function f(t) whose graph is shown below. Write down a possible formula for f(t).

7.1 Using Antiderivatives to find Area

Exercises for numerical differentiation. Øyvind Ryan

Derivatives of Exponentials

1 1. Rationalize the denominator and fully simplify the radical expression 3 3. Solution: = 1 = 3 3 = 2

The derivative function

Pre-Calculus Review Preemptive Strike

AMS 147 Computational Methods and Applications Lecture 09 Copyright by Hongyun Wang, UCSC. Exact value. Effect of round-off error.

Calculus I Practice Exam 1A

Introduction to Machine Learning. Recitation 8. w 2, b 2. w 1, b 1. z 0 z 1. The function we want to minimize is the loss over all examples: f =

1 Solutions to the in class part

Math 34A Practice Final Solutions Fall 2007

1watt=1W=1kg m 2 /s 3

The Derivative as a Function

Math 1241 Calculus Test 1

2.11 That s So Derivative

Chapter Seven The Quantum Mechanical Simple Harmonic Oscillator

Applied Linear Statistical Models. Simultaneous Inference Topics. Simultaneous Estimation of β 0 and β 1 Issues. Simultaneous Inference. Dr.

SECTION 3.2: DERIVATIVE FUNCTIONS and DIFFERENTIABILITY

CHAPTER (A) When x = 2, y = 6, so f( 2) = 6. (B) When y = 4, x can equal 6, 2, or 4.

Section 3: The Derivative Definition of the Derivative

Preface. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Higher Derivatives. Differentiable Functions

LIMITS AND DERIVATIVES CONDITIONS FOR THE EXISTENCE OF A LIMIT

Tangent Lines-1. Tangent Lines

Calculus I Homework: The Derivative as a Function Page 1

The Derivative The rate of change

The Electron in a Potential

lecture 26: Richardson extrapolation

Chapter 5 FINITE DIFFERENCE METHOD (FDM)

Solutions Manual for Precalculus An Investigation of Functions

MAT244 - Ordinary Di erential Equations - Summer 2016 Assignment 2 Due: July 20, 2016

Finite Difference Methods Assignments

Finding and Using Derivative The shortcuts

Numerical Analysis MTH603. dy dt = = (0) , y n+1. We obtain yn. Therefore. and. Copyright Virtual University of Pakistan 1

5. (a) Find the slope of the tangent line to the parabola y = x + 2x

Printed Name: Section #: Instructor:

MAT 145. Type of Calculator Used TI-89 Titanium 100 points Score 100 possible points

Section 3.1: Derivatives of Polynomials and Exponential Functions

Math Test No Calculator

MATH 1020 Answer Key TEST 2 VERSION B Fall Printed Name: Section #: Instructor:

Exam 1 Review Solutions

Taylor Series and the Mean Value Theorem of Derivatives

2.3 Algebraic approach to limits

Chapter 4: Numerical Methods for Common Mathematical Problems

Differential Calculus (The basics) Prepared by Mr. C. Hull

Introduction to Derivatives

Chapters 19 & 20 Heat and the First Law of Thermodynamics

Some Review Problems for First Midterm Mathematics 1300, Calculus 1

. If lim. x 2 x 1. f(x+h) f(x)

MATH1131/1141 Calculus Test S1 v8a

REVIEW LAB ANSWER KEY

Transcription:

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION LAURA EVANS.. Introduction Not all differential equations can be explicitly solved for y. Tis can be problematic if we need to know te value of y at a specific point. Tis is were metods of numerical integration are useful, as tey allow us to estimate te value of y based on known initial conditions. One of tese metods for numerical integration is Euler s Metod, wic will be te subject of te following discussion. Altoug not te most accurate of metods, it is one of te simplest, wic is useful wen beginning to understand tese metods. Essentially, te metod works by finding te slope at a known, traveling in a small amount in tat direction, ten calculating te new slope and traveling in te direction of te new slope, and so on. Euler s metod is an iterative metod. Consider te initial value problem () y (x) = f(x, y(x)) y(a) = y 0 We proceed in steps of size, so x 0 = a and x n+ = x n +. For eac step, ten, y n+ = y n + f(x n, y n ) Tis allows us to approximate te value of y at a point x, given te initial data. Because of its relative simplicity as a numerical metod, Euler s metod is limited in its scope, as I will discuss in tis paper.. Error Proposition.. Euler s metod produces an answer wit accuracy o(). Date: May 8, 007. Tis discussion is based on material found on Section.8 of Birkoff Rota, wit some inspiration for examples drawn from te Wikipedia entry on Euler s Metod.

LAURA EVANS. Proof. Consider te Taylor expansion of y(x) around a + : But Euler s metod gives y(a + ) = y(a) + y (a) + o( ) y(a + ) = y(a) + y (a) Since te error is te difference between te two equations, we can see tat te error in tis first step is o( ). Te way Euler s metod is commonly used is to set equal to some small fraction of te difference between te desired value and te known value. Tus, te number of steps needed to reac te desired value is o( ), so te total error accumulated upon reacing te desired value is o( ). One consequence of tis is tat if we want an additional decimal place of accuracy in our answer, we must use a new tat is one-tent te original. Tis means we must do a significantly more calculations. Tus, we see tat Euler s metod is not efficient for finding answers to a ig accuracy. 3. Demonstration Let us observe te beavior of solutions found using Euler s metod on te equation y = ky, wit initial value y(0) = for various values of k < 0 We know tat tis equation as solution y(x) = x kt, so we can compare te values given by tis metod to te real values. First, we will consider k =. Te true values and te values given by Euler s metod wit = 0.5 are given below. x y n y 0 0.5 0.5 0.6 0.5 0.37 Clearly, tis is not very accurate. We can improve its accuracy, as we saw above, by decreasing te value of. Te following table sows te same function, wit = 0.

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION 3 x y n y 0 0. 0.90 0.90 0. 0.8 0.8 0.3 0.73 0.74 0.4 0.66 0.67 0.5 0.59 0.6 0.6 0.53 0.55 0.7 0.48 0.50 0.8 0.43 0.45 0.9 0.39 0.4 0.35 0.37 From tis we see tat te smaller value of gives muc more accurate values for y in our test case. In addition, we can see tat te error does remain less tan, altoug it does increase as x increases. 4. Failure Now, let us consider te same equation as te previous section, but wit larger values of k. In particular, we will look at k = 3, k =, and k =. First, we will use = 0.5. Readers sould note tat all data in te following table is rounded to te second decimal place. x 0 0.5 k = 3 k = k = y n y y n y y n y 0.70 0. -0. 0 -. 0 0.49 0.05 0.0 0. 0 Te values for te first k seem reasonable, but someting seems off about te values tat Euler s metod as given us for k =. Let s decrease to see if te problem goes away. Let s set equal to 0., as before. Again, values are rounded to te second decimal place.

4 LAURA EVANS. x 0 0. 0. 0.3 0.4 0.5 0.6 0.7 0.8 0.9 k = 3 k = k = y n y y n y y n y 0.7 0.74 -. 0.33 -. 0. 0.49 0.55 0.0 0.. 0.0 0.34 0.4 0 0.04 -.33 0 0.4 0.3 0 0.0.46 0 0.7 0. 0 0 -.6 0 0. 0.7 0 0.77 0 0.08 0. 0 0 -.95 0 0.06 0.09 0 0.4 0 0.04 0.07 0 0 -.36 0 0.03 0.05 0 0.59 0 From tis, we can see tat te problem as not gone away - in fact, it as gotten worse. Rater tan approximating te curve, te values tat Euler s metod gives for k = oscillate around te curve, wit growing amplitude. Holistically, it is easy to see wat te problem is. Wen te metod makes its step of lengt, it assumes tat y will remain about constant over tat small distance. However, tis is not te case for y = y. Over a distance, y canges relatively largely compared to. Te same is true wenever we ave an equation of te form y = ky, k 0. We can expand tis discussion to realize tat wenever y canges rapidly near y 0, Euler s metod will not be accurate. Tus, use of Euler s metod sould be limited to cases wen max{ y (x 0 ±ɛ) }, for some neigborood ɛ near x 0. 5. Improvements Euler s metod is a first order numerical approximation: eac new value depends only on te value immediately before it. Tis is part of te reason tat it can be affected as we saw previously. One way of improving Euler s metod is to use a second order version: y(a) = y a y = f(a, y 0 ) y n+ = y n + (f(x n, y n ) + f(x n+, y y+ ))

LIMITATIONS OF EULER S METHOD FOR NUMERICAL INTEGRATION 5 Let us consider wat y is in tis version. y = y 0 + (f(x 0, y 0 ) + f(x, y )) = y a + (y (a) + f(, f(a, y 0 ))) = y a + (y (a) + f(, y (a))) = y a + (y (a) + y (a) + y (a)) = y a + y (a) + y (a) Tis is only o( 3 ) away from te second order Taylor expansion of y(x) near a. By similar reasoning as te proof above, ten, we can assume tat tis will yield muc greater accuracy tan te original, even wit te same. 6. Conclusion After tis exploration of Euler s metod, we ave learned several tings about wen it sould be used and wen oter numerical metods would be more appropriate. In particular, Euler s metod is not te best coice wen y takes on large values near te initial data, nor wen a computationally efficient metod is required. Altoug we can improve te metod sligtly, by considering more tan te immediately previous point, tis improvement is limited. In many cases, ten, Euler s metod is not te most appropriate numerical metod.