NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

Section 7.2: Direction Fields and Euler’s Methods Practice HW from Stewart Textbook (not to hand in) p. 511 # 1-13, odd.
Computational Methods in Physics PHYS 3437
Ordinary Differential Equations
Chapter 7 Numerical Differentiation and Integration
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 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.
Systems of Non-Linear Equations
Numerical Solutions of Ordinary Differential Equations
CISE301_Topic8L31 SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Differential Equations and Boundary Value Problems
Numerical Solution of Ordinary Differential Equation
Numerical solution of Differential and Integral Equations PSCi702 October 19, 2005.
PART 7 Ordinary Differential Equations ODEs
Calculus and Analytic Geometry II Cloud County Community College Spring, 2011 Instructor: Timothy L. Warkentin.
Section 6.1: Euler’s Method. Local Linearity and Differential Equations Slope at (2,0): Tangent line at (2,0): Not a good approximation. Consider smaller.
A Numerical Technique for Building a Solution to a DE or system of DE’s.
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
Lecture 35 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Modeling and simulation of systems Numerical methods for solving of differential equations Slovak University of Technology Faculty of Material Science.
Integration of 3-body encounter. Figure taken from
Slope Fields Objective: To find graphs and equations of functions by the use of slope fields.
SPECIALIST MATHS Differential Equations Week 1. Differential Equations The solution to a differential equations is a function that obeys it. Types of.
Numerical Solutions of ODE
Chapter 21 Exact Differential Equation Chapter 2 Exact Differential Equation.
Scientific Computing Multi-Step and Predictor-Corrector Methods.
© Imperial College London Numerical Solution of Differential Equations 3 rd year JMC group project ● Summer Term 2004 Supervisor: Prof. Jeff Cash Saeed.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 7 - Chapter 25.
Numerical Analysis – Differential Equation
Introduction to the Runge-Kutta algorithm for approximating derivatives PHYS 361 Spring, 2011.
Suppose we are given a differential equation and initial condition: Then we can approximate the solution to the differential equation by its linearization.
Please remember: When you me, do it to Please type “numerical-15” at the beginning of the subject line Do not reply to my gmail,
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
Lecture 40 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
10.1 Definition of differential equation, its order, degree,
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.
1/14  5.2 Euler’s Method Compute the approximations of y(t) at a set of ( usually equally-spaced ) mesh points a = t 0 < t 1
Lecture 39 Numerical Analysis. Chapter 7 Ordinary Differential Equations.
NUMERICAL DIFFERENTIATION or DIFFERENCE APPROXIMATION Used to evaluate derivatives of a function using the functional values at grid points. They are.
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.
CISE301_Topic8L71 CISE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM (Term 101) Section 04 Read , 26-2,
Keywords (ordinary/partial) differencial equation ( 常 / 偏 ) 微分方程 difference equation 差分方程 initial-value problem 初值问题 convex 凸的 concave 凹的 perturbed problem.
Ordinary Differential Equations
Engineering Problem Solution
Part 7 - Chapter 25.
Numerical Methods by Dr. Laila Fouad.
Ordinary Differential Equations
Class Notes 18: Numerical Methods (1/2)
Numerical Solutions of Ordinary Differential Equations
Class Notes 19: Numerical Methods (2/2)
Numerical Analysis Lecture 45.
Chapter 26.
Part 7 - Chapter 25.
Numerical Analysis Lecture 37.
Numerical Solutions of Ordinary Differential Equations
Numerical Analysis Lecture 38.
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.
Presentation transcript:

NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS Chapter 8 NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS

PRELIMINARIES Consider = f (x, y) with an initial condition y = y0 at x = x0. The function f (x, y) may be linear, nonlinear or table of values When the value of y is given at x = x0 and the solution is required for x0 < x < xf then the problem is called an initial value problem. If y is given at x = xf and the solution is required for xf > x > x0 then the problem is called a boundary value problem.

INITIAL VALUE PROBLEMS A Solution is a curve g (x, y) in the xy plane whose slope at each point (x, y) in the specified region is given by = f (x, y). The initial point (x0, y0) of the solution curve g(x, y) and the slope of the curve at this point is given. We then extrapolate the values of y for the required set of values in the range (x0, xf).

EULER’S METHOD y2 y1 y0 x0 x1 xn

EULER’S METHOD This method uses the simplest extrapolation technique. The slope at (x0, y0) is f (x0, y0). Taking a small step in the direction given by the above slope, we get y1 = y (x0 + h) = y0 + hf (x0, y0) Similarly y2 can be obtained from y1 by taking an equal step h in the direction given by the slope f(x1, y1). In general yi+1= yi + h f(xi, yi)

yi+1 = yi + ½ h [f (xi, yi) + f (xi + h, yi + hf (xi, yi)) ] Modifications Modified Euler Method In this method the average of the slopes at (x0, y0) and (x1, y=1(1)) is taken instead of the slope at (x0, y0) where y1(1) = y1 + h f (x0, y0). In general, Improved Modified Euler Method In this method points are averaged instead of slopes. yi+1 = yi + ½ h [f (xi, yi) + f (xi + h, yi + hf (xi, yi)) ]

Example Find y (0.25) and y (0.5) given that = 3x2 + y, y(0) = 4 by (i) Euler Method (ii) Modified Euler Method (iii) Improved Euler Method and compare the results.

Solution Applying Formulae

TAYLOR SERIES METHOD Consider = f (x, y) with an initial condition y = y0 at x = x0. The solution curve y(x) can be expressed in a Taylor series around x = x0 as: y (x0 + h) = y0 + h +… where x = x0+h.

Example Using Taylor series find y(0.1), y(0.2) and y(0.3) given that = x2 - y; y(0) =1 Solution Applying formula y(0.1) = 0.9052 y(0.2) = 0.8213 y(0.3) = 0.7492

PICARD’S METHOD OF SUCCESSIVE APPROXIMATIONS This is an iterative method. Consider = f (x, y) with an initial condition y = y0 at x = x0. Integrating in (x0, x0 + h) y(x0 +h) = y(x0) + This integral equation is solved by successive approximations.

After n steps Example Find y(1.1) given that = x – y, This process is repeated and in the nth approximation, we get y(n) = y0 + Example Find y(1.1) given that = x – y, y(1) = 1, by Picard’s Method.

Solution y(1)1.1 = 1 + = 1.005 Successive iterations yield 1.0045, 1.0046 , 1.0046 Thus y (1.1) = 1.0046 Exact value is y (1.1) = 1.0048

RUNGE–KUTTA METHODS Euler Method is not very powerful in practical problems, as it requires very small step size h for reasonable accuracy. In Taylor’s method, determination of higher order derivatives are involved. The Runge–Kutta methods give greater accuracy without the need to calculate higher derivatives.

nth order R.K. Method This method employs the recurrence formula of the form yi+1 = yi + a1 k1 + a2 k2 + L + an kn where k1 = h f ( xi, yi) k2 = h f (xi + p1h, yi + q11 k1) k3 = h f (xi + p2h, yi + q21 k1 + q22 k2) ……. …….. ……… kn = h f( xi + pn-1 h, yi + q n-1,1 k1 + qn-2, 2 k2 + L q(n-1), (n-1)kn)

4th order R.K. Method Most commonly used method yn+1 = yn + (k1 + 2k2 + 2k3 + k4) where k1 = hf(xn, yn) k2 = hf (xn + , yn + ) k3 = hf (xn + , yn + ) k4 = h f (xn +h, y3 +k3)

Example Using R.K. Method of 4th order find y(0.1) and y(0.2). Given that =3x + ½ y, y (0) = 1 taking h = 0.1. Solution

PREDICTOR CORRECTOR METHODS In the Runge-Kutta methods the solution, point yn+1 is evaluated using only the solution point yn and none of the previous points yn-1, yn-2 etc. on the solution curve. The behaviour of the solution in the past are ignored and each step starts afresh. This will be inefficient. The Predictor-Corrector methods take the previous solution points also into account. In these methods First a predictor formula is obtained and a corrector is obtained.

Milne’s Predictor-Corrector Method This method uses the past 4 points in the solution. Note: If there is a significant difference between predictor and corrector value the corrector value may be taken as predictor value and a new corrector value may be calculated.

Example Solve using Milne’s Method given that = y(0) = 2, y (0.2) = 2.0933, y (0.4) = 2.1755, y (0.6) = 2.2493. Find y (0.8).

Solution for y(0.8) P redictor formula: Y =y +4 (2f – f +2f ) C +4 3 h (2f – f 2 +2f i 1 ) C orrector formula: + (f + 4f + f ). yields y4,p = 2.3163 yields y4,C = 2.3164

Adams – Bashforth Predictor – Corrector Method

Example Given y = x2–y, y(0) = 1, y(0.1) = 0.90516, y(0.2) = 0.82127 and y (0.3) = 0.74918, find y (0.4) by Adams method. Solution y4,p = y3 + (55f3 – 59f2 + 37f1 – 9f0) = 0.6897 y4,c = y3 + (9f4 + 19f3 – 5f2 + f1) = 0.6897