Unit V
Unit V
Unit V
+
= . If h is small, we approximate
( ) ( ) dy y x h y x
dx h
+
.
In the case of partial derivatives, the derivatives are approximated as follows:
( , ) ( , )
( , ) ( , )
x
y
u x h y u x y
u
h
u x y k u x y
u
k
+
=
`
+
=
)
Forward difference approximation
( , ) ( , )
( , ) ( , )
x
y
u x y u x h y
u
h
u x y u x y k
u
k
=
`
=
)
Backward difference approximation
2
2
( , ) 2 ( , ) ( , )
( , ) 2 ( , ) ( , )
xx
yy
u x h y u x y u x h y
u
h
u x y k u x y u x y k
u
k
+ +
=
+ +
=
Geometrical Representation
Divide the xy plane into series of rectangles whose sides are parallel to x & y axes such that
and x h y k A = A = . The points of intersection of these straight lines are known as mesh points or grid
points or lattice points. Denote the mesh points by subscripts as shown in the figure.
2
Unit V Boundary Value Problems in Ordinary and Partial Differential Equations
Prepared by Dr. K.A. Selvakumaran
(i, j+1)
(i-1, j) (i, j) (i+1, j)
(i, j-1)
Then
1, ,
, 1 ,
i j i j
x
i j i j
y
u u
u
h
u u
u
k
+
+
=
=
)
Forward difference approximation
, 1,
, , 1
i j i j
x
i j i j
y
u u
u
h
u u
u
k
=
)
Backward difference approximation
1, , 1,
2
2
i j i j i j
xx
u u u
u
h
+
+
= ;
, 1 , , 1
2
2
i j i j i j
yy
u u u
u
k
+
+
=
We can also write,
1, 1,
2
i j i j
x
u u
u
h
+
= ;
, 1 , 1
2
i j i j
y
u u
u
k
+
=
Solution Second Order Ordinary Differential Equation by Finite Difference Method
Suppose the given differential equation is '' ' y Ay By C + + = with the boundary conditions
0
( ) , ( )
n
y x a y x b = = , where A, B and C are functions of x.
In this method we replace the derivatives ' and '' y y by their finite difference approximations
given below.
1 1 1 1
2
2
'( ) and ''( )
2
i i i i i
y y y y y
y x y x
h h
+ +
+
= = , 1, 2, , 1 i n =
Then the given differential equation is reduced to a system of linear algebraic equations. By
solving this system of equations we get the desired y value.
3
Unit V Boundary Value Problems in Ordinary and Partial Differential Equations
Prepared by Dr. K.A. Selvakumaran
Exercise: 1
1. Using finite difference method, solve for y given the differential equation
2
2
1 0, (0, 1)
d y
y x
dx
+ + = e and the boundary conditions (0) (1) 0 y y = = , taking
1
2
h = .
Ans: 0.1429
2. Using finite difference method, solve
2
2
d y
y
dx
= in (0, 2) given (0) 0, (2) 3.63 y y = = , subdividing
the range of x into 4 equal parts.
Ans: 0.5268, 1.1853, 2.1401
3. Using finite difference method, solve '' 64 10 0, (0, 1) y y x + = e given (0) (1) 0 y y = = ,
subdividing the interval into 4 equal parts.
Ans: 0.1287, 0.1471, 0.1287
4. Using finite differences solve
1
'' 0 given (1) 1, (2) 2,
4
xy y y y h + = = = = .
Ans: 1.3513, 1.635, 1.8505
Problems for Practice:
5. Solve '' 0 y xy = given (0) 1, (1) 2 y y = = by finite difference method taking 2. n =
Ans: 0.4706
6. Solve '' , (0, 1) y y x x = e given (0) (1) 0 y y = = , using finite differences dividing the interval into
4 equal parts.
Ans: 0.03488, 0.05632, 0.05002
7. Using finite differences solve '' ' 2 0 given (0) 2, (1) 2.85 y y y y y + = = = .
Ans: (0.5) 0.5565 y =
Classification of Partial Differential Equations of the Second Order
The general form of linear partial differential equation of second order is
2 2 2
2 2
0
u u u u u
A B C D E Fu
x x y y x y
c c c c c
+ + + + + =
c c c c c c
, where A, B, C, D, E and F are functions of x & y.
The above equation is said to be
i) elliptic if
2
4 0 B AC <
ii) parabolic if
2
4 0 B AC =
iii) hyperbolic if
2
4 0 B AC > .
Examples:
1. Elliptic: i)
2 2
2 2
0
u u
x y
c c
+ =
c c
Laplace equation
ii)
2 2
2 2
( , )
u u
f x y
x y
c c
+ =
c c
Poisson equation
4
Unit V Boundary Value Problems in Ordinary and Partial Differential Equations
Prepared by Dr. K.A. Selvakumaran
2. Parabolic:
2
2 2
1 u u
x t o
c c
=
c c
One dimensional heat equation
3. Hyperbolic:
2 2
2 2 2
1 u u
x t o
c c
=
c c
One dimensional wave equation
Exercise: 2
Classify the following partial differential equations.
1. 3 4 3 0
xx xy yy y
u u u u + + = .
2.
2 2 2
( ) 0, ,
xx yy
x u a y u x a y a + = < < < < .
3. 6 9 17 0
xx xy yy y
u u u u + = .
4.
2 2
(1 ) 0
xx yy
x f y f + = .
5.
2 2
4 ( 4 ) sin( )
xx xy yy
u u x y u x y + + + = + .
6. ( 1) 2( 2) ( 3) 0
xx xy yy
x u x u x u + + + + = .
7. 0, 0, 0
xx yy
x f y f x y + = > > .
Solution of One Dimensional Heat Equation
The one dimensional heat equation
2
2 2
1 u u
x t o
c c
=
c c
,
2
k
c
o
s s