|9.2 Section||2 Background .1 Cosmology .11 Math||Section 9.4|
Section 3 The Passage method
If Equation (1.3) and the boundary condition (1.4) are converted into central finite differences, one ontains the equations
The first n - 1 equations of this system may be rewritten
and then reduced to
The computations are carried out as follows:
Forward. Find mi and ki from (3.2). Compute ci and di and then, using the recurrence relations (3.5) find one after the other ci and di, i = 2, . . ., n.i
Backward. Write down (3.3) for i = n and i = n - 1 and the last equation of (3.1):
These equations have the solution
The values of yi, i = n -1, . . .,1 are now obtained from the recurrence relation (3.3), while y0 is given by
Example 1: Find by the above method an approximate solution of the B.V.P.
Solution: Set h = 0.1 and reduce the problem to the finite difference equations
A rearrangement yields
Forward: Enter xi = 0.1?i into the next table and compute mi, ki and ji. Determine from (3.4)
Enter these values into the table and compute using (3.5) all ci and di. Thus, for i = 2,
Enter the computations for i = 3, 4, . . . ,10 into the table.
Backward: By (3.7),
Enter this value in the last row of the preceding table. Then use (3.9) to compute yi , i = 9, 8, ??? , 1:
Finally, by (3.8),
The last column of the table displays the values of the exact solution
The last column of the table gives the values of the exact solution
Note. Equation (2.3) gave an estimate of the error of the method of finite differences which is of little practical use. It is standard practice to use double computation (cf. Example 2), and, starting from the Runge principle (), to obtain an approximate estimate of the error of the value of yi":
where y(xi) is the exact solution of the boundary value problem and yi, yi* are the values of the approximate solutions at x=h and h/2, respectively.
Example 2: Solve with an accuracy of 10-3 the boundary value problem
Solution: In order to obtain the approximate solution to the given accuracy, start with h = 0.05, repeat the calculation with h = 0.1 and compare the results.
In the present case
Use (3.2) and form a table of the values of
for h = 0.05. Using the fact that
find from (3.4)
and apply repeatedly (3.5) to obtain the values of ci, di, i = 2, . . . , 9.
Problem (3.11)/(3.12) for h = 0.05
The boundary condition yields y10 = y(0.5) = 1.279. Equation (3.3) yields the values of yi, i = 9, 8, . . . , 1, presented by the preceding table.
Now take the spacing h = 0.1, form a table of c1 ki, 2fih2/(2 + hpi) = ji and compute ci and di for the new spacing: For example, we find that c1 = 1/m1 = -0.510, d1 = 2f1h2/(2 + hp1) - k1) = -0.976. Enter these results in the next table and use (9.3) to compute yi, i = 4, 3, 2, 1.
Comparing corresponding results in the last and the following table, we see that their differences do not exceed 0.002
Problem (3.11)/(3.12) for h = 0.1.
so that the error of the most accurate value for h = 0.05 does not exceed 0.002/3. Hence the results of the first table yield the required solution.
Example 3: Find the solution of the boundary value problem
when the functions p(x), y(x) and f(x) are by the table
Solution: The results with h = 0.1 are given in the next table.
Computing the table:
Forward: Use (3.2) and the table of coeffcients to compute mi; ki, h2fi.Since in this case
Backward: The boundary conditons yield y0 = 0 and y4 = 0.335. The remaining values of yi are obtained from (3.3):
1. Use this method to find within 10-2 the solutions of the following differential equation for the boundary conditions
y(0) = 1, y(1) = e-1 + 1 =1.367.
2. Find approximate solutions of the boundary value problern
if the fj(x) are given by the table
3. Solve the following equations on the interval [0,1] with h = 0.1 for the boundary conditions y(0) = y(1) = 0:
where the parameters have the values