Information Technology Reference
In-Depth Information
Setting f i :=
f(x i ) , we obtain as h
0,
f i + 1
f i
f (x i )
x f) i + O
=
+ O
(h)
=:
(h),
h
where x f) i is called the one-sided difference quotient of f with respect to x at
x i . The difference quotient is said to be accurate of first order since the remainder
term is
0. Analogous expressions hold for the time derivative t .
Higher order finite differences allow obtaining approximations of order
O
(h) as h
(h p )
O
with p
2 rather than just
O
(h) . If the function to be approximated has sufficient
regularity ,wehave
f i + 1
f i 1
f (x i )
(h 2 )
(h 2 ),
C 3 (G),
=
+ O
=:
x f) i + O
for f
2 h
f i + 1
2 f i +
f i 1
f (x i )
(h 2 )
xx f) i + O
(h 2 ),
C 4 (G).
=
+ O
=:
for f
h 2
With the difference quotients we turn next to the finite difference discretization of
the heat equation ( 2.4 ). Let u i
denote the approximate value of the solution u at
grid point (t m ,x i ) ,i.e. u i
u(t m ,x i ) . For a parameter θ
∈[
0 , 1
]
, we approximate
the partial differential operator t u
xx u at the grid point (t m ,x i ) by the finite
difference operator
( 1
u m + 1
i
u i
m
i
θ)(δ xx u) i
+ θ(δ xx u) m + 1
E
:=
i
k
,
(2.7)
and replace the partial differential equation ( 2.4 )bythe finite difference equations
( 1
u m + 1
i
θ) u i + 1
2 u i
u i 1
θ u m + 1
2 u m + 1
i
u m + 1
i
u i
k
+
+
i +
1
1
=
+
h 2
h 2
θf m + 1
i
m
i
θ)f i
E
=
+
( 1
,i
=
1 ,...,N,
m
=
0 ,...,M
1 ,
(2.8)
with initial conditions u i
1 ,...,N , and boundary conditions u k
=
u 0 (x i ) , i
=
=
0,
0, u m + 1
i
k ∈{
0 ,N +
1
}
, m =
0 ,...,M . We observe that for θ =
, i =
1 ,...,N ,are
m
i
= f i
explicitly in terms of u i
given in
E
, i.e. the scheme ( 2.8 ) is explicit. For
1, a linear system of equations must be solved for u m + 1
i
θ
=
at each time step, i.e.
the scheme is implicit .
We write ( 2.8 ) in matrix form. To this end, we introduce the column vectors
u m
(u 1 ,...,u N ) , f m
(f 1
,...,f N ) ,
(u 0 (x 1 ),...,u 0 (x N )) ,
=
=
0 =
Search WWH ::




Custom Search