• No results found

Motivation. Solving Linear Systems:Iterative Methods. Iterative Methods. Iterative Methods: Overview. u xx + u yy = 0. x (k) = Cx (k 1), +d

N/A
N/A
Protected

Academic year: 2021

Share "Motivation. Solving Linear Systems:Iterative Methods. Iterative Methods. Iterative Methods: Overview. u xx + u yy = 0. x (k) = Cx (k 1), +d"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Solving Linear Systems:Iterative Methods

 Motivation

 Jacobi Iteration

 Gauss Seidel Iteration

 Successive Over Relaxation

 Determinants

 Matrix Inversion

 Analysis

ITCS 4133/5133: Intro. to Numerical Methods 1 Iterative Methods

Motivation

◦ Consider the 2D potential field equation defined over a mesh of points by a partial differential equation(PDE):

uxx+ uyy= 0

given the boundary values and a mesh with∆x = ∆y = 0.25.

◦ These systems are large and verysparse, and thus more appropri-ate foriterativesolutions.

ITCS 4133/5133: Intro. to Numerical Methods 2 Iterative Methods

Iterative Methods

 Solution of linear systems using atrial and errorapproach.

 Assume a set ofunknowns, and successivelyrefinethe estimates.

 Can produce exact solution; precision dependent on number of iter-ations.

 Major Advantage: Can be used to solve non-linear equations, not possible using direct (elimination) approaches.

Iterative Methods: Overview

 To solve Ax = B, convert to x = Cx + d and generate a set of approximations,x(1), x(2), . . . , x(n), where

x(k)= Cx(k−1), +d

(2)

Jacobi Iteration

 Must start iteration withinitialestimates for theXis

 After computation ofXis,i = 1, 2, · · · , n, use the new estimates for the next iteration.

 Convergence: Successive estimates are acceptably small.

ITCS 4133/5133: Intro. to Numerical Methods 5 Iterative Methods

Jacobi Iteration

Consider a linear system:

a11X1+ a12X2+ · · · + a1nXn = C1 a21X1+ a22X2+ · · · + a2nXn = C2 ... ... ... ... an1X1+ an2X2+ · · · + annXn = Cn Solve for each unknown,Xi

X1 = C1− a12X2− a13X3a11 − · · · − a1nXn X2 = C2− a21X1− a23X3a22 − · · · − a2nXn

... ...

Xn = Cn− an1X1− an2X3ann− · · · − an−1,nXn=1

ITCS 4133/5133: Intro. to Numerical Methods 6 Iterative Methods

Jacobi Iteration: Example

◦ Note:New values of variables are not used until a new iteraction is begun.

(3)

Jacobi Iteration: Application

Finite Difference Solution to a PDE

ITCS 4133/5133: Intro. to Numerical Methods 9 Iterative Methods

Jacobi Iteration: Application

Finite Difference Solution to a PDE

ITCS 4133/5133: Intro. to Numerical Methods 10 Iterative Methods

Gauss-Seidel Iteration

 Modification of the Jacobi iteration

 Use themost recent estimatesofXis, instead of waiting for compu-tation of allXis.

 Results in faster convergence

Gauss-Seidel Iteration: Example

2x + y = 6, x = −1

2y + 3 x + 2y = 6, y = −1

2x + 3 Iterations proceed as follows (assumex(1)= y(1) = 1/2

x(2)= −1

2y(1)+ 3 = 11/4, y(2)= − 1

(4)

Gauss-Seidel Method: Algorithm

ITCS 4133/5133: Intro. to Numerical Methods 13 Iterative Methods

Gauss-Seidel Method: Example

ITCS 4133/5133: Intro. to Numerical Methods 14 Iterative Methods

Successive Over Relaxation(SOR)

 Goal: To further accelerate Gauss-Seidel iterations using an addi-tional parameter,ω.

 Use a weighted combination of the previous and current updates of x.

 0 < ω < 1(successive underrelaxation),1 < ω < 2(SOR),ω = 1is Gauss-Seidel.

Successive Over Relaxation(SOR)

Consider

a11a21 a12a22 a13a23 = b1= b2 a31 a32 a33 = b3   SOR Equations are

x(new)1 = (1 − ω)x(old)1 +a11ω (b1− a12x(old)2 − a13x(old)3 ) x(new)

2 = (1 − ω)x(old)2 +a22ω (b2− a21x(new)1 − a23x(old)3 ) x(new)

(5)

Successive Over Relaxation(SOR):Algorithm

ITCS 4133/5133: Intro. to Numerical Methods 17 Iterative Methods

Successive Over Relaxation(SOR):Example

ITCS 4133/5133: Intro. to Numerical Methods 18 Iterative Methods

Iterative Methods: Analysis

Consider a matrix A decomposed intoE andF,

A = E + F (E + F)x = b Ex = −Fx + b x = −E−1Fx + E−1b Or, iteratively, x(k+1) = −E−1Fx(k)+ E−1b

Analysis: Jacobi Iteration

In Jacobi’s iteration, the diagonal terms are isolated

(6)

Analysis: Error

Error term across successive iterations as

e(k+1) = −E−1F e(k) For convergence,

lim k→∞e

(k)= 0

 Ife(k)− e(k+1)is positive, the solution is converging

 Use thenormofeto determine its magnitude (2-norm,∞norm)

ITCS 4133/5133: Intro. to Numerical Methods 21 Iterative Methods

Jacobi Iteration: Convergence

 Sufficient Condition: MatrixAbe strictly diagonally dominant.

 Necessary and Sufficient Condition: Magnitude of largest eigen value of iteration matrixCbe larger than 1.

 Order of equations in Jacobi iteration matters!

ITCS 4133/5133: Intro. to Numerical Methods 22 Iterative Methods

Jacobi Iteration: Computational Complexity

 Each iteration involves one matrix-vector multiplication,(n−1)2 mul-tiplies

 Total computation can be significantly less thanO(n3), required of GE.

 Particularly appropriate forparallelcomputation.

Gauss Seidel Iteration: Analysis

Acan be decomposed as follows:

A = L + D + U For Gauss-Seidel iteration,

Ax = b

(D + L)x = −Ux + b

(7)

Gauss Seidel Iteration: Convergence

 Form of the matrix and eigen values determine convergence,but not convenient for analysis.

 Frequently, matrix is real, symmetric with positive diagonal elements (PDE systems solutions) – convergence guaranteed if eigen values are real and positive.

 if A is positive definite, convergence is guaranteed for any initial vector,x(0).

 When iteration matrix is non-negative, Jacobi and Gauss-Seidel ei-ther converge or diverge; Faster convergence using Gauss-Seidel.

 Computational Effort: Roughly half the number of iterations of Ja-cobi.

ITCS 4133/5133: Intro. to Numerical Methods 25 Iterative Methods

Successive Overrelaxation: Analysis

Similar to Gauss-Seidel, multiply by relaxation parameter,ω

ω(D + L)x = −ωUx + ωb Multiply both sides by(1 − ω)Dx,

(D − ωL)x = ((1 − ω)D − ωU)x + ωb

x = (D − ωL)−1((1 − ω)D − ωU)x + ω(D − ωL)−1b

⇒ SOR iteration matrixC = (D − ωL)−1((1 − ω)D − ωU).

ITCS 4133/5133: Intro. to Numerical Methods 26 Iterative Methods

Successive Overrelaxation: Analysis

 SOR iteration matrixC = (D − ωL)−1((1 − ω)D − ωU).

 Can be shown that|C| = (1 − ω)n

 Determinant ofCis product of its eigen values.

 Outside of the interval0 ≤ ω ≤ 2, at least one eigen value is greater than 1.

 Chooseωto be between 0 and 2.

 SOR method is designed to reduce the residual, r = b − Ax(k) more rapidly than Gauss-Seidel method.

Successive Overrelaxation: Positive Definite

Matrices

 SOR method is guaranteed to converge for anypositive definite ma-trix.

 Positive Definite Matrix: Following apply:

⇒ xTAx > 0

⇒ All eigen values are positive

(8)

Method of Determinants

Consider the linear system

   

a11 a12 · · · a1n a21 a22 · · · a2n ... ... ... ... an1 an2 · · · ann

        X1 X2 ... Xn     =     C1 C2 ... Cn     We can use Cramer’s rule to determine theXis, as

Xi= |Ai||A|

where|A|is thedeterminantofAand |Ai|is the determinant of matrix A, whoseith column is replaced by theCvector.

ITCS 4133/5133: Intro. to Numerical Methods 29 Iterative Methods

Method of Determinants

For example, X3=

a11 a12 C1 · · · a1n a21 a22 C2 · · · a2n ... ... ... ... ... an1 an2 Cn · · · ann

a11 a12 a13 · · · a1n a21 a22 a23 · · · a2n ... ... ... ... ... an1 an2 an3 · · · ann

References

Related documents

We have constructed the new efficient integral mean value method (IMVM) for solving linear and nonlinear Fredholm integral of the second kind and the systems included such equations

He broadened his macro economic, policy and public sector experience with knowledge of the private sector and advised senior management on strategic management, business

The results presented in this paper indicate that the proposed approach effectively clusters relations between concepts and features, and structures domain knowledge at several

I use longitudinal data on family structure and consumption expenditures on food and housing from the Panel Study of Income Dynamics (PSID), matched to information on the

Aggregate methylation profiles for predicted TFBS with conserved consensus motifs for a subset of 17 transcription factor families are hyper-methylated in hearts (A) and sperm (B) (N

A pilot study, comprising of a four hour observation period in the clinical setting, was used to test feasibility, to identify any ambiguities and misunderstandings associated

We also derive some integral inequalities of Hermite-Hadamard type via general preinvex functions.. Some special cases are

Toluene-3, 4-dithiolatoarsenic (III) derivatives with oxygen and sulphur donor ligands such as acetic acid and thioacetic acid have 23 atoms in each as a result of it 63 fundamental