
1362 LINEAR PARTIAL DIFFERENTIAL EQUATIONS WITH MATHEMATICA
where f
1
(x) = 0, f
2
(x) = sin(4πx), L = 0.5, and c = 1/(4π). By app lying the explicit central finite
difference method, we c onstruct the approximate numeric al solution of the initial-boundary value
problem.
In the explicit central difference method, each second derivative is replaced by a central differ-
ence approximation. The FD scheme for the linear wave equ a tion is
U
i, j+1
= 2(1 −r )U
i, j
+ r(U
i+1, j
+U
i−1, j
) −U
i, j−1
,
where r = (ck/h)
2
. In this FD scheme, we have one unknown value U
i, j+1
that depends explicitly
on th e four known values U
i, j
, U
i+1, j
, U
i−1, j
, U
i, j−1
at the previous ...