Math 252 Fall 2002 Supplement on Euler s Method

Similar documents
2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

Numerical Analysis Exam with Solutions

Math Practice Final - solutions

3.1 Derivative Formulas for Powers and Polynomials

Chapter 1A -- Real Numbers. iff. Math Symbols: Sets of Numbers

The Not-Formula Book for C1

56 CHAPTER 3. POLYNOMIAL FUNCTIONS

2.1 Differential Equations and Solutions. Blerina Xhabli

Algebra 2: Semester 2 Practice Final Unofficial Worked Out Solutions by Earl Whitney

May 2015 Timezone 2 IB Maths Standard Exam Worked Solutions

Math 5a Reading Assignments for Sections

MATH 100 and MATH 180 Learning Objectives Session 2010W Term 1 (Sep Dec 2010)

MATH 215/255 Solutions to Additional Practice Problems April dy dt

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

CHAPTER 12 Numerical Solution of Differential Equations

Numerical Solution of Differential

The Not-Formula Book for C2 Everything you need to know for Core 2 that won t be in the formula book Examination Board: AQA

Worksheet 1.8: Geometry of Vector Derivatives

Week 4: Differentiation for Functions of Several Variables

Section 7.2 Euler s Method

2018 Mathematics. Advanced Higher. Finalised Marking Instructions

Calculus with Analytic Geometry I Exam 8 Take Home Part.

Linear Equations & Inequalities Definitions

Fundamentals of Algebra, Geometry, and Trigonometry. (Self-Study Course)

Math Homework 3 Solutions. (1 y sin x) dx + (cos x) dy = 0. = sin x =

Math 2 Variable Manipulation Part 7 Absolute Value & Inequalities

Homework 4 Solutions, 2/2/7

A marks are for accuracy and are not given unless the relevant M mark has been given (M0 A1 is impossible!).

Review of Linear Time-Invariant Network Analysis

Target 6.1 The student will be able to use l Hôpital s Rule to evaluate indeterminate limits. lim. lim. 0, then

Vectors. Vector Practice Problems: Odd-numbered problems from

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

Review. The derivative of y = f(x) has four levels of meaning: Physical: If y is a quantity depending on x, the derivative dy

September Math Course: First Order Derivative

MATH 18.01, FALL PROBLEM SET # 3A

Mon Jan Improved acceleration models: linear and quadratic drag forces. Announcements: Warm-up Exercise:

The AP exams will ask you to find derivatives using the various techniques and rules including

2016 VCE Specialist Mathematics 2 examination report

ENGI Partial Differentiation Page y f x

SECTION 1.4: FUNCTIONS. (See p.40 for definitions of relations and functions and the Technical Note in Notes 1.24.) ( ) = x 2.

Simple ODE Solvers - Derivation

1 Differentiability at a point

(x + 3)(x 1) lim(x + 3) = 4. lim. (x 2)( x ) = (x 2)(x + 2) x + 2 x = 4. dt (t2 + 1) = 1 2 (t2 + 1) 1 t. f(x) = lim 3x = 6,

MATH 18.01, FALL PROBLEM SET # 2

GUIDED NOTES 2.2 LINEAR EQUATIONS IN ONE VARIABLE

Initial value problems for ordinary differential equations

ab = c a If the coefficients a,b and c are real then either α and β are real or α and β are complex conjugates

Math 116 Second Midterm March 20, 2017

Math 1 Variable Manipulation Part 5 Absolute Value & Inequalities

Solutions to the Exercises of Chapter 8

Math 120. x x 4 x. . In this problem, we are combining fractions. To do this, we must have

1. Taylor Polynomials of Degree 1: Linear Approximation. Reread Example 1.

MATH 320, WEEK 2: Slope Fields, Uniqueness of Solutions, Initial Value Problems, Separable Equations

Module 2: Reflecting on One s Problems

INTRODUCTION TO DIFFERENTIATION

Chapter 1: January 26 January 30

Homework 4, 5, 6 Solutions. > 0, and so a n 0 = n + 1 n = ( n+1 n)( n+1+ n) 1 if n is odd 1/n if n is even diverges.

Grade 8 Chapter 7: Rational and Irrational Numbers

Midterm 1 Review. Distance = (x 1 x 0 ) 2 + (y 1 y 0 ) 2.

Analysis II - few selective results

2016 Mathematics. Advanced Higher. Finalised Marking Instructions

Math Problem Set #3 Solution 19 February 2001

HUDSONVILLE HIGH SCHOOL COURSE FRAMEWORK

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

University of Connecticut Department of Mathematics

Math 2414 Activity 1 (Due by end of class July 23) Precalculus Problems: 3,0 and are tangent to the parabola axis. Find the other line.

Properties of Derivatives

MATHEMATICS Video List

Maths A Level Summer Assignment & Transition Work

Chapter Five Notes N P U2C5

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

3.9 Derivatives of Exponential and Logarithmic Functions

Math 111, Introduction to the Calculus, Fall 2011 Midterm I Practice Exam 1 Solutions

A-Level Notes CORE 1

The Growth of Functions. A Practical Introduction with as Little Theory as possible

Quadratic Equations Part I

MATH Spring 2010 Topics per Section

ABSOLUTE VALUE EQUATIONS AND INEQUALITIES

π 2π More Tutorial at 1. (3 pts) The function y = is a composite function y = f( g( x)) and the outer function y = f( u)

Math 113 Final Exam Practice

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

The Liapunov Method for Determining Stability (DRAFT)

Solutions to Math 41 Exam 2 November 10, 2011

Chapter 3: The Derivative in Graphing and Applications

COURSE: AP Calculus BC GRADE: 12 PA ACADEMIC STANDARDS FOR MATHEMATICS:

Chapter 5: Limits and Derivatives

Mathematics Extension 1

( ε > 0) ( N N) ( n N) : n > N a n A < ε.

West Windsor-Plainsboro Regional School District Math Resource Center Grade 8

Rolle s Theorem. The theorem states that if f (a) = f (b), then there is at least one number c between a and b at which f ' (c) = 0.

Created by T. Madas. Candidates may use any calculator allowed by the regulations of this examination.

Calculus at Rutgers. Course descriptions

DIFFERENTIATION RULES

A booklet Mathematical Formulae and Statistical Tables might be needed for some questions.

Math Test #3 Info and Review Exercises

Chapter 2 Overview: Introduction to Limits and Derivatives

7 th Grade Math Scope and Sequence Student Outcomes (Objectives Skills/Verbs)

X. Numerical Methods

HSC Marking Feedback 2017

Math Review ECON 300: Spring 2014 Benjamin A. Jones MATH/CALCULUS REVIEW

Transcription:

Math 5 Fall 00 Supplement on Euler s Method Introduction. The textbook seems overly enthusiastic about Euler s method. These notes aim to present a more realistic treatment of the value of the method and its relation to other numerical methods for solving differential equations. First, although Euler s method can be performed on a simple calculator, it cannot be considered well suited for hand computation. The repetitive steps require that the whole program be stored by the computing device to guarantee that they will be performed consistently and correctly. If machine computation is to be used, other methods are available to deliver high accuracy quickly with only a small increase in the complexity of the program. Nevertheless, this method illustrates the principle on which all numerical methods are based. Note that our analytic methods aim to find general solutions that contain a parameter, allowing initial value problems to be solved by identifying the value of the parameter that is consistent with the initial data, but numerical methods need the initial condition to give a characterization of a unique function which the method attempts to calculate. The main value of Euler s method is that it is easy to analyze, and this analysis can be used to prove a form of the existence and uniqueness theorem that would be good enough for the purposes of this course. The textbook does not take full advantage of this, although it does describe how one estimates the error in Euler s method in Section 7.1. However, that discussion appears late in the book and the key ideas may be lost in the technicalities needed to give a complete proof. No proofs are given to the theorems stated in the text since the usual proofs use special methods to get a strong result from a weaker hypothesis. If you require the right side of the differential equation to be continuously differentiable, then you can get an error estimate that bounds the work required to get within a given distance of a solution by Euler s method. This estimate will show that Euler s approximations converge to a solution as the step size goes to zero. Although we refer to the problem we are studying as an initial value problem, and usually specify y(0), our method will find a solution for t < 0 as well as for t > 0. Examples. You should use Maple to produce the direction fields of these examples. In order to have the necessary tools available, begin a new worksheet with the instruction with(detools): Then, you can get the illustrations of these examples using the DEplot function (see Maple Help for a full list of options). In particular, DEplot(diff(y(t),t)=(1+t*y(t))/(+y(t)ˆ),y(t),t=-..,y=-..);#A DEplot(diff(y(t),t)=tˆ+y(t)ˆ,y(t),t=-..,y=-..);#B DEplot(diff(y(t),t)=*(t+sqrt(tˆ-y(t))),y(t),t=-..,y=-1..4);#C The Maple function dfieldplot could be used in place of DEplot. The two functions take the same arguments, allow the same options, and produce the same results, except that DEplot allows initial conditions to be specified after giving the range of the variable t. The plot will then show solution curves as well as the direction field. Examples A and B were constructed to avoid the patterns of equations that can be solved in closed form, yet they will be seen to have a unique solution through each point of the plane. The solutions to A 1

can be extended to be defined for all t, but all solutions of B are unbounded over a bounded interval of t. To see some solutions, add the option {[y(0)=-1],[y(0)=0],[y(0)=1]} between the specification of the t and y ranges. (The individual initial conditions are to be enclosed in brackets since a list is required. Brackets may be used in place of braces around the whole collection; since a list is an alternative to the set that is denoted by braces.) Example C is very different. The right side of the equation is only defined for y t. This leads to difficulties in numerical methods since the approximate solution may stray into the forbidden zone. On the other hand, we can give an exact description of the solution through each such point. First, check that y = t is a solution. Then, show that the portion of the line y = ct c where t < c is a solution. If you start at some point (t 0, y 0 ) strictly below y = t, the solution can be found by solving y 0 = ct 0 c for c and selecting the solution that is greater than t 0. There is a unique solution that follows this line until it becomes tangent to the parabola at (c, c ), to the right of the starting point, and then it follows the parabola. Thus, for each point (a, a ) on the parabola, the solutions through that point are all the curves that we just described starting from points (t 0, y 0 ) with t 0 < a and at 0 a < y 0 < a (i.e., points to the left of the given point between the parabola and the tangent line at the given point). The failure of the uniqueness theorem is related to difficulties in using numerical methods to solve this equation. The nature of a numerical solution. The true solution of the equation dy dt = f (t, y) (1) gives y as a function of t. If there is an exact solution, this is achieved by giving a formula that we know how to evaluate. Such a formula is useful if it can be written briefly. This allows the behavior of the function to be illustrated by a graph as well as allowing easy computation of y for arbitrary t to fairly high accuracy. To get similar performance from a numerical method, an interpolation formula will be used to give a similar computation of the function anywhere in its domain from a list of its values at a finite number of points. In Euler s method, the values of t will be t k = t 0 + kh for some small step size h and integers k. We want to allow k to be either positive or negative, but the computation will typically use only positive k. To get the points for negative k, it is customary to change the sign of h and repeat the method of solution. To get the value at other points, linear interpolation between the closest t k can be used. To fix notation, let y k = y(t k ) be the value of the solution of the initial value problem consisting of the equation (1) and the initial condition y(t 0 ) = y 0 at t k, and let v k be the approximation to y k computed by Euler s method. Although the y k are not known, we shall see that we know enough to produce an upper bound on y k v k. It is reasonable to take v 0 = y 0 in order to satisfy the initial condition exactly. Then, take v k+1 = v k + h f (t k, v k ) () Mathematical induction shows that such a process determines all v k for all nonnegative integers k. Using the equation to find the second derivative. Although our goal is to prove that equations have solutions, we begin by assuming that we have a solution and seek to learn more about it. Thus, we suppose that we have a solution y(t) to equation (1)

and look for additional properties of the solution. In particular, we can differentiate both sides of (1) with respect to t to obtain (via the chain rule for functions of two variables) d y dt = f t(t, y) + f y (t, y) dy dt = f t (t, y) + f y (t, y) f (t, y) (3) where the subscript on f indicates the partial derivative with respect to the variable named in the subscript. Thus, if f (t, y) is differentiable, the solution y(t) will have a second derivative. This can be continued to find higher derivatives of y(t) as long as the partial derivatives of f exist, but the expressions become messy very quickly. Fortunately, no more than d y/dt is needed for the analysis of Euler s method. For examples A and B, these expressions exist everywhere. For example C, existence of this quantity requires y < t : there is a square root of t y in the denominator, so we need to be sure both that the square root exists and that it is not zero. Interestingly, in this case, the expression for d y/dt simplifies to zero. This tells us that any solutions must lie along straight lines as long as they remain below y = t. In general, the expression for the second derivative will depend on both t and y, but in any bounded region where this expression is continuous, we can compute a bound on the second derivative of any function y(t) satisfying the equation, while the graph of the solution lies in this region. Specifying bounds on y means that we announce that we will lose interest in a solution as soon as it gets too far from the initial value. Without this restriction, we would only be sure of our solution on an interval around the initial value of t that was so small that the solution could not reach the top or bottom of our graphing window. This is the only reason for the mysterious ɛ in the statements in the textbook. An important consequence of this follows from Taylor s formula: y(t) = y(t k ) + y (t k )(t t k ) + 1 y (τ)(t t k ) (4) where τ is some number between t and t k. The first two terms on the right give the equation of the tangent line to the solution curve at t = t k. Although the last term in (4) contains much that is not known, the assumption that the solution lies in our given region means that (3) gives y (τ) = f t (τ, η) + f y (τ, η) f (τ, η) at some point (τ, η) in our bounded region. Any bound on this expression translates into a proof that the tangent is close to the curve when t t k is small. Confining attention to a bounded rectangle in the (t, y) gives a uniform bound y (τ) M (assuming that the partial derivatives of f (t, y) are continuous). Thus, for Euler s method with a step size of h, a single step introduces an error that is a bounded multiple of h. Nearby Solutions. After we have been using Euler s method for a while, the current point is no longer on the solution through the starting point. If this is not to cause too much trouble, the tangent lines at the true point (t k, y k ) and the calculated point (t k, v k ) should have roughly the same direction. Fortunately, a quantitative version of this condition can be expressed in terms of things that can be estimated. One needs only the mean value theorem to show that the difference of the slopes, f (t k, y k ) f (t k, v k ) is f y (t k, η) (y k v k ) with η between v k and y k. Again, as long as both the true solution and the approximate solution stay in the given region, we have a quantity L such that fy (t, y) L. For #C, fy (t, y) is unbounded if y t is small, and the uniqueness theorem has been seen to fail for points on this parabola. 3

The technical part of the proof constructs an inductive argument to show that this component of the error has a an effect that is bounded independent of the step size. For Euler s method, the error in each step was bounded by a fixed multiple of h, but the number of steps to go a fixed distance is proportional to 1/h, so the total error should be proportional to h. This is good enough to show that the method approximates solutions, but not good for computing solutions to a reasonable accuracy. To increase the accuracy by a single decimal place requires ten times as much computation. In addition, the simple act of adding together a million numbers means that a million round-off errors are accumulated. This requires that higher accuracy must be maintained throughout the computation to keep these errors from affecting the part of the answer that is expected to be accurate. Existence and Uniqueness. If we prove this error estimate for Euler s method, then, on any closed and bounded region D where the value of d y/dt computed from the equation is continuous, the computed approximations converge to any solution of a given initial value problem. Since a convergent sequence has a unique limit, this means that an initial value can have at most one solution on D. To prove the existence of solutions, similar methods are applied to estimate the difference between the quantities computed by Euler s method with different step sizes. You are probably not interested in the details, but this shows that Euler s method will converge to something. The final step is to show that any such limiting function must satisfy the differential equation. Technicalities of compounding. Unfortunately, errors don t just accumulate, they compound. In addition to the t k, y k and v k, let w k+1 = y k + h f (t k, y k ). That is, w k+1 is the point that would be computed if we made one step of Euler s method starting from (t k, y k ). The triangle inequality gives The comments above show that and Induction on this gives The sum is a geometric series, so we have y k+1 v k+1 y k+1 w k+1 + w k+1 v k+1. y k+1 w k+1 Mh, w k+1 v k+1 y k v k (1 + Lh). y k v k Mh y k v k Mh k 1 (1 + Lh) j. j=0 (1 + Lh) k 1 (1 + Lh) 1. The fraction at the end of this expression is a difference quotient of the function x k, so (1 + Lh) k 1 (1 + Lh) 1 = k(1 + θ Lh)k 1 4

for some θ between 0 and 1. Since (1 + 1/x) x increases to e as x +, and (1 + θ Lh) k 1 < (1 + Lh) k < e Lhk, y k v k Mh k e Lhk. In this expression, hk = t k t 0, which is the total horizontal displacement. This depends on the point being computed, but not on the step size. We are assuming a bound of the form t k t 0 H, so we find y k v k M Hh e L H. Now, everything in this bound is constant except for one factor of h. Instead of comparing the Euler approximation to a true solution, one can compare Euler approximations of different step sizes. A similar result will hold. If the step size is repeatedly cut in half, this error estimate will show that the sequence of functions e k (t) obtained will have allow a function y(t) to be defined as y(t) = lim k e k(t), and this function will satisfy the given initial value problem. The only part of this analysis that is specific to Euler s method is the single-step bound of Mh /. One factor of h gets multiplied by k to give H. Any local error estimate will suffer the same fate. The Runge-Kutta method, which Maple uses for its numerical solutions, has a single-step bound of the form Rh 5, so its global error bound is RHh 4 e L H. 5