王俊鑫 (Chun-Hsin Wang) 中華大學 資訊工程系 Fall 2002 Chap 2 Numerical Methods for First-Order Differential Equations.

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

MATLAB EXAMPLES Initial-value problems
Numeriska beräkningar i Naturvetenskap och Teknik 1. Numerical differentiation and quadrature Discrete differentiation and integration Trapezoidal and.
Ordinary Differential Equations
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 31 Ordinary Differential Equations.
Chap 3 Linear 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.
中華大學 資訊工程系 Fall 2002 Chap 4 Laplace Transform. Page 2 Outline Basic Concepts Laplace Transform Definition, Theorems, Formula Inverse Laplace Transform.
Section 8.3 Slope Fields; Euler’s Method.  Calculus,10/E by Howard Anton, Irl Bivens, and Stephen Davis Copyright © 2009 by John Wiley & Sons, Inc. All.
Numerical Solutions of Ordinary Differential Equations
NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS
Chapter 10 ordinary differential equations (ODEs) Chapter 11 systems of ODEs (6 th edition)
Chap 1 First-Order Differential Equations
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Numerical Solution of Ordinary Differential Equation
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
Fin500J Topic 7Fall 2010 Olin Business School 1 Fin500J Mathematical Foundations in Finance Topic 7: Numerical Methods for Solving Ordinary Differential.
CSE 330 : Numerical Methods Lecture 17: Solution of Ordinary Differential Equations (a) Euler’s Method (b) Runge-Kutta Method Dr. S. M. Lutful Kabir Visiting.
PART 7 Ordinary Differential Equations ODEs
Calculus and Analytic Geometry II Cloud County Community College Spring, 2011 Instructor: Timothy L. Warkentin.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Solving ODE.
A Numerical Technique for Building a Solution to a DE or system of DE’s.
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.
Math 3120 Differential Equations with Boundary Value Problems Chapter 2: First-Order Differential Equations Section 2-6: A Numerical Method.
Modeling and simulation of systems Numerical methods for solving of differential equations Slovak University of Technology Faculty of Material Science.
Computational Method in Chemical Engineering (TKK-2109)
An Over View of Runge-Kutta Fehlberg and Dormand and Prince Methods. Numerical Methods To Solve Initial Value Problems William Mize.
Numerical Solutions of ODE
Differential Equations Chapter 1. A differential equation in x and y is an equation that involves x, y, and derivatives of y. A mathematical model often.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis – Differential Equation
Chapter 10 ordinary differential equations (ODEs) Chapter 11 systems of ODEs (6 th edition)
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
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.
PHY 301: MATH AND NUM TECH Contents Chapter 10: Numerical Techniques I. Integration A.Intro B.Euler  Recall basic  Predictor-Corrector C. Runge-Kutta.
Dr. Mujahed AlDhaifallah ( Term 342)
Today’s class Ordinary Differential Equations Runge-Kutta Methods
Ms. Battaglia AP Calculus. Estimate y(4) with a step size h=1, where y(x) is the solution to the initial value problem: y’ – y = 0 ; y(0) = 1.
Warm up Problem Solve the IVP, then sketch the solution and state the domain.
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.
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.
Lesson 9-2 Direction (Slope) Fields and Euler’s Method.
MA2213 Lecture 10 ODE. Topics Importance p Introduction to the theory p Numerical methods Forward Euler p. 383 Richardson’s extrapolation.
Assignment 1: due 1/19/16 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
§ 4.2 The Exponential Function e x.
NUMERICAL DIFFERENTIATION Forward Difference Formula
Numerical Methods by Dr. Laila Fouad.
Ordinary Differential Equations
525602:Advanced Numerical Methods for ME
Class Notes 18: Numerical Methods (1/2)
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)
Sec 21: Analysis of the Euler Method
WELCOME TO MY CLASS NUMERICAL METHOD Name : Masduki
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.
Assignment 1: due 1/16/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L3 KFUPM.
Assignment 1: due 1/17/19 Estimate all of the zero of x3-x2-2x+1 graphically. Write a MatLab code for Newton’s method. Use your code to refine the graphical.
Reading Between the Lines!
Numerical Analysis Lecture 36.
Recapitulation of Lecture 12
Presentation transcript:

王俊鑫 (Chun-Hsin Wang) 中華大學 資訊工程系 Fall 2002 Chap 2 Numerical Methods for First-Order Differential Equations

Page 2 Outline Direction Field Methods Using dfield (MATLAB / java) Euler’s Method Heun’s Method Runge-Kutta Method of Order 2 Runge-Kutta Method of Order 4

Page 3 Direction Field General Forms for First-Order ODE Implicit Form Explicit Form

Page 4 Direction Field dfield is an interactive tool for studying single first order differential equations. Written in MATLAB by John C. Polking (java version)

Page 5 Starting Difeld Tool

Page 6 Direction Field Methods Using dfield tool

Page 7 Direction Field Using Dfield

Page 8 Print Direction Field Using dfield

Page 9 Pint The Direction Field Use the print screen function key (PtrSc) to save the picture of your computer screen into the clipboard automatically. Paste the picture to a graphic tool (ex. 小畫家 ) Use the graph tool to cut the direction field you want Paste the direction field to a new file and then print it Note : verify your picture by using print review

Page 10 Plot a particular solution

Page 11 Plot a particular solution

Page 12 Plot a particular solution

Page 13 Enter Text Annotation

Page 14 Enter Text Annotation

Page 15

Page 16 Direction Field Methods Exercise 2-1: Plot the particular solutions for the following ODEs and initial conditions using dfield

Page 17

Page 18 Numerical Approximation To numerically “solve” y = f(x, y) with y(a) = y 0 on the interval [a, b], we find a discrete set of points a = x 0 < x 1 < x 2 < · · · < x N-1 < x N = b and values y 0, y 1, y 2,..., y N-1, y N with y j approximately equal to y(x j ). Making an error E j = y(x j ) - y j

Page 19 Euler, Léonard

Page 20 Euler’s Method Problem: Solve ( approximately ) y = f(x, y) with y(a) = y 0 on the interval [a, b]. Discrete set of values x 0 = a, fixed step size h = (b - a)/N x 1 = x 0 + h, x 2 = x 1 + h = x 0 + 2h, etc, x N = a + Nh = b

Page 21 Euler’s Method At each step approximate the solution curve by the tangent line.

Page 22 Euler’s Method Euler’s Method solves the first order differential equation y' = f(x,y) by a simple stepping procedure using the first two terms of a Taylor expansion of the function y(x). Also called Taylor Series Method (of order 1) or Stepping Method.

Page 23 Euler’s Method Local Error Taylor Series Euler’s Method Local Error = Taylor Series - Euler’s Method

Page 24 Euler’s Method Local Error

Page 25 Euler’s Method Exercise 2-3: Sol: Note: Exact Solution

Page 26 Euler’s Method Cumulative Error

Page 27 Euler’s Method Cumulative Error (Global Error)

Page 28 Euler’s Method Cumulative Error

Page 29 Euler’s Method Cumulative Error

Page 30 Euler’s Method MATLAB Code

Page 31 Heun’s Method Also called Improved Euler’s Method Euler’s Method Heun’s Method (Based on Trapezoid Rule)

Page 32 Heun’s Method Average Slope

Page 33 Heun’s Method Example 2-4

Page 34 Heun’s Method MATLAB Code

Page 35 Runge-Kutta Methods Runge-Kutta Method is more accurate than Heun’s Method Developed by two German mathematicians Carl Runge ( ) Wilhelm Kutta ( )

Page 36 Runge-Kutta vs Euler Both use a fixed step size h = (b - a)/N. Euler’s method Y n+1 = y n + f(x n, y n ) h Runge-Kutta methods Y n+1 = y n + S · h S is a weighted average of two or more slopes. Slopes chosen to increase the accuracy.

Page 37 Runge-Kutta Methods 積分定義 泰勒展開式 Trapezoid Rule Trapezoid Rule Simpson’s Rule Simpson’s Rule 二項展開 四項展開 Runge-Kutta Order 2 Runge-Kutta Order 2 Runge-Kutta Order 4 Runge-Kutta Order 4

Page 38 Runge-Kutta Method of Order 2

Page 39 Runge-Kutta Method of Order 2 Example 2-5

Page 40 Runge-Kutta Method of Order 4 Simpson’s Rule

Page 41 Runge-Kutta Method of Order 4

Page 42 Runge-Kutta Method of Order 4 Example 2-6

Page 43 Runge-Kutta Method of Order 4 MATLAB Code

Page 44 References Dormand, J. R. and P. J. Prince, “A family of embedded Runge-Kutta formulae,” J. Comp. Appl. Math., Vol. 6, 1980, pp 19–26. Bogacki, P. and L. F. Shampine, “A 3(2) pair of Runge-Kutta formulas,” Appl. Math. Letters, Vol. 2, 1989, pp 1–9. Kahaner, D., C. Moler, and S. Nash, Numerical Methods and Software, Prentice-Hall, New Jersey, Shampine, L. F., Numerical Solution of Ordinary Differential Equations, Chapman & Hall, New York, Shampine, L. F. and M. W. Reichelt, “The MATLAB ODE Suite,” (to appear in SIAM Journal on Scientific Computing, Vol. 18-1, 1997). Shampine, L. F. and M. E. Hosea, “Analysis and Implementation of TR- BDF2,” Applied Numerical Mathematics 20, 1996.