ABSTRACT
Neumann indexboundary conditions:
− d dx
( du (x)
dx
) = 0 (1.1)
u (0) = 0 (1.2) du (1)
dx = 1 (1.3)
i
— 2015/11/6 — i
2 Direct Solver
One-Dimensional Problems
In the finite difference method, we selectN+1 points {xi}i=0,...,N = { iN }i=0,...,N , distributed over the domain [0, 1]. First, we take values of problem (1.3) at these pointsŁ
u(x0) = 0 (1.4)
− d dx
( du (xi)
dx
) = 0 i = 0, ..., N (1.5)
du(xN )
dx = 1 (1.6)
Second, we replace the first and second derivatives at (1.4-1.6) with their finite difference discreti-
zations:
u0 = 0 (1.7)
−ui+1 − 2ui + ui−1 h2
= 0 i = 1, ..., N − 1 (1.8) uN − uN−1
h = 1 (1.9)
Here ui = u (xi) = u ( i N
) , h = 1N . We cancel out the h
2 factors and organize the terms in rows to
obtain
u0 = 0 (1.10)
ui−1 − 2ui + ui+1 = 0 i = 1, ..., N − 1 (1.11) −uN−1 + uN = h (1.12)
Third, we construct a global system of linear equations
1 0 0 0 0 0 0
1 −2 1 0 0 0 0 0 ... ... ... 0 0 0
0 0 1 −2 1 0 0 0 0 0 ... ... ... 0
0 0 0 0 1 −2 1 0 0 0 0 0 −1 1
u0
u1
...