Computational Physics - Department of Physics
6.4 Linear Systems 169 We subdivide our intervalx∈(a,b)intonsubintervals by settingxi=a+ih, withi= 0 , 1 ,...,n+ 1. The step siz ...
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 ...
6.4 Linear Systems 171 b 11 x 1 +b 12 x 2 +b 13 x 3 +b 14 x 4 =y 1 b 22 x 2 +b 23 x 3 +b 24 x 4 =y 2 b 33 x 3 +b 34 x 4 =y 3 b 4 ...
172 6 Linear Algebra withm= 1 ,...,n− 1 and a right-hand side given by w(jm+^1 )=w(jm)− a(jmm)w(mm) a(mmm) j=m+ 1 ,...,n. This s ...
6.4 Linear Systems 173 1 6 3 4 0 198 10−^819 0 51 −91 9 0 76 7 541 x 1 x 3 x 2 x 4 = y 1 y 2 y ...
174 6 Linear Algebra LU decomposition forms the backbone of other algorithms in linear algebra, such as the solution of linear e ...
6.4 Linear Systems 175 ui j=ai j− i− 1 ∑ k= 1 likuk j. Then calculate the diagonal elementuj j uj j=aj j− j− 1 ∑ k= 1 ljkuk j. ...
176 6 Linear Algebra If we multiply the matricesLUwe have ( 1 0 10201 )( 10 −^201 0 − 1020 ) = ( 10 −^201 1 0 ) 6 =A. We do not ...
6.4 Linear Systems 177 whereLTis the upper matrix, implying that LTi j=Lji. The algorithm for the Cholesky decomposition is a sp ...
178 6 Linear Algebra and since the determinat ofLis equal to 1 (by construction since the diagonals ofLequal 1) we can use the i ...
6.4 Linear Systems 179 det{A}=∑ p (− 1 )pa 1 p 1 ·a 2 p 2 ···an pn, where the sum runs over all permutationspof the indices 1 , ...
180 6 Linear Algebra Check whether the determinant is zero or not. Then solve column by column the sets of linear equations. T ...
6.4 Linear Systems 181 include"lib.h" using namespacestd; /function declarations/ voidinverse(double*,int); / This program sets ...
182 6 Linear Algebra DOj=1,n CALLlu_linear_equation(a,n,indx,y(:,j)) ENDDO ! The original matrix a was destroyed, now we equate ...
6.4 Linear Systems 183 wheremis the reduced mass of the interacting particles. Furthemore, the interaction between the particles ...
184 6 Linear Algebra and uN+ 1 =−^2 π N ∑ j= 1 k^20 ωj (k^20 −k^2 j)/m . (6.31) The first task is then to set up the matrixAfor ...
6.4 Linear Systems 185 f(xi)≈a 0 +a 1 xi+a 2 x^2 i+···+anxni. We can then obtain the unknown coefficients by rewriting our probl ...
186 6 Linear Algebra wherea,b,care one-dimensional arrays of length1 :n. In the example of Eq. (6.15) the arrays aandcare equal, ...
6.5 Spline Interpolation 187 fulfills the condition of a weak dominance of the diagonal, with|b 1 |>|c 1 |,|bn|>|an|and |b ...
188 6 Linear Algebra s(x) = s 0 (x) =a 0 x+b 0 x∈[x 0 ,x 1 ) s 1 (x) =a 1 x+b 1 x∈[x 1 ,x 2 ) ... ... sn− 1 (x) =an− 1 ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf