Class Notes 18: Numerical Methods (1/2)

Slides:



Advertisements
Similar presentations
Ordinary Differential Equations
Advertisements

Chapter 6 Differential Equations
CE33500 – Computational Methods in Civil Engineering Differentiation Provided by : Shahab Afshari
PART 7 Ordinary Differential Equations ODEs
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 32 Ordinary Differential Equations.
Numerical Integration CSE245 Lecture Notes. Content Introduction Linear Multistep Formulae Local Error and The Order of Integration Time Domain Solution.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 31 Ordinary Differential Equations.
Initial-Value Problems
Dr. Jie Zou PHY Chapter 9 Ordinary Differential Equations: Initial-Value Problems Lecture (II) 1 1 Besides the main textbook, also see Ref.: “Applied.
8-1 Chapter 8 Differential Equations An equation that defines a relationship between an unknown function and one or more of its derivatives is referred.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW III.
Multistep methods previous methods use information at xi to predict yi+1 multistep methods use information from xi-1, xi-2, etc. leads to better results.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Differential Equations Brannan Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 02: The First Order Differential Equations.
Differential Equations and Boundary Value Problems
Numerical solution of Differential and Integral Equations PSCi702 October 19, 2005.
PART 7 Ordinary Differential Equations ODEs
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Solving ODE.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Ch 8.3: The Runge-Kutta Method
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Integration of 3-body encounter. Figure taken from
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Performance & Stability Analysis.
Scientific Computing Multi-Step and Predictor-Corrector Methods.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Ch 8.2: Improvements on the Euler Method Consider the initial value problem y' = f (t, y), y(t 0 ) = y 0, with solution  (t). For many problems, Euler’s.
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
Sec 21: Generalizations of the Euler Method Consider a differential equation n = 10 estimate x = 0.5 n = 10 estimate x =50 Initial Value Problem Euler.
9.3 Taylor’s Theorem: Error Analysis yes no.
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
This chapter is concerned with the problem in the form Chapter 6 focuses on how to find the numerical solutions of the given initial-value problems. Main.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
NUMERICAL ANALYSIS I. Introduction Numerical analysis is concerned with the process by which mathematical problems are solved by the operations.
1 Week 11 Numerical methods for ODEs 1.The basics: finite differences, meshes 2.The Euler method.
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Numerical Methods for Partial Differential Equations
Ordinary Differential Equations
Part 7 - Chapter 25.
Ordinary Differential Equations
Chapter 22.
525602:Advanced Numerical Methods for ME
CSE245: Computer-Aided Circuit Simulation and Verification
Numerical Solutions of Ordinary Differential Equations
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L4&5.
Class Notes 19: Numerical Methods (2/2)
Ch 8.6: Systems of First Order Equations
Numerical Analysis Lecture 45.
Class Notes 9: Power Series (1/3)
Sec:25.3 RUNGE-KUTTA METHODS.
Chapter 26.
Part 7 - Chapter 25.
Sec:5.4 RUNGE-KUTTA METHODS.
Numerical Analysis Lecture 37.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2, 27-1 CISE301_Topic8L2.
5.3 Higher-Order Taylor Methods
Numerical Analysis Lecture 38.
SKTN 2393 Numerical Methods for Nuclear Engineers
ECE 576 POWER SYSTEM DYNAMICS AND STABILITY
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
MATH 175: Numerical Analysis II
Differential equations
Numerical Analysis Lecture 36.
CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L7 KFUPM.
Modeling and Simulation: Exploring Dynamic System Behaviour
Presentation transcript:

Class Notes 18: Numerical Methods (1/2) 82 – Engineering Mathematics

Differential Equation Numerical Methods Differential Equation Analytical Techniques: Integrating Factor & Exact (1st order) (2nd or higher order, linear, constant coefficients) Power Series (2nd order, linear) Laplace Transform (Linear, constant coefficient, I.C.) Numerical Techniques: Fix (single) step - Euler - Runge-Kutta Multi-step - Adams-Bashforth Idea: approximate the value of y at a specified time tn

Numerical Methods: the Euler Method WHAT is Euler Method WHY Euler method can work HOW to apply Euler method What is the PROBLEM with Euler method How to IMPROVE Euler method

The Euler Method (Tangent Line Method) - WHAT First order initial value problem Euler’s Formula: Repeatedly evaluating Euler’s formula using the result of each step to execute the next step Obtain a sequence of values y0, y1, y2, … yn that approximate the value of the solution at points t0, t1, t2, … tn Euler’s formula can be derived in three ways

The Euler Method (Tangent Line Method) - WHY Approach 1: Tangent Line Assume an unique solution of the form Write the differential equation at the point t=tn Approximate the derivation by the corresponding forward difference quotient

The Euler Method (Tangent Line Method) - WHY Replace Solve for h → step size

The Euler Method (Tangent Line Method) - WHY Approach 2: Integration Let be the solution of the initial value problem

The Euler Method (Tangent Line Method) - WHY Replace shaded rectangle

The Euler Method (Tangent Line Method) - WHY Approach 3: Taylor Series The solution has a Taylor series about tn or replace and take the first two terms (linearization)

The Euler Method (Tangent Line Method) - HOW How to apply Euler method step 1 define f(t,y) step 2 input initial values t0 and y0 step 3 input step size h and the number of steps n step 4 output t0 and y0 step 5 for j from 1 to n do k1 = f(t, y) y = y + h*k1 n times t = t + h output t and y end

The Euler Method (Tangent Line Method) - HOW Example Exact solution

The Euler Method (Tangent Line Method) - PROBLEM Error in numerical approximations Convergence How small a step size is needed in order to guarantee a given level of accuracy? slow down calculations Small step size - may cause loss of accuracy Numerical approximation Analytical solution Step size

The Euler Method (Tangent Line Method) - PROBLEM Fundamental sources of errors 1) Formula/Algorithm - approximation e.g. Euler → straight line approximations 2) The input data (except for the first step) are only approximations to the actual values of the solution at the specific points 3) Finite precision of the computer

The Euler Method (Tangent Line Method) - PROBLEM Error type 1) and 2) Assume that the computer can execute all computations exactly. It can retain infinitely many digits (if necessary) at each step Error type 3) Global Truncation Error (source of error: 1 and 2) Solution Numerical Approximation Actual computed solution With round off error Round off error Numerical Approximation

The Euler Method (Tangent Line Method) - PROBLEM The absolute value of the total error in computing based on Global Truncation Error Round off error

The Euler Method (Tangent Line Method) - PROBLEM Example – Round off Error Computer with four digits Compute for x=0.3334

The Euler Method (Tangent Line Method) - PROBLEM How to reduce round-off error 1) Minimize the number of calculations 2) Use double-precision arithmetic

The Euler Method (Tangent Line Method) - PROBLEM Global versus Local Truncation Error Assume that the solution is to the initial value problem Global Truncation Error Local Truncation Error (In each step)

The Euler Method (Tangent Line Method) - PROBLEM Expand about tn using polynomial with a remainder where is some point using the Euler formula to calculate an approximation to the difference between and is the local truncation error

The Euler Method (Tangent Line Method) - PROBLEM M is the maximum of on the interval [a b]

The Euler Method (Tangent Line Method) - PROBLEM One use of the equation is to choose a step size that will result in a local truncation error no greater than some given tolerance level For example if the local truncation error must be no greater than ε Difficulty: estimate or M

The Euler Method (Tangent Line Method) - PROBLEM Reducing the interval by ½ reduces the error by ¼ The global truncation error Euler method is called a first order method because its global truncation error is proportional to the first power of the step size h K: some constant

The Euler Method (Tangent Line Method) - IMPROVE Improved Euler formula (Heun formula) Idea: replace integrand by the average of the two endpoints Heun formula Euler formula

The Euler Method (Tangent Line Method) - IMPROVE Improved Euler formula (Heun formula) Heun formula Euler formula Local Truncation Error: Local Truncation Error: Global truncation error: First order method Global Truncation Error: Second order method Cost: more computational work

The Euler Method (Tangent Line Method) - IMPROVE If depends only on t and not on y, solving the differential equation reduces to integrating in this case Trapezoid rule of numerical integration

The Euler Method (Tangent Line Method) - IMPROVE How to apply improved Euler method step 1 define f(t,y) step 2 input initial values t0 and y0 step 3 input step size h and the number of steps n step 4 output t0 and y0 step 5 for j from 1 to n do k1 = f(t, y) k2 = f(t + h, y + h*k1) y = y (h/2)*(k1 + k2) t = t + h output t and y end

The Euler Method (Tangent Line Method) - IMPROVE The improved Euler method is an example of a predictor-corrector method predicts the value of yn+1 corrects the estimate (Predictor) (Corrector)