Computational Physics - Department of Physics

(Axel Boer) #1

170 6 Linear Algebra


A=










2
h^2 +x

2
1 −
1
h^2
−h^12 h^22 +x^22 −h^12
−h^12 h^22 +x^23 −h^12

−h^12 h^22 +x^2 n− 1 −h^12
−h^12 h^22 +x^2 n










, (6.16)

which leads to the following eigenvalue problem






2
h^2 +x

2
1 −
1
h^2
−h^12 h^22 +x^22 −h^12
−h^12 h^22 +x^23 −h^12

−h^12 h^22 +x^2 n− 1 −h^12
−h^12 h^22 +x^2 n


















u 1
u 2

un









= 2 λ









u 1
u 2

un









We will solve this type of equations in chapter 7. These lecture notes contain however several
other examples of rewriting mathematical expressions intomatrix problems. In chapter 5 we
show how a set of linear integral equation when discretized can be transformed into a simple
matrix inversion problem. The specific example we study in that chapter is the rewriting
of Schrödinger’s equation for scattering problems. Other examples of linear equations will
appear in our discussion of ordinary and partial differential equations.


6.4.1 Gaussian Elimination


Any discussion on the solution of linear equations should start with Gaussian elimination. This
text is no exception. We start with the linear set of equations


Ax=w.

We assume also that the matrixAis non-singular and that the matrix elements along the
diagonal satisfyaii 6 = 0. We discuss later how to handle such cases. In the discussionwe limit
ourselves again to a matrixA∈R^4 ×^4 , resulting in a set of linear equations of the form




a 11 a 12 a 13 a 14
a 21 a 22 a 23 a 24
a 31 a 32 a 33 a 34
a 41 a 42 a 43 a 44









x 1
x 2
x 3
x 4




=





w 1
w 2
w 3
w 4




.

or


a 11 x 1 +a 12 x 2 +a 13 x 3 +a 14 x 4 =w 1
a 21 x 1 +a 22 x 2 +a 23 x 3 +a 24 x 4 =w 2
a 31 x 1 +a 32 x 2 +a 33 x 3 +a 34 x 4 =w 3
a 41 x 1 +a 42 x 2 +a 43 x 3 +a 44 x 4 =w 4.

The basic idea of Gaussian elimination is to use the first equation to eliminate the first un-
knownx 1 from the remainingn− 1 equations. Then we use the new second equation to elimi-
nate the second unknownx 2 from the remainingn− 2 equations. Withn− 1 such eliminations
we obtain a so-called upper triangular set of equations of the form

Free download pdf