0% found this document useful (0 votes)
51 views2 pages

1 Iterative Methods For Linear Systems 2 Eigenvalues and Eigenvectors

1. The document discusses iterative methods for solving linear systems and computing eigenvalues and eigenvectors of matrices. It describes methods such as Jacobi, Gauss-Seidel, SOR, and the power method. 2. It also covers QR factorization using Householder reflections and orthogonal polynomials for approximating functions, including Legendre and Gram polynomials. 3. Methods for solving ordinary differential equations numerically are presented, including the Euler, implicit Euler, Heun, and Runge-Kutta methods.

Uploaded by

bohboh1212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views2 pages

1 Iterative Methods For Linear Systems 2 Eigenvalues and Eigenvectors

1. The document discusses iterative methods for solving linear systems and computing eigenvalues and eigenvectors of matrices. It describes methods such as Jacobi, Gauss-Seidel, SOR, and the power method. 2. It also covers QR factorization using Householder reflections and orthogonal polynomials for approximating functions, including Legendre and Gram polynomials. 3. Methods for solving ordinary differential equations numerically are presented, including the Euler, implicit Euler, Heun, and Runge-Kutta methods.

Uploaded by

bohboh1212
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1

Iterative methods for linear systems

Consider the linear system Ax = b, with det A = 0. We use the splitting A = L + D + U , where
D is diagonal, L is stricly lower triangular and U is strictly upper triangular. Here strictly
means that the diagonal entries are zero.

1.1

Eigenvalues and eigenvectors

Let A be an n-by-n matrix.

2.1

Power Method

Let z (0) be an initial vector (it is usual to take z (0) = (1, . . . , 1)T ). The Power Method is then

Method of Jacobi

Assume that the diagonal elements of A are dierent from zero. A step of the method of Jacobi
is given by

1
(k+1)
(k)

=
aij xj + bi , i = 1, 2, . . . , n.
xi
aii

y (k) =

z (k+1) = Ay (k) ,
(y (k) )T Ay (k)
= (y (k) )T z (k+1) .
k =
(y (k) )T y (k)

j=i

If we write the method as x(k+1) = BJ x(k) + c, then BJ = D1 (L + U ) and c = D1 b.

1.2

Method of Gauss-Seidel

Assume that the diagonal elements of A are dierent from zero. A step of the method of
Gauss-Seidel is given by

1
(k+1)
(k+1)
(k)

=
aij xj

aij xj + bi , i = 1, 2, . . . , n.
xi
aii
j<i

j>i

Under suitable conditions, the sequence {k }k converges to the eigenvalue with the largest
modulus, and {y (k) }k (or {z (k) }k ) converges to the corresponding eigenvector.

2.2

Method of Jacobi

Let A be a real n-by-n symmetric matrix. Assume we are in the k-th step of the Jacobi method
and, to simplify the notation, we dene B = Ak .
Assume that we have chosen two indices (p, q) such that bpq = 0 and we want to rotate in
this plane such that the new matrix satises bpq = bqp = 0. The angle of rotation is given by

If we write the method as x(k+1) = BGS x(k) + c, then BGS = (L + D)1 U and c = (L + D)1 b.

1.3

Method of Successive Over-Relaxation (SOR)

Assume that the diagonal elements of A are dierent from zero. A step of the method of SOR,
with parameter , is given by

1
(k)
(k+1)
(k)

=
aij xj

aij xj + bi ,
ri
aii
j<i

(k+1)
xi

(k)
xi

cot(2) =

bpp bqq
,
2bpq

which means that the angle can be chosen in the interval ( 4 , 4 ). Then, it is not dicult to
nd explicit expressions for c = cos and s = sin :
If bpp = bqq , then = sign(bpq ), c =

2
2

and s =

2
2 .

If bpp = bqq , then = sign[bpq (bpp bqq )], d = (bpp bqq )2 + 4b2pq

ji

1

|bpp bqq | 2
1
1+
c=
,
2
d

(k)
ri .

If we write the method as x(k+1) = B x(k) + c , then B = (I + D1 L)1 [(1 )I D1 U ]


= D1 L and U
= D1 U , then the iteration
and c = (I + D1 L)1 D1 b. If we denote L
1 [(1 )I U
] and c = (I + L)
1 D1 b.
matrix is B = (I + L)

z (k)
,
z (k) 2

and

1

|bpp bqq | 2
1
1
s=
.
2
d

= RT BR (R denotes the previous rotation) is given by


The transformed matrix B
bpj = bjp = bpj c + bqj s, (j = 1, . . . , n, j = p, j = q),
biq = bqi = bip s + biq c, (i = 1, . . . , n, i = p, i = q),
bpp = bpp c2 + 2bpq cs + bqq s2 = bpp + bpq t,
bqq = bpp s2 2bpq cs + bqq c2 = bqq bpq t,
and bqp = bpq = 0, where t = s/c.

2.3

QR factorization

We will use Householder matrices: for any v Rn \ {0}, the matrix


Pv = I

2
vT v

vv T ,

is a Householder matrix.

Approximation

4.1

Orthogonal polynomials

Let us consider the scalar product


b
f (x)g(x)w(x) dx,
f, g =

w : [a, b] R+ and continuous,

Rn ,

1. Given a vector x
there is a Householder matrix Pv such that Pv x e1 . The vector
v is obtained as follows:
= x2 .

dened on the real vector space of continuous functions CR0 ([a, b]). The recurrence
2
i1 (x),
i+1 (x) = (x i+1 )i (x) i+1

where 1 (x) 0, 0 (x) 1 and

v = x.

If = 0, = x1 + sign(x1 ), vj = 1 vj (j = 2, . . . , n).
v1 = 1.

We will refer to this algorithm as v = householder(x).


2. Algorithm for Pv A (only using the vector v):
= vT2 v .

i+1 =

xi , i
,
i , i

2
=
i+1

i = 0, 1, . . . , n 1,

0
i , i
i1 , i1

if i = 0,
if i = 1, 2, . . . , n 1,

produces the family of orthogonal polynomials such that i is a monic polynomial of degree i.
4.1.1

Legendre polynomials

The Legendre polynomials Pn are orthogonal polynomials for the scalar product
1
f (x)g(x) dx,
f, g =

w = AT v.

A = A + vwT .

We will refer to this algorithm as A = premult.h(A, v).

and can be dened as


P0 (x) = 1,

3. Algorithm for APv (only using the vector v):

Pn (x) =

= vT2 v .

w = Av.

A = A + wv T .
We will refer to this algorithm as A = postmult.h(A, v).
4. The QR algorithm can be written, in compact form, as follows. Let A be a m-by-n matrix
(m n):
FOR j = 1 to n
v(j : m) = householder(A(j : m, j)
A(j : m, j : n) = premult.h(A(j : m, j : n), v(j : m))
IF j < m
A(j + 1 : m, j) = v(j + 1 : m)
ENDIF
ENDFOR

dn 2
1
(x 1)n ,
2n (n!) dxn

2
They satisfy Pn , Pn =
and, for n 0,
2n + 1
2n + 1
n
xPn (x)
Pn1 (x),
Pn+1 (x) =
n+1
n+1
4.1.2

P1 (x) 0,

P0 (x) 1.

Discrete case. Gram polynomials

Let us consider the discrete scalar product


f, g =

f (xi )g(xi ),

i=0

{Pn,m }m
n=0

The Gram polynomials


be dened by the recurrence

xi = 1 +

2i
,
m

i = 0, 1, . . . , m.

are orthogonal polynomials for this scalar product. They can

Pn+1,m (x) = n,m xPn,m (x) n,m Pn1,m (x),


where P1,m (x) 0, P0,m (x) (m + 1)1/2 and

1/2
4(n + 1)2 1
m
,
n,m =
n + 1 (m + 1)2 (n + 1)2

n = 1, 2, . . .

n,m =

n,m
.
n1,m

4.2

Periodic functions

We focus on the real vector


2 space of continous functions dened on [0, 2], with the standard
scalar product f, g = 0 f ()g() d. Let us dene P2n+1 as the linear subspace generated by
1
the functions 2 , cos , sin , cos 2, sin 2, ..., cos n, sin n. Then, the best approximation to a
function f CR0 ([0, 2]) by f P2n+1 is given by
n

f () =

Ordinary dierential equations

Consider the initial value problem


x = f (t, x)
x(t0 ) = x0

where x Rn . The Euler method is dened by

a0
aj cos j + bj sin j,
+
2

tn+1 = tn + hn ,

j=1

x
n+1 = x
n + hn f (tn , x
n ).

where
a0 =
4.2.1

f () d,

aj =

f () cos j d,

bj =

f () sin j d.

The Implicit Euler method is given by

tn+1 = tn + hn ,
n + hn f (tn+1 , x
n+1 ).
x
n+1 = x

Discrete case

Consider the discrete case given by the scalar product


f, gm =

f (i )g(i ),

i =

i=0

2i
,
m+1

5.1
i = 0, 1, . . . , m.

Some explicit one-step methods

Explicit one-step methods can be written as


tn+1 = tn + hn ,

If 2n m, the best approximation to a periodic function f by f P2n+1 is given by


n

f () =

a0
aj cos j + bj sin j,
+
2

j=1

Heun method: (h;


t, x) = x + h2 [f (t, x) + f (t + h, x + hf (t, x))].

where
m

a0 =

2
f (i ),
m+1
i=0

aj =

2
f (i ) cos ji ,
m+1
i=0

bj =

n ; tn , x
n ).
x
n+1 = (h

2
f (i ) sin ji .
m+1
i=0

Modied Euler method: (h;


t, x) = x + hf (t + 12 h, x + 12 hf (t, x)).
Runge-Kutta method of order 4: (h;
t, x) = x + h6 [k1 + k2 + k3 + k4 ], where
k1 = f (t, x),

1
1
k2 = f (t+ h, x+ hk1 ),
2
2

1
1
k3 = f (t+ h, x+ hk2 ),
2
2

k4 = f (t+h, x+hk3 ).

You might also like