Professional Documents
Culture Documents
Finite Difference Method For Boundary Value Problems PDF
Finite Difference Method For Boundary Value Problems PDF
Finite
Difference
Method
for
Boundary
Value
Problems
Methods
involving
difference
quotient
approximations
for
derivatives
can
be
used
for
solving
certain
second-‐order
boundary
value
problems.
Consider
the
linear
equation
!x!(t ) = p(t ) x!(t ) + q(t ) x(t ) + r (t )
(1)
Over
[a, b] with x(a) = α and x(b)
=
β.
Form
a
partition
of
[a, b] using
the
points
a = t0 < t1
< … <tN = b,
where
h = (b - a) / N
and
tj = a + jh
for
j
=
0,
1,
…,
N.
The
central-‐difference
formulas
are
used
to
approximate
the
derivatives
x t − x t j −1
x! (t ) = j +1
( ) ( ) ( )
+ O h 2
(2)
2h
and
x t j +1 − 2 x t j + x t j −1 ( ) ( ) ( )
!x!(t ) = 2
( )
+ O h 2
(3)
h
To
start
the
derivation,
we
replace
each
term
x(tj) on
the
right
side
of
Eqs.
(2)
and
(3)
with
xj
and
the
resulting
equations
are
substituted
into
Eq.
(1)
to
obtain
the
relation
x j +1 − 2 x j + x j −1 ⎛ x j +1 − x j −1 ⎞
2
+ O h 2 = p t j ⎜⎜
2h
( ) ( )
+ O h 2 ⎟⎟ + q t j x j + r t j
(4)
( ) ( ) ( )
h ⎝ ⎠
2
Next,
we
drop
the
two
terms
O h
in
Eq.
(4)
and
introduce
the
notation
p j = p t j ,
( ) ( )
q j = q(t j ),
and
r j = r (t j );
this
produces
the
difference
equation
⎛ x j +1 − x j −1 ⎞ x j +1 − 2 x j + x j −1
= p j ⎜⎜ ⎟⎟ + q j x j + r j
(5)
2
h ⎝ 2h ⎠
Which
is
used
to
compute
numerical
approximations
to
the
differential
equation
Eq.
(1).
This
is
carried
out
by
multiplying
each
side
of
Eq.
(5)
by
h2
and
then
collecting
terms
involving
x j −1 ,
x j ,
and
x j +1
and
arranging
them
in
a
system
of
linear
equations:
⎛ − h ⎞ ⎛ h ⎞
⎜ ( )
p j − 1⎟ x j −1 + 2 + h 2 q j x j + ⎜ p j − 1⎟ x j +1 = −h 2 r j
(6)
⎝ 2 ⎠ ⎝ 2 ⎠
for
j
=
1,
2,
…,
N-1,
x0 = α and xN
=
β.
The
system
in
Eq.
(6)
has
the
following
tridiagonal
form,
which
is
more
visible
when
displayed
with
matrix
notation:
⎡ 2 + h 2 q1 h
p −1
2 1
⎤ ⎧ x1 ⎫
⎢ h 2 ⎥ ⎪ ⎪
⎥ ⎪ x 2 ⎪
h
⎢− 2 p 2 − 1 2 + h q 2 2
p2 − 1 O
⎢ " ⎥ ⎪ ! ⎪
⎢ ⎥ ⎪ ⎪
p j −1 2 + h2q j ⎥ ⎨ x j ⎬
h h
⎢ − 2 2
p j −1
⎢ " ⎥ ⎪ ! ⎪
⎢ ⎥ ⎪ ⎪
⎢ O − h2 p N − 2 − 1 2 + h 2 q N − 2 h2 p N − 2 − 1 ⎥ ⎪ x N − 2 ⎪
⎢ ⎥ ⎪ ⎪
⎣ − h2 p N −1 − 1 2 + h 2 q N −1 ⎦ ⎩ x N −1 ⎭