
Section 6.3 Reconstruction of the time-dependent right-hand side 195
with given right-hand side g
n
i
and given boundary conditions (6.99). We seek the
solution of system (6.99), (6.103) in the form
w
n+1
i
= y
i
+ w
n+1
k
z
i
, i = 0, 1,...,N. (6.104)
Substitution of (6.104) into (6.103) allows us to formulate the following difference
problems for the auxiliary functions y
i
and z
i
:
y
i
τ
− (ay
¯x
)
x,i
= g
n
i
, i = 1, 2,...,N − 1, (6.105)
y
0
= 0, y
N
= 0, (6.106)
z
i
τ
− (az
¯x
)
x,i
+
1
ψ
k
(aψ
¯x
)
x,i
= 0, i = 1, 2,...,N − 1, (6.107)
z
0
= 0, z
N
= 0. (6.108)
Afterwards, with (6.104) we can find w
n+1
k
:
w
n+1
k
=
y
k
1 − z
k
. (6.109)
Correctness of the algorithm is guaranteed by the fact that the denominator in
(6.109) is never zero. For the difference problem (6.107), (6.108) the following a priori
estimate can be established based on the maximum principle for difference schemes:
max
0≤i≤N
|z
i
|≤τ max
0<i<N
1
ψ
k
(aψ
¯x
)
x,i
.
As a result, for a sufficiently small τ = O(1) we have: |z
i
| < 1, i. e., the time step size
must be sufficiently small.
The difference problems (6.105), (6.106) and (6.107), (6.108) are standard prob-
lems, their numerical solution presenting no difficulties. In the one-dimensional case
under consideration, the usual three-point sweep algorithm can be employed.
In fact, the computational difficulty of the used computational algorithm is equiva-
lent to double solution of the direct problem. For this reason, the considered method
can be classified to optimal methods. Below, we give the text of a program that nu-
merically solves the inverse problem of interest.
Program PROBLEM7
C
C PROBLEM7 - RIGHT-HAND SIDE IDENTIFICATION
C ONE-DIMENSIONAL NON-STATIONARY PROBLEM
C UNKNOWN TIME DEPENDENCE
C
IMPLICIT REAL
*
8 ( A-H, O-Z )
C
PARAMETER ( DELTA = 0.0005D0, N = 101, M = 101 )