APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Similar documents
Homogeneous Equations with Constant Coefficients

Numerical Methods - Boundary Value Problems for ODEs

1. Consider the initial value problem: find y(t) such that. y = y 2 t, y(0) = 1.

Ordinary Differential Equations I

Ordinary Differential Equation Theory

Lecture 29. Convolution Integrals and Their Applications

First Order Systems of Linear Equations. or ODEs of Arbitrary Order

Finite Difference Methods for Boundary Value Problems

Math 23: Differential Equations (Winter 2017) Midterm Exam Solutions

Section 2.1 Differential Equation and Solutions

Ordinary Differential Equations I

Ordinary Differential Equations (ode)

Chapter 1: Introduction

. For each initial condition y(0) = y 0, there exists a. unique solution. In fact, given any point (x, y), there is a unique curve through this point,

Math 220 Final Exam Sample Problems December 12, Topics for Math Fall 2002

CHAPTER 7. An Introduction to Numerical Methods for. Linear and Nonlinear ODE s

Lecture Notes for Math 251: ODE and PDE. Lecture 7: 2.4 Differences Between Linear and Nonlinear Equations

Ordinary Differential Equations

The integrating factor method (Sect. 1.1)

dt 2 The Order of a differential equation is the order of the highest derivative that occurs in the equation. Example The differential equation

Chap. 20: Initial-Value Problems


Old Math 330 Exams. David M. McClendon. Department of Mathematics Ferris State University

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

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

Lecture 5: Single Step Methods

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems

The Plan. Initial value problems (ivps) for ordinary differential equations (odes) Review of basic methods You are here: Hamiltonian systems

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

Ordinary Differential Equations I

First and Second Order Differential Equations Lecture 4

Ordinary Differential Equations (ODEs)

Ordinary Differential Equations. Monday, October 10, 11

Numerical Methods - Initial Value Problems for ODEs

ORDINARY DIFFERENTIAL EQUATIONS

dy dt = ty, y(0) = 3. (1)

Chapter 2 Notes, Kohler & Johnson 2e

Calculus IV - HW 2 MA 214. Due 6/29

Lecture 2. Classification of Differential Equations and Method of Integrating Factors

Ordinary Differential Equations

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Solutions Definition 2: a solution

Lecture 4.2 Finite Difference Approximation

Chapter 2: First Order DE 2.4 Linear vs. Nonlinear DEs

SMA 208: Ordinary differential equations I

Consider an ideal pendulum as shown below. l θ is the angular acceleration θ is the angular velocity

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics

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

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Lecture 17: Ordinary Differential Equation II. First Order (continued)

Math 392 Exam 1 Solutions Fall (10 pts) Find the general solution to the differential equation dy dt = 1

Solutions for homework 1. 1 Introduction to Differential Equations

Math 2a Prac Lectures on Differential Equations

Math 266: Ordinary Differential Equations

ORDINARY DIFFERENTIAL EQUATIONS

2.1 Differential Equations and Solutions. Blerina Xhabli

Chapter 6 - Ordinary Differential Equations

First Order Differential Equations Lecture 3

Definition of differential equations and their classification. Methods of solution of first-order differential equations

Lecture 42 Determining Internal Node Values

Finite Difference Method

Differential Equations

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

Numerical methods for solving ODEs

Modeling and Experimentation: Compound Pendulum

ETNA Kent State University

Linear Systems of ODE: Nullclines, Eigenvector lines and trajectories

An Overly Simplified and Brief Review of Differential Equation Solution Methods. 1. Some Common Exact Solution Methods for Differential Equations

Ordinary Differential Equations

MATH 308 Differential Equations

M A : Ordinary Differential Equations

Lecture 19: Solving linear ODEs + separable techniques for nonlinear ODE s

MATH 353 LECTURE NOTES: WEEK 1 FIRST ORDER ODES

Solving Ordinary Differential Equations

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

(1) Rate of change: A swimming pool is emptying at a constant rate of 90 gal/min.

Module 2 : Convection. Lecture 12 : Derivation of conservation of energy

3.3. SYSTEMS OF ODES 1. y 0 " 2y" y 0 + 2y = x1. x2 x3. x = y(t) = c 1 e t + c 2 e t + c 3 e 2t. _x = A x + f; x(0) = x 0.

MIDTERM REVIEW AND SAMPLE EXAM. Contents

Differential Equation (DE): An equation relating an unknown function and one or more of its derivatives.

Euler s Method (BC Only)

x n+1 = x n f(x n) f (x n ), n 0.

What we ll do: Lecture 21. Ordinary Differential Equations (ODEs) Differential Equations. Ordinary Differential Equations

1.1 Motivation: Why study differential equations?

Math53: Ordinary Differential Equations Autumn 2004

Final Exam December 20, 2011

Review for Exam 2 Ben Wang and Mark Styczynski

The family of Runge Kutta methods with two intermediate evaluations is defined by

y0 = F (t0)+c implies C = y0 F (t0) Integral = area between curve and x-axis (where I.e., f(t)dt = F (b) F (a) wheref is any antiderivative 2.

Numerical Solution of Differential Equations

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

On the Computational Procedure of Solving Boundary Value Problems of Class M Using the Power Series Method

Math 225 Differential Equations Notes Chapter 1

Lecture two. January 17, 2019

SME 3023 Applied Numerical Methods

MATH 100 Introduction to the Profession

Ordinary Differential Equations

1 Linear Regression and Correlation

Transcription:

LECTURE 10 APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS Ordinary Differential Equations Initial Value Problems For Initial Value problems (IVP s), conditions are specified at only one value of the independent variable initial conditions (i.c. s) For example a simple harmonic oscillator is described by A d2 y ------- 2 + B ----- + Cy gt y 0 y o -----0 V o y location dependent variable t time independent variable p. 10.1

Boundary Value Problems For Boundary Value Problems (BVP s) conditions are specified at two values of the independent variable (which represent the actual physical boundaries) Example General Initial Value Problems Any IVP can be represented as a set of one or more 1st order d.e. s each with an i.c. Example d 2 y ------- dx 2 + D ----- + Ey hx y 0 dx A d2 y ------- 2 + B ----- + C gt y 0 y o yl Let z ----- and we can develop a system of 2 first order O.D.E. s which are coupled ----- z y 0 y o dz ---- B Ā -- C gt z --- + --------- z 0 v A A o y o -----0 y l v o p. 10.2

Therefore the general IVP can be written as: 1 ------- f 1 y 1 y 2 y n t y 1 0 y 10. n ------- f n y 1 y 2 y n t y n 0 y n0 Possible solution strategies for higher order o.d.e. s Solutions of 1st order d.e. s single equation with associated i.c. extension to coupled sets Solution of higher order equations without reduction to a 1st order system must develop a method for a specific equation not as general may be advantageous in certain cases p. 10.3

Solution to a 1st Order Single Equation IVP ----- fyt with specified i.c. yt o y o Euler Method The Euler method is a 1st order method We evaluate the o.d.e. at node j and use a forward difference approximation for ----- j ----- j fy j,t j y j + 1 y j -------------------- fy t j t j y j 1 + y j + t f y j t j p. 10.4

Simply march forward in time From time level j (time ) To time level j + 1 (time t j + 1 t j + t ) t j y j+1 y j } t f (t j, y j ) t j t j+1 We note that ft j y j equals the slope at t j. Therefore to obtain y j + 1 simply add t ft j y j to y j p. 10.5

Example Solve ----- yy with the i.c. y 0 1 Apply the Euler approximation to solve this IVP equation. Apply a time step equal to t 0.5. Solve up to t 3 0 t 3 y t t0 0.5 1.0 1.5 2.0 2.5 3.0 0 1 2 3 4 5 6 i i.c. information available p. 10.6

Discretize the o.d.e. at a general node i ----- i y i y i Approximate ----- using a forward difference approximation i y i + 1 y i -------------------- y t i y i y i 1 + y i t y i y i Next Value Previous Value + Run Slope Equation relates a known time level i to the new time level i + 1. This process is known as time stepping or time marching p. 10.7

The i.c. indicates that y o 1 Take 1st time step i 0 i + 1 1 Note that t i i t + t o i t where t o 0 in this case y 1 y o ty o y o y 1 1 0.5 1 1 y 1 0.5 at t 1 0.5 Take next time step i 1 i + 1 2 y 2 y 1 t y 1 y 1 y 2 0.5 0.5 0.5 0.5 y 2 0.375 at t 2 1.0 p. 10.8

Take next time step i 2 i + 1 3 y 3 y 2 t y 2 y 2 y 3 0.375 0.5 0.375 0.375 y 3 0.30469 at t 3 1.5 Take next time step i 3 i + 1 4 y 4 y 3 t y 3 y 3 y 4 0.30469 0.5 0.30469 0.30469 y 4 0.25827 at t 4 2.0 p. 10.9

Take next time step y 5 0.22492 at t 5 2.5 Take next time step y 6 0.19963 at t 6 3.0 We can continue time marching t Numerical Solution using Numerical Solution using Exact t 0.5 and the Euler t 0.1 and the Euler Solution Method Method 0.0 1.0000 (i.c.) 1.0000 (i.c.) 1.0000 1.0 0.37500 0.4982 0.5000 2.0 0.25827 0.3321 0.3333 3.0 0.19963 0.2491 0.2580 p. 10.10

General Observations for Solving IVP s Solution to o.d.e. s can be very simple using finite difference approximations to represent differentiation Accuracy is dependent on the time step As t 0, the solution gets better t! We need to understand the error behavior IVP s are solved using a time marching process Begin at one end and march forward up to the desired point or indefinitely At each time step, we introduce a new unknown, and solving the discrete form of the IVP at node j. y j + 1, which is solved for by writing Solutions to Boundary Value Problems Boundary value problems must be 2nd order o.d.e. s or higher We apply FD approximations to the various terms in the differential equation to obtain discrete approximations to the differential equations at points in space. Unknown functional values at the nodes will be coupled and require the solution of a system of simultaneous equations matrix methods. p. 10.11

Example Consider a stea state 1-D problem d 2 y ------- dx 2 + Ay B with b.c. s specified as y 0 0 and yl 0 Consider the following discretization of the domain j0 1 2 3 j-1 j j+1 n-2 n-1 n jn+1 x0 x xl At each node, we introduce an unknown (total of n+2 unknowns) The O.D.E. is approximated at generic node j as y j y j + 1 2y j + y j 1 ----------------------------------------- x 2 + Ay j B We have used a central difference approximation of O x 2 p. 10.12

Therefore we generate n + 2 equations (1 for each interior point and 1 for each boundary node) to solve for the n + 2 unknowns: y 0 0 y 2 2y 1 + y 0 + A x 2 y 1 B x 2 y 3 2y 2 + y 1 + A x 2 y 2 B x 2.. y j + 1 2y j + y j 1 + A x 2 y j B x 2. y n 2y n 1 + y n 2 + A x 2 y n 1 B x 2 y n + 1 2y n + y n 1 + A x 2 y n B x 2 y n + 1 0 p. 10.13

Collect coefficients of unknowns and write in matrix form: 1 0 1 1 1 1 1 1......... 1 1 1 1 1 1 0 1 y 0 y 1 y 2 y 3 y n 1 y n y n + 1 0 B x 2 B x 2 B x 2 B x 2 B x 2 0 where 2 + A x 2 p. 10.14

Notes on solutions Tri-diagonal systems are very inexpensive to solve when a specialized compact storage tri-diagonal solver is used We can reduce the system of simultaneous equations from n + 2 n + 2 to n n by incorporating the b.c. s into the discrete form of the differential equation at nodes 1 and n If the o.d.e. is nonlinear the method no longer generates linear set of simultaneous algebraic equations but a nonlinear set! Example Solve the following nonlinear o.d.e. d 2 y ------- dx 2 + Dy 2 E Using a central difference approximation yields nonlinear algebraic equations y j + 1 2y j + y j 1 2 ----------------------------------------- x 2 + Dy j E p. 10.15

Solution strategies include: Iterative solution of algebraic equations puts the nonlinear term on the r.h.s. and iterates until convergence. There may be convergence problems. Linearization of the nonlinear terms. Use Taylor series to approximate the nonlinear terms. p. 10.16