Chapter 8 - Numerical Methods For Boundary Value Problems
Chapter 8 - Numerical Methods For Boundary Value Problems
Chapter 8 - Numerical Methods For Boundary Value Problems
Last lecture:
System of 1st orde ODEs and higher order ODE
Numerical instability
This lecture:
a b x
8.1 Shooting Method
Two B.C.'s (u & u', or u' & u", or u & u") are given on one side (x=a)
and one BC is given on the other side (x=b).
Starting from the side with two B.C.'s, guess u"(x=a) (or u'(x=a)), & shoot for the other side.
ℎ ℎ
(1- 2 bi) yi-1 - (2-ci h2) yi + (1+ 2 bi) yi+1 = dih2 (3)
* Errors: The truncation error is of O(h2) for Eq. (2) since y' and y" have O(h2) errors.
𝑥
* Example: Consider y" - (1 - 5) y = x, y(1) = 2, y(3) = -1.
Soln. • bi = 0, ci = -(1- xi /5), di = xi
• Choose h=0.5 (with 4 intervals)
yi-1 - [2+(1-xi /5) h2] yi + yi+1 = xi h2 for i=2, 3 & 4.
𝑥
* Example: y" - (1 - 5) y = x, y'(1) = -3.5, y(3) = -1.
ℎ ℎ
Solution: + (1- 2 bi) yi-1 - (2-ci h2) yi (1+ 2 bi) yi+1 = dih2 (3)