Biomedical Engineering Reference
In-Depth Information
Similarly the Taylor series expansion for the variable at point (
i
−
1) with respect
to point (
i
)is
dφ
dx
d
2
φ
dx
2
d
3
φ
dx
3
x
2
2
x
3
6
φ
i
−
1
=
φ
i
−
x
+
−
+···
(7.8)
i
i
i
and rearranging to obtain the derivative we get
dφ
dx
i
=
φ
i
−
φ
i
−
1
x
+
O
(
x
)
Truncation error
d
2
φ
dx
2
d
3
φ
dx
3
x
2
−
x
2
6
Where
O(
x
)
=
+···
(7.9)
i
i
Equation (7.9) is the
backward difference
approximation that uses information to the
left or behind of the origin and is first-order-accurate.
If we now combine the forward and backward difference equations by subtracting
Eq. (7.8) from Eq. (7.4), so that we obtain information from points in front of and
behind the origin (
i
), we get
2
dφ
dx
2
d
3
φ
dx
3
x
2
6
φ
i
+
1
−
φ
i
−
1
=
x
+
0
+
+
...
(7.10)
i
i
and rearranging to obtain the derivative we get
dφ
dx
φ
i
+
1
−
φ
i
−
1
2
x
O
(
x
2
)
Truncation error
i
=
+
d
3
φ
dx
3
x
2
3
O(
x
2
)
Where
=
+···
(7.11)
i
This equation is called
central difference,
is dependent equally on values to both
sides of the node at
x
and is
second-order-accurate
because the truncation error is
of order 2. The accuracy term is a major simplification and its validity depends on
the size of
x
, where smaller
x
generally provides increased accuracy.
For the grid points in the
y
-direction, where the nodal points vary with
j
the
difference equations are obtained in the same manner as those for the
y
-direction,
which are given as
dφ
dy
φ
j
+
1
−
φ
j
j
=
+
O
(
y
)
Truncation error
Forward difference
(7.12)
y
dφ
dy
φ
j
−
φ
j
−
1
y
j
=
+
O
(
y
)
Truncation error
Backward difference
(7.13)
dφ
dy
φ
j
+
1
−
φ
j
−
1
2
y
O
(
y
2
)
Truncation error
j
=
+
Central difference
(7.14)
Search WWH ::
Custom Search