MA 514
Homework 3
February 9, 2012
1. (10 points) (Adapted from problem 3.2 of M. T. Heath, Scientic Computing: an
Introductory Survey, 2nd ed., McGrawHill, 2002.) A common problem in surveying
is to determine the altitudes of a series of points with resp
Homer Walker
Updated Spring, 2012
KRYLOV SUBSPACE METHODS
A IR nn .
Problem: Ax = b,
Assume: A nonsingular, r0 b Ax0 = 0.
Krylov subspace method: Given x0 , take xk = x0 + zk for some
zk Kk span cfw_r0 , Ar0 , . . . , Ak1 r0 .
Features: These methods requ
The following algorithms use naive Gaussian elimination followed by back substitution to compute the solution of Ax = b, where A is an n n matrix with ijth entry aij and b is an
n-vector with ith component bi .
These are structured as most modern software
Convention: In the algorithms below, when the starting index of a sum is greater than the
terminating index, the sum is skipped.
The rst algorithm performs Cholesky decomposition on a symmetric positive-denite n n
matrix A (with ijth entry denoted by aij
Arnoldi Process:
Given r0 .
Set 0 r0
2
and v1 r0 /0 .
For k = 1, 2, , do:
Initialize vk+1 = Avk .
For i = 1, , k, do:
T
Set hik = vi vk+1 .
Update vk+1 vk+1 hik vi .
Set hk+1,k = vk+1 2 .
Update vk+1 vk+1 /hk+1,k .
The process breaks down if and only if A
Conjugate Gradient Method:
Given A, b, x, tol, itmax.
Set r = b Ax, 2 = r 2 , z = 0, = 0.
2
Iterate: For itno = 1,. . . , itmax, do:
If tol, go to End.
Update p r + p.
Compute Ap.
Compute pT Ap and = 2 /pT Ap.
Update z z + p.
Update r r Ap.
Update r 2 /2
The following algorithms implement Gaussian elimination with partial pivoting followed by back substitution to compute the solution of Ax = b, where A is an n n matrix with ijth entry a ij and b is an
n-vector with ith component bi .
Like our naive Gaussi
MA 514
Homework 2
February 2, 2012
1. (10 points) Consider
A()
a. Write 1 (A() A
1
A1
1
1
cos
cos
1
.
as a function of for near zero.
5
b. If = 10 and we solve A()x = b using Gaussian elimination with partial pivoting on a machine that carries sixteen
MA 514
Homework 5
March 15, 2012
For this assignment, consider again the 2D Poisson problem
2u 2u
+ 2 =f
x2
y
u=0
in D = [0, 1] [0, 1] I 2
R
on D, the boundary of D
As before, discretizing this using centered dierences on a uniform m m grid yields
the lin
MA 514
Homework 1
January 30, 2012
1. (10 points) My older son is two years older than my younger son. My younger
son is two years older than my cat. My cats age plus twice my dogs age is equal to
my older sons age. The sum of all of their ages is 53. Usi
MA 514
Homework 4
February 16, 2012
Our primary guiding model problem for iterative methods is the 2D Poisson problem
2u 2u
+ 2 =f
x2
y
u=0
in D = [0, 1] [0, 1] I 2
R
on D, the boundary of D
In class, we discretized this using centered dierences on a unif
MA 514
Homework 6
March 22, 2012
1. (10 points) Consider a one-dimensional analog of our 2D model Poisson problem:
u = f in [0, 1],
u(0) = u(1) = 0.
Discretizing with centered dierences on a uniform grid of m points in (0, 1) yields the
linear system
ui+1
MA 514
Homework 8
April 19, 2012
For this assignment, youll need to download the following M-les via the M-Files
link on the course web page and place them together in your MATLAB path (e.g., in
the directory where you run MATLAB): bc vectors DD.m, condif
MA 514
Homework 7
March 29, 2012
For this assignment, youll need to download the following M-les via the M-Files
link on the course web page and place them together in your MATLAB path (e.g., in
the directory where you run MATLAB): fill in demo.m, pcg dem
For A I mn , m n, the following algorithms produce orthogonal Q I mn and upperR
R
triangular R I nn such that A = QR. In them, we denote A = (a1 , . . . , an ) and Q =
R
(q1 , . . . , qn ), where ai and qi are column vectors in I m for each i. The two alg