Chapter 7 Numerical Methods 401
x:00. 25 0. 50. 75 1
u(n=4): 1 2. 174 4. 707 7. 057 7. 567
u(n=100): 1 2. 155 4. 729 7. 125 7. 629
Table 3 Approximate solution of Eqs. (8) and (9)
equation for theith unknown. In the resulting set of equations there are “cir-
cular references”: The equation foru 2 refers tou 1 andu 3 , while the equations
for these refer tou 2 , etc. We may start with some guessed values for theu’s,
feed them through the equations to get improved values for theu’s, and repeat
the process until the values settle down. This method requires a lot of arith-
metic but no strategy, while elimination is just the reverse. It may also work
with nonlinear equations, where elimination cannot.
So far, we have given no justification for the procedure of constructing re-
placement equations. The explanation is not difficult; it depends on the fact
that certain difference quotients approximate derivatives. Ifu(x)is a function
with several derivatives, then
u(xi+ 1 )−u(xi− 1 )
2 x =u
′(xi)+( x)^2
6 u
( 3 )( ̄xi), (15)
u(xi+ 1 )− 2 u(xi)+u(xi− 1 )
( x)^2
=u′′(xi)+( x)
2
12
u(^4 )( ̄ ̄xi), (16)
where ̄xiand ̄ ̄xiare points nearxi.
Now suppose thatu(x)is the solution of the boundary value problem
d^2 u
dx^2
+k(x)du
dx
+p(x)u(x)=f(x), 0 <x< 1 , (17)
αu( 0 )−α′u′( 0 )=a,βu( 1 )+β′u′( 1 )=b. (18)
Ifu(x)has enough derivatives, then at any pointxi=i xit satisfies the dif-
ferential equation (17) and thus also satisfies the equation
u(xi+ 1 )− 2 u(xi)+u(xi− 1 )
( x)^2
+k(xi)u(xi+^1 )−u(xi−^1 )
2 x
+p(xi)u(xi)=f(xi)+δi,
(19)
where
δi=( x)
2
12
u(^4 )(x ̄ ̄i)+k(xi)( x)
2
6
u(^3 )( ̄xi).
Becauseδiis proportional to( x)^2 , it is very small when xis small.
The replacement equation for Eq. (17) is, according to Table 2,
ui+ 1 − 2 ui+ui− 1
( x)^2
+k(xi)ui+^1 −ui−^1
2 x
+p(xi)ui=f(xi). (20)