Mathematical Physics - Volume II - Numerical Methods

1.1 Finite difference method

25

y

y

N

y

N -1

n

n

y

(x , ) y M+1 2

-1 ( , ) x y 2

2

y

1

x 2

x 1

x 3

x M

x M -1

x

( , ) x y 2 -1

Figure 1.1: Finite difference mesh.

If we now assume that n = N = 2 and g = 0, we can solve the system of linear algebraic equations AU = B , which includes equations (1.63)-(1.70) and is given below:

     4 − 2 0 − 2 0 0 0 0 0 − 1 4 − 1 0 − 2 0 0 0 0 0 − 2 4 0 0 − 2 0 0 0 − 1 0 0 4 − 2 0 − 1 0 0 0 − 1 0 − 1 4 − 1 0 − 1 0 0 0 − 1 0 − 2 4 0 0 − 1 0 0 0 − 2 0 0 4 − 2 0 0 0 0 0 − 2 0 − 1 4 − 1 0 0 0 0 0 − 2 0 − 2 4

    

     U 1 U 2 U 3 U 4 U 5 U 6 U 7 U 8 U 9

    

     f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 f 9

    

= − h 2

(1.71)

Since the sum of matrix terms in each row is 0, the unit vector column C = [ 1 , 1 , . . . , 1 ] T satisfies the condition that AC = 0 . Thus, the equation AU = 0 has a solution different from zero, which implies that A is singular. Hence, Neumann problem might not have a solution, but could also have an infinite amount of them, in the form of U = U ∗ + α C . By dividing the I, III, VII and IX rows of matrices A and B by 2, and multiplying row V by 2, we obtain a new system of linear algebraic equations, A ′ U = B ′ : as follows:

     2 − 1 0 − 1 0 0 0 0 0 − 1 4 − 1 0 − 2 0 0 0 0 0 − 1 2 0 0 − 1 0 0 0 − 1 0 0 4 − 2 0 − 1 0 0 0 − 2 0 − 2 8 − 2 0 − 2 0 0 0 − 1 0 − 2 4 0 0 − 1 0 0 0 − 1 0 0 2 − 1 0 0 0 0 0 − 2 0 − 1 4 − 1 0 0 0 0 0 − 1 0 − 1 2

    

     U 1 U 2 U 3 U 4 U 5 U 6 U 7 U 8 U 9

    

    

     .

f 1 / 2 f 2 f 3 f 4 2 f 5 f 6 f 7 f 8 f 9 / 2

= − h 2

(1.72)

T and A ′ C

Since for this system of linear algebraic equations we have that A ′ = A ′

= 0, if the

Made with FlippingBook flipbook maker