0% found this document useful (0 votes)
50 views23 pages

Chapter 6.2

The document discusses two numerical methods for solving boundary value problems (BVPs) for ordinary differential equations (ODEs): 1) The shooting method converts the BVP into an equivalent initial value problem by guessing an initial condition and iteratively adjusting it until the solution satisfies the boundary conditions. 2) The finite differencing method replaces derivatives in the ODE with finite differences on a discretized grid, resulting in a system of algebraic equations that can be solved using the Thomas algorithm. Examples of each method are provided.

Uploaded by

Pabloster Amzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views23 pages

Chapter 6.2

The document discusses two numerical methods for solving boundary value problems (BVPs) for ordinary differential equations (ODEs): 1) The shooting method converts the BVP into an equivalent initial value problem by guessing an initial condition and iteratively adjusting it until the solution satisfies the boundary conditions. 2) The finite differencing method replaces derivatives in the ODE with finite differences on a discretized grid, resulting in a system of algebraic equations that can be solved using the Thomas algorithm. Examples of each method are provided.

Uploaded by

Pabloster Amzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 6

Ordinary Differential Equation


Part 2: Boundary Value Problem
Ordinary differential Equation: Boundary value problem

Overview

• For a system of ODEs or for an ODE of order 2 or more, we need to specify


multiple initial/boundary conditions

• If all these conditions are provided at the same point, the problem is said to be
an Initial Value Problem (IVP).

• If these conditions are not provided at the same point, the problem is said to be a
Boundary Value problem (BVP)
Ordinary differential Equation: Boundary value problem

Shooting Method.

• Shooting method is a technique of converting the boundary value problem to an


equivalent initial value problem.

• Then, an initial value problem is solved via a trial-and-error approach. This


technique is called a "shooting" method, by analogy to the procedure of shooting
the object at a stationary target.
Ordinary differential Equation: Boundary value problem

Shooting Method procedures.

• Step 1:
• Reduce the second 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

• 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.
Ordinary differential Equation: Boundary value problem

Shooting Method procedures.

• 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.
Ordinary differential Equation: Boundary value problem

Shooting Method procedures.

• Step 5:
• If the result obtained from the second initial guess also differ from the
boundary conditions, extrapolate the initial value using linear extrapolate
formula.

Where,
First guess at initial slope
Second guess at initial slope
Final result at endpoint (using
Second result at endpoint (using
The desired value at endpoint

• Step 6:
• The equivalent system of initial value problem is then solved via Euler’s
method.
Ordinary differential Equation: Boundary value problem

Shooting Method.

• Example 1: use the shooting method to approximate the solution of the


boundary value problem.

Let the first guess, and the second guess,

Solution:
Ordinary differential Equation: Boundary value problem

Shooting Method.
Ordinary differential Equation: Boundary value problem

Shooting Method.
Ordinary differential Equation: Boundary value problem

Shooting Method.
Ordinary differential Equation: Boundary value problem

Shooting Method.

Since (same with boundary condition), the solutions that were obtained with the
assumptions is acceptable.

Therefore,

𝑦(0) = 1.2; 𝑦(0.25) ≈ 0.9292; 𝑦(0.5) ≈ 0.8083; 𝑦(0.75) ≈ 0.8036 and 𝑦(1.0) = 0.9.
Ordinary differential Equation: Boundary value problem

Finite differencing method.

• The idea is to replace the derivatives in the ODE with finite divided differences.

• We have the general form of second order ODEs (BVP)

• Interval [ a , b] is divided into n subinterval with a step size or

• Boundary values and are known.

• Hence, we only need to compute the approximate value of for


Ordinary differential Equation: Boundary value problem

Finite differencing method.

• In finite difference method, a general form of second order ODE at the interior
mesh points for 𝑖 = 1,2, … , 𝑛 − 1.

• By using central difference formula for first and second derivatives,


Ordinary differential Equation: Boundary value problem

Finite differencing method.

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

• By using mathematical manipulation, we rearrange the equations above into

• Applying finite difference formula for each interior nodes leads to a set of
simultaneous algebraic equations.
Ordinary differential Equation: Boundary value problem

Finite differencing method.

• Transforming the simultaneous algebraic equations into Tridiagonal system

• Note that this is a tridiagonal system. There are very efficient algorithms
specially designed to solve such systems which is Thomas Algorithm in page
301-302.
Ordinary differential Equation: Boundary value problem

Finite differencing method.

• For the given tridiagonal matrix before, the Thomas algorithm were such
follows.
• Decomposition:

i start from 1 until n-1

• Forward substitution

i start from 1 until n-1

• Backward substitution

i start form n-1 to 1


Ordinary differential Equation: Boundary value problem

Finite differencing method procedures.


• Step 1:
• Write the second order ODEs (BVP) in general form

• Step 2:
• Identifying 𝑝,𝑞 and 𝑟

• Step 3:
• Compute the step size, by performing the discretization process.
Substitute 𝑝,𝑞 and 𝑟 and Δ𝑥 into equation.

• Step 4:
• Use the discretization output in Step 3 to write at each

• Step 5:
• Transform the system of linear equations into tridiagonal system

• Step 6:
• Solve the tridiagonal system by using Thomas algorithm
Ordinary differential Equation: Boundary value problem

Finite differencing method.

Example: use the Finite difference method to approximate the solution of the
boundary value problem.

Solution:

The general form is

Hence, we have
Ordinary differential Equation: Boundary value problem

Finite differencing method.

Conti..

Then using the formula

We substitute 𝑝, 𝑞, 𝑟 and into finite difference formula gives us


Ordinary differential Equation: Boundary value problem

Finite differencing method.

Conti..

Next, by discretization process, we have


Ordinary differential Equation: Boundary value problem

Finite differencing method.

Conti..

for

for

for
Ordinary differential Equation: Boundary value problem

Finite differencing method.

Conti..
Hence, our tridiagonal system is

By using Thomas algorithm, we have

Therefore, the approximated solutions of the


boundary value problems are
Ordinary differential Equation: Boundary value problem

Finite differencing method.

Conti..

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy