II. FINITE DIFFERENCE METHOD 1 Difference formulae
II. FINITE DIFFERENCE METHOD 1 Difference formulae
II. FINITE DIFFERENCE METHOD 1 Difference formulae
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
h = 1/(n + 1) and i = 0, 1, ..., n + 1. Let us denote by ¯yi the values of<br />
the approximated solution in the points xi. By discretizing y ′′ by means f<br />
central differences, the following nonlinear system is got:<br />
¯y◦ = 0, ¯yn+1 = 0<br />
¡ ¯yi+1−2¯yi+¯yi−1<br />
h 2<br />
+ 1<br />
2 (1 + xi + ¯yi) 3 = 0, (1 · i · n)<br />
Eliminating the variables ¯y◦, ¯yn+1, the system can be written in the following<br />
matrix form<br />
with ¯y = (¯y1, ..., ¯yn) T and<br />
A =<br />
⎛<br />
⎜<br />
⎝<br />
2 ¡1<br />
¡1 2 ¡1<br />
.<br />
.<br />
. . .<br />
¡1 2 ¡1<br />
¡1 2<br />
A¯y + h 2 B(¯y) = 0 (11)<br />
⎞<br />
⎟<br />
⎠<br />
, B(¯y) = diag(f(xi, ¯yi)), i = 1, 2, ..., n<br />
The nonlinear system (11) can be solved, for example, by Newton’s method.<br />
Indeed, the Jacobian matrix of the system is given by<br />
J = A + h 2 By<br />
(12)<br />
By virtue of the property fy ¸ 0, such a Jacobian turns out to be a matrix<br />
with diagonal predominance and positive definite. Therefore the Newton’s<br />
method is convergent if the initial values are chosen sufficiently near the<br />
solution. The implementation of Newton’s method is the following. A<br />
plausible initial point ¯y (◦) is chosen, the (r+1)¡th iterated vector is obtained<br />
by solving the linear system<br />
<br />
A + h 2 <br />
By<br />
and setting<br />
v = ¡A¯y (r) ¡ h 2 B(¯y (r) )<br />
¯y (r+1) = ¯y (r) + v.<br />
As it is easily verified, the exact solution of the continuous problem is y(x) =<br />
¡ x ¡ 1.<br />
2<br />
2−x<br />
By a program of the following type we obtain y (1) from an initial vector,<br />
y (◦) = 0. By the same program we obtain y (2) from y (1) = 0... and so on:<br />
16