6.8 Exercises 211
00.20.40.60.810 0.2 0.4 0.6 0.8 1u(x)xNumerical solution
Analytical solutionFig. 6.4Numerical solution obtained withn= 10 compared with the analytical solution.
00.20.40.60.810 0.2 0.4 0.6 0.8 1u(x)xNumerical solution
Analytical solutionFig. 6.5Numerical solution obtained withn= 10 compared with the analytical solution.
Table 6.2log 10 values for the relative error and the step lengthhcomputed atx= 0. 5.
n log 10 (h)εi=log 10 (|(vi−ui)/ui|)
10 -1.04 -2.29
100 -2.00 -4.19
1000 -3.00 -6.18
104 -4.00 -8.18
105 -5.00 -9.19
106 -6.00 -6.08