You are on page 1of 6

Boundary value problems

The differential equation in section one is of first order and has one initial condition to satisfy.
Later in the chapter we saw that the techniques could be extended to systems of equations and
then to higher-order equations, but all the specified conditions are on the same end point. These
are initial-value problems. In this chapter we show how to approximate the solution to
boundary-value problems, differential equations with conditions imposed at different points.
For first-order differential equations, only one condition is specified, so there is no distinction
between initial-value and boundary-value problems. We will consider second-order equations
with two boundary values of the form
y ''=f ( x,y,y' ) , a≤x≤b
together with the boundary conditions
y ( a)=α and y ( b )= β,
In this section, we shall see the Finite Difference and the Shooting Methods for solving equation

Finite Difference Method for Linear Problems


In this method, the derivatives appearing in the differential equation and the boundary conditions
are replaced by their finite difference approximation (particularly by the central difference
approximation) and the resulting linear system of equations is solved by any standard
procedure. These roots are the values of the required solution at the pivotal points.
We apply this method to linear second order BVP
y ''=f ( x,y,y' ) , a≤x≤b
together with the boundary conditions
y ( a)=α and y ( b )= β,
The working expression for the central difference approximation for the first two derivatives of

yi
are as under

1
y 'i= ( y −y )
2 h i+1 i−1
1
y ''i = 2 ( y i+1−2 y i + y i−1 )
h
Note:- The accuracy of this method depends on the size of the subinterval h. As we reduce h, the

accuracy improves but the number of equations to be solved also increases.

Example: - Solve the boundary value problem (BVP)

(1+ x2 ) y'' +2xy'− y=x 2


with the boundary conditions
y(0 )=1 and y(1)=0
Use Step size h = 0.25.

Solution: - To solve this problem we can apply the approximation of the derivatives to the given
equation, we obtain
y n+1−2y n + y n−1 y n+1− y n−1
( 1+ x 2 ) + 2x n − y n =x 2n
n h2 2h

Since h = ¼ it implies that the range of x is divided into four parts by 5 node points.
Thus x0 = 0, x1 = 0.25, x2 = 0.5, x3 = 0.75 and x4 = 1 and the boundary condition y(0) = 1 and
y(1) = 0 simply transform to y0 = 1 and y4 = 0. Now the reasonable thing to do as in the theory
above is to substitute n = 1, 2, 3 to find y1 = y(x1), y2 = y(x2) and y3 = y(x3). Hence, we obtain
With n = 1, the formula above becomes

y 2−2y 1 + y 0 y 2− y 0
( 1+ x 2 ) + 2x 1 − y 1=x 21
1 h2 2h

1 2 y 2 −2y 1 +1 1 y 2 −1 1 2

( ( ) )(
1+
4 1 2
) ( ( ))
+2 ()
4 1
− y 1=
4 ()
()
4
2
4
After simplifying we get
288y 2 −560y 1=−255 ( i)

Also for n = 2, we have


y 3 −2y 2 + y 1 y 3− y 1
(1+ x 2 ) 2
+ 2x 2 − y 2=x 22
2 h 2h
1 2 y 3−2y 2 + y 1 1 y 3− y 1 1 2

( ( ) )(
1+
2 1 2
) ( )
+2
2( )21 − y 2=
2 ()
() 4 (4 )
After simplifying

88y 3 −164y 2 +72y 1=1 ( ii )


And for n = 3, we have
y 4 −2y 3 + y 2 y4 − y2
(1+ x 2 ) 2
+2x 3 − y 3=x 23
3 h 2h
3 2 0−2y 3 + y 2 3 0− y 2 3 2

( ( ) )(
1+
4 1 2
) ( ( ))
+2()
4 1
− y3=
4 ()
() 4
2
4
Simplifying gives
784y 3 −352y 2 =−9 ( iii )

Thus we have a system of 3 equations in three unknowns y1, y2 and y3. The matrix form of these
three equations (i), (ii) and (iii), is written as:

(−560 288 0¿ ) ( 72 −164 88¿) ¿ ¿¿


¿
On solving, correct to four decimal places, we obtain

( y1 ¿)( y2 ¿ ) ¿¿¿
¿
Thus the values corresponding to y1, y2, y3 are the results of the differential equation at points x1,
x2, x3.

Self test exercise


2
1. Solve the boundary value problem, x y ''+xy'−y=2x satisfying the boundary
conditions y(0) = 1 and y(1) = 0, use a step length h = 0.25.

2. Solve the boundary value problem, y ''−4 y=−4 x satisfying the boundary conditions
y(0) = 0 and y(1) = 2, use a step length
a. h =1/2
b. h=1/4
c. h=1/8

3. Solve the boundary value problem, y ''=−3 y '+2 y +2 x+3 satisfying the boundary
conditions y(0) = 2 and y(1) = 1, use a step length h=0.2.

Finite Difference Method for non Linear Problems


For the general nonlinear boundary-value problem
y ''=f (x,y,y' ) , a≤x≤b
together with the boundary conditions
y (a)=α and y (b )= β,
The working procedure is just like The Finite Difference Method for the linear BVP. However,
the equation will not be linear, so an iterative process is required to solve it, especially Newton-
Raphson’s Method for solving nonlinear equations
Example: - Approximate the solution of the B.V.P
1 1
y ''=2 y 3 , −1≤x≤0 , y (−1)= , y (0 )=
2 3 .When
1 1 1
a ) h= b) h= c ) h=
2 3 4

Solution: -

Using the approximation for y'' the given equation can be rewritten as
,
y n+1−2y n + y n−1
2
=2y 3n (∗)
h
1 1 1
a ) See that x 0 =−1 , x 1 =− , x 2 =0 , y 0= and y 2= and we need to find
2 2 3
1
( )
y 1 = y (x 1 )= y − , that is substituting n=1 in (∗)
2
3
4 ( y 2 −2 y 1 + y 0 )=2 y 1

4 (13 −2 y +12 )=2 y


1
3
1

20
2 y31 +8 y 1 − =0
6
y 1 =0 .363038 (Using Newton−Raphson Method )
2 1 1 1
b ) See that x 0=−1, x 1 =− , x 2 =− , x3 =0 , y 0 = and y 3= and we need to find
3 3 2 3
2 1
( ) ( )
y 1 = y (x 1 )= y − and y 2 = y (x 2 )= y − that is substituting n=1 and n=2 in (∗)
3 3

9( y 2 −2 y 1 + y 0 )=2 y 31
9( y 3 −2 y 2 + y 1 )=2 y 32

9( y 2 −2 y 1 +0 .5 )=2 y 31

9 (13 −2 y + y )=2 y
2 1
3
2

9
f ( y1 , y 2 ) = 2 y 31 +18 y 1 −9 y 2 − =0
2
g( y 1 , y 2 ) = 2 y 32 +18 y 2−9 y 1 −3 =0

An initial approximation to the solution is obtained from the rough graphs of f and g as (0.3,
0.3) and after three iterations on applying Newton-Raphson’s Method for system of non linear

equations we get y 1 =0 . 42885 and y 2=0. 37522


3 1 1 1 1
c ) See that x 0=−1 , x 1 =− , x 2 =− , x 3=− , x 4 =0 , y 0 = and y 4 = and we need to
4 2 4 2 3
3 1 1
4( )
find y 1 = y ( x 1 )= y − , y 2 = y ( x 2 )= y − ( )
2 ( )
and y 3 = y − that is substituting n=1 , n=2
4
and n=3 in (∗)

16( y 2 −2 y 1 + y 0 )=2 y 31
16( y 3 −2 y 2 + y 1 )=2 y 32
16( y 4 −2 y 3 + y 2 )=2 y33

16( y 2 −2 y 1 +0 .5 )=2 y 31
16 ( y 3 −2 y 2 + y 1 ) =2 y 32
1
16 ( 3 )
−2 y 3 + y 2 =2 y 33

f ( y1 , y 2 , y 3 ) = 2 y 31 +32 y 1 −16 y 2−8 =0


g( y 1 , y 2 , y 3 ) = 2 y 32 +32 y 2 −16 y 1 −16 y 3 =0
16
h( y 1 , y 2 , y 3 )=2 y 33 +32 y 3 −16 y 2− =0
3
Taking (0.3, 0.3, 0.3) as an initial approximation and after three iterations on applying Newton-

Raphson’s Method for system of non linear equations we get y 1 =0 . 44459 ,

y 2 =0 . 40016 and y 3=0. 36374 .Compare this answer with actual solution of the given

1
y ( x )=
B.V.P x+3 .

Self test exercise


Approximate the solution of the B.V.P
1 1
y ''= y 3 − y y ' , 1≤x≤2 , y (1)= , y (2)=
2 3 .When
1 1 1
a ) h= b) h= c ) h=
2 3 4

You might also like