Review Initial Value Problems Euler s Method Summary

Similar documents
Euler s Methods (a family of Runge- Ku9a methods)

Mathematics for chemical engineers

Direction Fields; Euler s Method

Module 2: Single Step Methods Lecture 4: The Euler Method. The Lecture Contains: The Euler Method. Euler's Method (Analytical Interpretations)

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

Math 104: Euler s Method and Applications of ODEs

x n x n stepnumber k order r error constant C r+1 1/2 5/12 3/8 251/720 abs. stab. interval (α,0) /11-3/10

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable:

(1) Given the following system of linear equations, which depends on a parameter a R, 3x y + 5z = 2 4x + y + (a 2 14)z = a + 2

Surfaces and Partial Derivatives

B. Examples Set up the integral(s) needed to find the area of the region bounded by

Homework Set #2-3, Math 475B

Lecture-12: Closed Sets

LECTURE 18 - OPTIMIZATION

Euler and improved Euler using SAGE

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab

(Part - 1) P. Sam Johnson. April 14, Numerical Solution of. Ordinary Differential Equations. (Part - 1) Sam Johnson. NIT Karnataka.

Definition. A Taylor series of a function f is said to represent function f, iff the error term converges to 0 for n going to infinity.

4 Visualization and. Approximation

Mathematical Methods and Modeling Laboratory class. Numerical Integration of Ordinary Differential Equations

Updated: March 31, 2016 Calculus III Section Math 232. Calculus III. Brian Veitch Fall 2015 Northern Illinois University

REVIEW I MATH 254 Calculus IV. Exam I (Friday, April 29) will cover sections

Kevin James. MTHSC 206 Section 14.5 The Chain Rule

Numerical Solutions of Differential Equations (1)

Finite difference methods

Maximizing an interpolating quadratic

Application 2.4 Implementing Euler's Method

Continuity and Tangent Lines for functions of two variables

Ordinary differential equations solving methods

Truncation Errors. Applied Numerical Methods with MATLAB for Engineers and Scientists, 2nd ed., Steven C. Chapra, McGraw Hill, 2008, Ch. 4.

Contents. MATH 32B-2 (18W) (L) G. Liu / (TA) A. Zhou Calculus of Several Variables. 1 Homework 1 - Solutions 3. 2 Homework 2 - Solutions 13

Math 213 Calculus III Practice Exam 2 Solutions Fall 2002

Surfaces and Partial Derivatives

University of California, Berkeley

over The idea is to construct an algorithm to solve the IVP ODE (8.1)

Computer Simulations

Chapter 6. Curves and Surfaces. 6.1 Graphs as Surfaces

Background for Surface Integration

Page 129 Exercise 5: Suppose that the joint p.d.f. of two random variables X and Y is as follows: { c(x. 0 otherwise. ( 1 = c. = c

The Divergence Theorem

Math 113 Calculus III Final Exam Practice Problems Spring 2003

M3P1/M4P1 (2005) Dr M Ruzhansky Metric and Topological Spaces Summary of the course: definitions, examples, statements.

= w. w u. u ; u + w. x x. z z. y y. v + w. . Remark. The formula stated above is very important in the theory of. surface integral.

Curves, Tangent Planes, and Differentials ( ) Feb. 26, 2012 (Sun) Lecture 9. Partial Derivatives: Signs on Level Curves, Tangent

Functions of Two variables.

Lecture 15. Lecturer: Prof. Sergei Fedotov Calculus and Vectors. Length of a Curve and Parametric Equations

Lecture : Topological Space

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits

Lecture 15: The subspace topology, Closed sets

Exact equations are first order DEs of the form M(x, y) + N(x, y) y' = 0 for which we can find a function f(x, φ(x)) so that

Welcome to MTH 308 A/B!! Principles of Numerical Computation / Numerical Analysis and Scientific Computing

2.8. Connectedness A topological space X is said to be disconnected if X is the disjoint union of two non-empty open subsets. The space X is said to

LECTURE 13, THURSDAY APRIL 1, 2004

The listing says y(1) = How did the computer know this?

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

Ordinary Differential Equations

CS321. Introduction to Numerical Methods

Stanford University CS261: Optimization Handout 1 Luca Trevisan January 4, 2011

Introduction to PDEs: Notation, Terminology and Key Concepts

Questions Q1. (a) Find the values of the constants A, B and C. (4) b) Hence find

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

We show that the composite function h, h(x) = g(f(x)) is a reduction h: A m C.

Math 225 Scientific Computing II Outline of Lectures

Tangent Planes and Linear Approximations

1 Scope, Bound and Free Occurrences, Closed Terms

2.9 Linear Approximations and Differentials

Chapter 3 Numerical Methods

Computational Methods. Sources of Errors

Distance-to-Solution Estimates for Optimization Problems with Constraints in Standard Form

Properties of a Function s Graph

The following information is for reviewing the material since Exam 3:

CS321 Introduction To Numerical Methods

Euler s Method for Approximating Solution Curves

Ellipsoid Algorithm :Algorithms in the Real World. Ellipsoid Algorithm. Reduction from general case

. 1. Chain rules. Directional derivative. Gradient Vector Field. Most Rapid Increase. Implicit Function Theorem, Implicit Differentiation

Comprehensive Practice Handout MATH 1325 entire semester

Chapter 5 Partial Differentiation

THE TANGENT PLANE 6.1 INTRODUCTION TO THE TANGENT PLANE CHAPTER 6:

APPROXIMATING PDE s IN L 1

Directional Derivatives and the Gradient Vector Part 2

Review of Calculus, cont d

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

53:244 (58:254) Energy Principles in Structural Mechanics. virtual work, principles of stationary and minimum potential energy;

Exam 1 Review. MATH Intuitive Calculus Fall Name:. Show your reasoning. Use standard notation correctly.

B.Stat / B.Math. Entrance Examination 2017

Math 241, Exam 3 Information.

EC 521 MATHEMATICAL METHODS FOR ECONOMICS. Lecture 2: Convex Sets

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

MAC2313 Test 3 A E g(x, y, z) dy dx dz

SOME REMARKS CONCERNING D METRIC SPACES

Lesson 10. Transforming 3D Integrals

Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives. Partial Derivatives

Topic 5.1: Line Elements and Scalar Line Integrals. Textbook: Section 16.2

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Polynomials tend to oscillate (wiggle) a lot, even when our true function does not.

6. Advanced Topics in Computability

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Convex sets and convex functions

SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION

Transcription:

THE EULER METHOD P.V. Johnson School of Mathematics Semester 1 2008

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

ERRORS Be careful when interpreting results from a computer Errors can arise in all sorts of places Using Taylor Series to approximate a differential Truncation errors

ERRORS Be careful when interpreting results from a computer Errors can arise in all sorts of places Using Taylor Series to approximate a differential Truncation errors

EULER S METHOD Initial value problems for ODEs Solving ODEs numerically Euler s Method Truncation errors again

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

THE INITIAL VALUE PROBLEM Here we will look at the solution of ordinary differential equations of the type, say dy dx = f(x, y), a x b subject to an initial condition y(a) = α

THE INITIAL VALUE PROBLEM Here we will look at the solution of ordinary differential equations of the type, say dy dx = f(x, y), a x b subject to an initial condition y(a) = α

EXAMPLES CONSIDER THE PROBLEM: with the initial condition dy (1 dx = y y ), x 0 4 y(0) = 1 What can we say about the solution? How can we go about solving it?

EXAMPLES CONSIDER THE PROBLEM: with the initial condition dy (1 dx = y y ), x 0 4 y(0) = 1 What can we say about the solution? How can we go about solving it?

EXTENSION TO HIGHER ORDER ODES We normally would like to solve higher order ODEs We can do this by rearranging them as a system of first order ODEs EXAMPLE y 2xyy + y 2 = 1, y(1) = 1, y (1) = 2. The equivalent first order system is: (y 1 (x), y 2 (x)) T = (y(x), y (x)) T, f 1 (x, y 1, y 2 ) = y 2 (x), f 2 (x, y 1, y 2 ) = 1 + 2xy 1 (x)y 2 (x) y 2 1 (x), and initial condition (y 1 (1), y 2 (1)) T = (1, 2) T.

EXTENSION TO HIGHER ORDER ODES We normally would like to solve higher order ODEs We can do this by rearranging them as a system of first order ODEs EXAMPLE y 2xyy + y 2 = 1, y(1) = 1, y (1) = 2. The equivalent first order system is: (y 1 (x), y 2 (x)) T = (y(x), y (x)) T, f 1 (x, y 1, y 2 ) = y 2 (x), f 2 (x, y 1, y 2 ) = 1 + 2xy 1 (x)y 2 (x) y 2 1 (x), and initial condition (y 1 (1), y 2 (1)) T = (1, 2) T.

EXTENSION TO HIGHER ORDER ODES We normally would like to solve higher order ODEs We can do this by rearranging them as a system of first order ODEs EXAMPLE y 2xyy + y 2 = 1, y(1) = 1, y (1) = 2. The equivalent first order system is: (y 1 (x), y 2 (x)) T = (y(x), y (x)) T, f 1 (x, y 1, y 2 ) = y 2 (x), f 2 (x, y 1, y 2 ) = 1 + 2xy 1 (x)y 2 (x) y 2 1 (x), and initial condition (y 1 (1), y 2 (1)) T = (1, 2) T.

GENERAL SYSTEM OF FIRST ORDER ODES The general system can be written dy dx = F(x, Y), a x b, where with initial data Y = (y 1 (x), y 2 (x),..., y n (x)) T, F = (f 1 (x, Y), f 2 (x, Y),..., f n (x, Y)) T, Y(a) = α, α = (α 1, α 2,..., α n ) T.

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

WELL-POSED PROBLEMS DEFINITION: An initial value problem is said to be well-posed if: A unique solution, y(x), to the problem exists; The associated perturbed problem has a unique solution and is sufficiently close to the original solution How do we go about showing this for a general problem? What do we mean by a perturbed problem? With a computer, we are always solving the perturbed problem First, we need to know about the Lipschitz condition

WELL-POSED PROBLEMS DEFINITION: An initial value problem is said to be well-posed if: A unique solution, y(x), to the problem exists; The associated perturbed problem has a unique solution and is sufficiently close to the original solution How do we go about showing this for a general problem? What do we mean by a perturbed problem? With a computer, we are always solving the perturbed problem First, we need to know about the Lipschitz condition

WELL-POSED PROBLEMS DEFINITION: An initial value problem is said to be well-posed if: A unique solution, y(x), to the problem exists; The associated perturbed problem has a unique solution and is sufficiently close to the original solution How do we go about showing this for a general problem? What do we mean by a perturbed problem? With a computer, we are always solving the perturbed problem First, we need to know about the Lipschitz condition

THE LIPSCHITZ CONDITION DEFINITION: A function is said to satisfy the Lipschitz condition in the variable y on a set D R 2 if a constant L > 0 exists such that: f(x, y 1 ) f(x, y 2 ) L y 1 y 2 whenever (x, y 1 ), (x, y 2 ) D. The constant L is called the Lipschitz constant for f.

PERTURBED PROBLEM THE PERTURBED PROBLEM Let δ(x) be a pertubation to the problem so that δ(x) < ǫ for any ǫ > 0, then dz dx = f(x, z) + δ(x), a x b, z(a) = α + ǫ 0 and the solution z(x) exists with for some constant k(ǫ). z(x) y(x) < k(ǫ)ǫ for all a x b,

THE THEORY THEOREM Suppose D = {(x, y) a x b and < y < }. If f is continuous and satisfies a Lipschitz condition in the variable y on the set D, then the initial-value problem is well-posed. dy dx = f(x, y), a x b, y(a) = α

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

SOLVING AN INITIAL VALUE PROBLEM The simplest method to solve an ODE is the Euler method In order to solve, we must discretise the problem make a continuous (infinite) problem discrete (finite) Divide up the interval [a, b] into n equally spaced intervals h a b x x x x x 0 1 2...... i n

SOLVING AN INITIAL VALUE PROBLEM Suppose y(x) is the unique solution to the ODE, and is twice differentiable Apply a Taylor series approximation around x i then we have y(x i+1 ) = y(x i ) + y (x i )h + 1 2 y (ξ) where x i ξ x i+1.

SOLVING AN INITIAL VALUE PROBLEM Suppose y(x) is the unique solution to the ODE, and is twice differentiable Apply a Taylor series approximation around x i then we have y(x i+1 ) = y(x i ) + f(x i, y(x i ))h + 1 2 y (ξ) where x i ξ x i+1. Since y is a solution to the ODE, we can replace y by the function f(x, y)

THE EULER METHOD Assume w i is our approximation to y at x i, then w 0 = α Then to find all subsequent values of w,set the remainder to zero in the previous equation to obtain: w i+1 = w i + hf(x i, w i ), for each i = 0, 1,...,n 1

OUTLINE 1 REVIEW 2 INITIAL VALUE PROBLEMS The Problem Posing a Problem 3 EULER S METHOD Method Errors 4 SUMMARY

TRUNCATION ERRORS We would like to be able to compare the errors for different methods We can use the local truncation error difference between equation and the approximation For the Euler method we have: τ i+1 (h) = y i+1 (y i + hf(x i, y i )) h = y i+1 y i h f(x i, y i )

TRUNCATION ERRORS We would like to be able to compare the errors for different methods We can use the local truncation error difference between equation and the approximation For the Euler method we have: τ i+1 (h) = y i+1 (y i + hf(x i, y i )) h = y i+1 y i h f(x i, y i )

TRUNCATION ERRORS We can calculate the truncation error as τ i+1 (h) = h 2 y (ξ i ), and if y is bounded by the constant M on the interval [a, b] then τ i+1 (h) h 2 M. Hence the truncation error is O(h). A method with truncation error O(h p ) is called an order p method

TRUNCATION ERRORS We can calculate the truncation error as τ i+1 (h) = h 2 y (ξ i ), and if y is bounded by the constant M on the interval [a, b] then τ i+1 (h) h 2 M. Hence the truncation error is O(h). A method with truncation error O(h p ) is called an order p method

TRUNCATION ERRORS We can calculate the truncation error as τ i+1 (h) = h 2 y (ξ i ), and if y is bounded by the constant M on the interval [a, b] then τ i+1 (h) h 2 M. Hence the truncation error is O(h). A method with truncation error O(h p ) is called an order p method

SUMMARY Need Lipschitz condition to say a problem is well Posed Problems Euler s Method is a first order method w i+1 = w i + hf(x i, w i ), for each i = 0, 1,...,n 1 Truncation errors give a quick estimate of error bounds on the problem