10.4 Section  2 Background .1 Cosmology .11 Math  Section 10.6 
Section 5 Parabolic Partial Differential Equations
Consider the mixed boundary value problem for the heat conduction equation, i.e., find the function u(x,t) which satisfies the equation
(5.1)
the initial condition
(5.2)
and the boundary conditions
(5.3)
In particular, in Problems 1 to 3 below, it describes the propagation of heat in a uniform bar of length s ([48], [52]). Introduction of the new variable t = a?t reduces the equation to
,
whence we set a = 1.
Construct in the halfstrip t ? 0, 0 ? x ? s two families of straight lines
Figure 17
Introduce the notation x_{i} = ih, t_{j} = jl, u(x_{i},t_{j}) = u_{ij} and replace at each internal point the derivative by the finite differences
(5.4)
and the derivative by one of the two finite differences

(5.5)
(5.6) 
Then Equation (5.1) with a = 1 is replaced by the finite difference equations
(5.7) (5.8) 
With s = l/h?, these equations become
(5.9) 
Note that, in setting up (5.7), the next two implicit diagrams, respectively, were used.
Figure 18 
Figure 19 
In the choice of s in Equations (5.9) and (5.10), the following two circumstances should be taken into consideration:
1. The error caused by replacement of the differential equation by a difference equation must be a minimum;
2. The difference equation must be stable.
It has been proved ([2], [ 13]) that (5.9) is stable for 0 ? s ? 1/2 and (5.10), for any value of s. Equation (5.9) has the most convenient form for s =1/2:
(5.11)
and for s = 1/6:
(5.12)
The errors obtained by use of (5.11), 5.12) and (5.10) in the strip 0 ? x ? s, 0 ? t ? T, respectively, are (cf. [31])
(5.13)
(5.14) (5.15) 
where u is the exact solution of Problem (5.1)  (5.3) and,
These estimates show that Equation (5.12) yields higher accuracy in comparison with Equation (5.11). However, the latter equation has a simpler form and, besides, the step length l of the argument t in Equation (5.12) must be taken to be considerably smaller, i.e., more machine time is involved. Equation (5.10) yields lower accuracy, but l and h may be chosen independently of each other. Equations (5.11)and (5.12) allow to evaluate u(x,t) for each layer by explicit formulae in terms of the values of the preceding layer, whereas Equation (5.10) (implicit diagram) does not have this property.
Finite differences can be applied to solve a mixed boundary value problem for the nonhomogeneous parabolic equation
Using the implicit diagram, the corresponding finite difference equation is
(5.16)
Hence, for s = 1/2,
and, for s = 1/6,
The corresponding error estimates ([33]) are for Equations (5.17) and (5.18)
and
respectively, where
Example l: Use (5.11) to solve the equation
(5.19)
for the conditions
(5.20)
Solution: Set h = 0.1. Since s = 1/2, one finds t = h?/2 = 0.005. Enter the initial and boundary values into the next table
Since the problem is symmetric, the table need only be completed for x = 0, 0.1, 0.2, 0.3, 0.4, and 0.5. The values of u(x,t) on the first layer are found from those on the initial layer and the boundary conditions by means of (5.11) for j =0, i.e.,
Thus,
etc.
Next, enter u_{i1}, i = 1, 2, 3, 4, 5 into the second row of the table above and compute the values on the second layer, using (5.11) for j = 1:
The values u_{ij} , t = 0.005, 0.010, 0.015, 0.020 and 0.025 are determined in the same manner. The last two rows of this table present the values of the exact solution of the problem and the modulus of the difference at t = 0.025.
For the sake of comparison let us give the error estimate obtained by formula (5.13). For the given problem Thus we get
Example 2: Use the difference equation (5.12) to find the solution of Problem (5.19) and (5.20) for Estimate the error of the solution obtained.
Solution: Let h = 0.1 with respect to the argument x. Since, by (5.12), s = 1/6, we get for the argument t spacing . Enter the initial and boundary values into the next Table 111.
Since the problem is symmetric, the table need only be filled in for 0 ? x ? = 0.5. Next, by (5.12), for the first layer
By virtue of symmetry of the solution it suffices to fill in the table for 0 ? x ? = 0.5. Then pas to compute by formula (5.12). For the first layer at j=1 we get
Table 111  Solution to problem (19) and (20) by formula (12).
whence, step by step,
etc.
By (5.14), the error estimate (5.14) at t = 0.01 with
yields
The last row of the preceding table presents the values of the exact solution
.
It shows that the error does not exceed 2?10^{6}
Find an approximate solution of the equation
for the conditions
in the range 0 ? t ? T taking the spacing h = 0.1 along x. Use in Problems 1 to 3 Equation (5.11), in Problems 4 to 6 Equation (5.12).
1.
2. 3. 
4. 5. 6. 
7. Approximate the solution of the equation
with h = 0.1 for the intial and boundary conditions of Problem 1. Make use of (5.17).
8. Approximate the solution of
with h = 0.1, satisfying the initial and boundary conditions of Problem 2. Use the difference equation (5.18).