
According to (3.2) and (3.3), we decompose our problem into the following problems,
and
Again we use the same Green's function (1.1.12)
to find the exact solution for the problem (1.3.1).
However, we have a jumped discontinuous forcing function in this example,
we need to divide it into two interval of x when finding the exact
solution, that is
if
, then
On the other hand, if
, then
Therefore, the exact solution for the problem (1.3.1) is
Again, using the same notations as (1.1.13) and (1.1.14), we can obtain the same approximation for the differential operator as (1.1.15), but the forcing function is jumped discontinuous at the nodal point x = 1/2. However, we need to assign a suitable function value for the nodal point x = 1/2 in order to construct the difference equation for this problem. In this report, we have tried two different possibilities. The numerical solutions from these two possibilities will be compared with the convergence and the rate of convergence of the numerical solutions. In the first possibility, we assign the function value at the nodal point x = 1/2 to be 1. Therefore, the difference equation of the problem (1.3.1) should be
So that we can form a matrix equation to find the nodes
, that is
where A is an order (n-1) square matrix, u and
b
are
column matrices, such that
TABLE 3.1
|
|
|
|
|
|
| h=1/4 |
|
|
|
|
| h=1/8 |
|
|
|
|
| h=1/16 |
|
|
|
|
| h=1/32 |
|
|
|
|
| h=1/64 |
|
|
|
|
| h=1/128 |
|
|
||
| h=1/256 |
|
TABLE 3.2
|
r(1)
|
|
|
|
|
|
r(2)
|
|
|
|
|
|
r(3)
|
|
|
|
|
|
r(4)
|
|
|
|
|
|
r(5)
|
|
|
||
|
r(6)
|
|
Table 3.1 and Table 3.2
show the numerical solutions error and the ratio of two consecutive errors
at nodal point x = 1/2 respectively. We see that the numerical solutions
are convergent but the numerical solution error is relatively large, though
the step size is h = 1/256, the error is still
. Obviously, the rate of convergence is slower than the problems (1.1.1)
and (1.2.1). From Table 3.2,
we obtain the asymptotic error expansion at this point is
The extrapolating technique at this nodal point is still effective,
we get a numerical solution with error
through extrapolating from the three solutions corresponding to h
= 1/4, 1/8 and 1/16. This error is less than the numerical solution error
corresponding to h = 1/256. We also investigate the numerical solution
error at other nodal point, say x = 0.25, we see that the rate of
convergence of the numerical solution is also slow or even slower than
the solution at x = 0.5 [See Appendix C.3a-C.3d].
From the numerical results, we may suggest the asymptotic error expansion
to be
At the nodal point x = 3/4, we have a similar result as at the nodal point x = 1/4. If it assumes that we also have the same asymptotic error expansion as (1.3.9), the extrapolated solutions are also convergent and agree with the expansion even though the second column of data do not. On the other hand, if we assigned the function value at the nodal point x = 1/2 to be -1, we will obtain the same expansion as the above situation at x = 1/2,. But the characteristic of the nodal point x = 1/4 and x = 3/4 are vice versa.
In the second situation, we assign the function value at the nodal point x = 1/2 to be 0. The change in the matrix equation (1.3.6) is only the (n/2)th entry of the column vector b which should be changed to 0. That is
At the nodal point x = 1/4, we have the following numerical results.
TABLE 3.3
|
|
|
|
|
|
| h=1/4 |
|
|
|
|
| h=1/8 |
|
|
|
|
| h=1/16 |
|
|
|
|
| h=1/32 |
|
|
|
|
| h=1/64 |
|
|
|
|
| h=1/128 |
|
|
||
| h=1/256 |
|
TABLE 3.4
|
r(1)
|
|
|
|
|
|
r(2)
|
|
|
|
|
|
r(3)
|
|
|
|
|
|
r(4)
|
|
|
||
|
r(5)
|
|
|
||
|
r(6)
|
|
Table 3.3 shows the rate of convergence
of the numerical solutions at nodal point x = 1/4 is larger than
that in the first situation. From the Table 3.4, we obtain the same asymptotic
error expansion as (1.1.19). And we also
have a good extrapolating result, with h = 1/256, the finite difference
solution gives the error (
) which is larger than the error (
) of the extrapolated solution obtained from the three solutions corresponding
to h = 1/4, 1/8 and 1/16. And the solution error at the nodal point
x
= 1/2 is very small [See Appendix C.3e-C.3h].
Though we cannot find an asymptotic error expansion at this point, the
result is good enough.