Chapter 6.2
Chapter 6.2
Overview
• 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.
• 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
• 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
• 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.
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
• The idea is to replace the derivatives in the ODE with finite divided differences.
• In finite difference method, a general form of second order ODE at the interior
mesh points for 𝑖 = 1,2, … , 𝑛 − 1.
• Substituting the first and second derivatives in general form of second order
ODEs (BVP)
• Applying finite difference formula for each interior nodes leads to a set of
simultaneous algebraic equations.
Ordinary differential Equation: Boundary value problem
• 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
• For the given tridiagonal matrix before, the Thomas algorithm were such
follows.
• Decomposition:
• Forward substitution
• Backward substitution
• 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
Example: use the Finite difference method to approximate the solution of the
boundary value problem.
Solution:
Hence, we have
Ordinary differential Equation: Boundary value problem
Conti..
Conti..
Conti..
for
for
for
Ordinary differential Equation: Boundary value problem
Conti..
Hence, our tridiagonal system is
Conti..