Numerical Methods: Boundary Value Problems in Ordinary Differential Equations, Essays (high school) of Mathematics

A comprehensive guide to solving boundary value problems (bvps) in ordinary differential equations (odes) using numerical methods. It covers two key techniques: the shooting method and the finite difference method. The concepts, procedures, and examples for each method, making it a valuable resource for students and researchers in mathematics, engineering, and related fields.

Typology: Essays (high school)

2021/2022

Uploaded on 03/21/2025

wong-qi-yuan-jeffrey
wong-qi-yuan-jeffrey 🇸🇬

1 document

1 / 30

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Numerical Methods
by Norhayati Rosli
http://ocw.ump.edu.my/course/view.php?id=449
Numerical Methods
Ordinary Differential Equations:
Boundary Value Problems (BVP)
by
Norhayati Rosli
Faculty of Industrial Sciences & Technology
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e

Partial preview of the text

Download Numerical Methods: Boundary Value Problems in Ordinary Differential Equations and more Essays (high school) Mathematics in PDF only on Docsity!

Numerical Methods by Norhayati Rosli

Numerical Methods

Ordinary Differential Equations:

Boundary Value Problems (BVP)

by

Norhayati Rosli

Faculty of Industrial Sciences & Technology

[email protected]

Numerical Methods by Norhayati Rosli

Description

Students should be able to solve boundary value problems using shooting method and finite difference method.

AIMS

EXPECTED OUTCOMES

  1. Norhayati Rosli, Nadirah Mohd Nasir, Mohd Zuki Salleh, Rozieana Khairuddin, Nurfatihah Mohamad Hanafi, Noraziah Adzhar. Numerical Methods, Second Edition, UMP, 2017 (Internal use)
  2. Chapra, C. S. & Canale, R. P. Numerical Methods for Engineers , Sixth Edition, McGraw– Hill, 2010.

REFERENCES

This chapter is aimed to solve boundary value problems of second order ODEs by using two different types of methods involving shooting method and finite difference method.

Numerical Methods by Norhayati Rosli

INTRODUCTION

In initial value problem, the condition is specified at the same value of the independent variable. However, for boundary value problem (BVP), the conditions are specified at different values of the independent variables. In a nutshell, a BVP is a problem, typically ODE which has values assigned on the physical boundary of the domain.

2

2 ( ,^ ,^ '),^ [ ,^ ]

( ) , ( )

d y f x y y x a b dx

y a  y b 

 

 

General Form of ODEs (BVP)

Numerical Methods by Norhayati Rosli

Numerical Methods for Solving ODEs (IVP)

INTRODUCTION (Cont.)

Two Types

of Methods

Finite Difference Method Shooting Method

Most of ODEs (BVP) cannot be solved analytically. Its due to the complexity form of the equations. Numerical methods offer a viable option to solve ODEs (BVP).

Numerical Methods by Norhayati Rosli

Shooting Method Procedures

Step 1

Reduce the second order ODE (BVP) of equation to a system of first order ODE (IVP). The second order ODE is transformed into a system of two first order ODEs as

SHOOTING METHOD (Cont.)

Step 2

Determine the initial value. The boundary value at the first point of the domain is known and is used as one initial value of the system. The additional initial value that required for solving the system is guessed.

1 0 0 2 2 2 0 0

( , , ) , ( ) or ( )

( , , ) , ( )

dy f x y z z y x y y a dx dz d y f x y z z x z dx dx

    

  

Numerical Methods by Norhayati Rosli

Shooting Method Procedures (Cont.)

SHOOTING METHOD (Cont.)

Step 3

The equivalent system of initial value problem is then solved via Euler’s method, RK2 method or RK4 method. However, in this course only Euler’s method shall be considered.

Step 4

The solution obtained at the end point of the domain is compared with the boundary condition. If the numerical solution is differ from the boundary condition, the guess initial value is changed, and the system is solved again.

Numerical Methods by Norhayati Rosli

SHOOTING METHOD (Cont.)

Example 1

Use the Shooting method to approximate the solution of the boundary value problem

Let the first guess, 𝑧 0 = −1.5 and the second guess, 𝑧 0 = −1.

Solution

Step 1 Reduce the second order ODE (BVP) to a system of first order ODE (IVP).

y ''( )x  2 ( )y x  0, y (0)  1.2, y (1.0)  0.9, h0.

1

2

( , , )

( , , ) 2

f x y z dy z dx dz f x y z y dx

 

 

Numerical Methods by Norhayati Rosli

SHOOTING METHOD (Cont.)

Solution (Cont.)

Given 𝑥 0 = 0 , 𝑦 0 = 1. 2 , 𝑧 0 , approximate the system of first order ODE via Step 2 Euler method.

Numerical Methods by Norhayati Rosli

SHOOTING METHOD (Cont.)

Solution (Cont.)

Step 4

𝑦(1.0) ≈ 0.9938 ≠ 0.9. Extrapolate the initial value using linear extrapolate formula

1.0 ( 1.5) (0) 1.5 (0.9 0.4312) 0.9938 0.

z

         

Numerical Methods by Norhayati Rosli

SHOOTING METHOD (Cont.)

Solution (Cont.)

The equivalent system of initial value problem is then solved via Euler’s method

Step 5

Since, 𝑦 4 = 𝑦( 1. 0 ) = 0. 9 (same with boundary condition), the solutions that were obtained in Step 5 is acceptable.

Therefore, 𝑦( 0 ) = 1. 2 ; 𝑦( 0. 25 ) ≈ 0. 9292 ; 𝑦( 0. 5 ) ≈ 0. 8083 ; 𝑦( 0. 75 ) ≈ 0. 8036 and 𝑦( 1. 0 ) = 0. 9.

Numerical Methods by Norhayati Rosli

FINITE DIFFERENCE METHOD

(Cont.)

Boundary values 𝑦 0 and 𝑦𝑛 are known. The approximate values of 𝑦𝑖 for 𝑖 = 1 , 2 , … , 𝑛 − 1 is computed. In finite difference method, a general form of second order ODE at the interior mesh points 𝑥 = 𝑥𝑖 for 𝑖 = 1 , 2 , … , 𝑛 − 1.

or

i i i i i i

i i i i i i

y x p x y x q x y x r x

y p y q y r

General Form Second Order ODEs

Numerical Methods by Norhayati Rosli

FINITE DIFFERENCE METHOD

(Cont.)

By using central difference formulas for first and second derivatives:

Substituting the first and second derivatives in general form of second order ODEs (BVP)

2 1 1 2 2

1 1

2

2

i i i

i i

d y^ y^ y^ y dx x dy y y dx x

 

 

      

1 1 1 1 2

2 . 2

i i i i i i i i i

y y y y y p q y r x x

 ^ ^  (^)        

Finite Difference Method: Formula

Numerical Methods by Norhayati Rosli

FINITE DIFFERENCE METHOD

(Cont.)

Finite Difference Method: Tridiagonal System

Transforming the simultaneous algebraic equations into Tridiagonal system

where 𝑑𝑖, 𝑒𝑖 and 𝑐𝑖 for 𝑖 = 1 , 2 , … , 𝑛 − 1 are the coefficients of 𝑦 1 , … , 𝑦𝑛− 1.

1 1 1 1

2 2 2 2 2

1 1 1 1

0 0

0

(^0 0)    

                (^)                 n^ n^   n^   n 

d e y b

c d e y b

c d y b

Numerical Methods by Norhayati Rosli

FINITE DIFFERENCE METHOD

(Cont.)

Finite Difference Method: Thomas Algorithm

i  di ci i 1  1  d 1

i

i i

e

 

i

i i i i

b c w

w

  ^1

1

1 1 

b

w 

yi  wi   (^) i yi 1 yn (^)  1  wn 1

Thomas Algorithm Formula

Applying Direct Methods of solving linear algebraic equations or Thomas Algorithm