Boundary Value Problems and Iterative Methods for Linear Systems

Similar documents
Iterative Methods for Linear Systems

Finite difference method for elliptic problems: I

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Finite Elements. Colin Cotter. February 22, Colin Cotter FEM

Chapter 1 Foundations of Elliptic Boundary Value Problems 1.1 Euler equations of variational problems

Simple Examples on Rectangular Domains

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Chapter 1: The Finite Element Method

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Theory of PDE Homework 2

Class notes: Approximation

Scientific Computing WS 2018/2019. Lecture 15. Jürgen Fuhrmann Lecture 15 Slide 1

CLASSICAL ITERATIVE METHODS

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal

Chapter 7 Iterative Techniques in Matrix Algebra

2 Two-Point Boundary Value Problems

Finite Element Method for Ordinary Differential Equations

1. Subspaces A subset M of Hilbert space H is a subspace of it is closed under the operation of forming linear combinations;i.e.,

Your first day at work MATH 806 (Fall 2015)

Qualifying Examination

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

Algebra II. Paulius Drungilas and Jonas Jankauskas

Algebra C Numerical Linear Algebra Sample Exam Problems

Numerical Methods - Numerical Linear Algebra

Sparse Linear Systems. Iterative Methods for Sparse Linear Systems. Motivation for Studying Sparse Linear Systems. Partial Differential Equations

Parallel Numerics, WT 2016/ Iterative Methods for Sparse Linear Systems of Equations. page 1 of 1

SOLVING SPARSE LINEAR SYSTEMS OF EQUATIONS. Chao Yang Computational Research Division Lawrence Berkeley National Laboratory Berkeley, CA, USA

1 Discretizing BVP with Finite Element Methods.

Exercises - Chapter 1 - Chapter 2 (Correction)

Scientific Computing WS 2017/2018. Lecture 18. Jürgen Fuhrmann Lecture 18 Slide 1

Numerical Methods I Non-Square and Sparse Linear Systems

AMSC/CMSC 466 Problem set 3

Variational Formulations

Preface to the Second Edition. Preface to the First Edition

One-dimensional and nonlinear problems

Linear Algebra. Session 12

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

Basic Principles of Weak Galerkin Finite Element Methods for PDEs

Matrix decompositions

1. Let a(x) > 0, and assume that u and u h are the solutions of the Dirichlet problem:

1.Chapter Objectives

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

Cheat Sheet for MATH461

Gaussian Elimination without/with Pivoting and Cholesky Decomposition

Let x be an approximate solution for Ax = b, e.g., obtained by Gaussian elimination. Let x denote the exact solution. Call. r := b A x.

Iterative methods for positive definite linear systems with a complex shift

[2] (a) Develop and describe the piecewise linear Galerkin finite element approximation of,

Solving linear systems (6 lectures)

Second Order Elliptic PDE

1 Positive definiteness and semidefiniteness

Lecture Notes on PDEs

Numerical Analysis Comprehensive Exam Questions

Analysis II: The Implicit and Inverse Function Theorems

LECTURE 1: SOURCES OF ERRORS MATHEMATICAL TOOLS A PRIORI ERROR ESTIMATES. Sergey Korotov,

A brief introduction to finite element methods

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

Weak Formulation of Elliptic BVP s

j=1 [We will show that the triangle inequality holds for each p-norm in Chapter 3 Section 6.] The 1-norm is A F = tr(a H A).

Ordinary Differential Equations II

Notes on PCG for Sparse Linear Systems

Scientific Computing

Some definitions. Math 1080: Numerical Linear Algebra Chapter 5, Solving Ax = b by Optimization. A-inner product. Important facts

AM 205: lecture 6. Last time: finished the data fitting topic Today s lecture: numerical linear algebra, LU factorization

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

Linear Systems of n equations for n unknowns

6.4 Krylov Subspaces and Conjugate Gradients

The Solution of Linear Systems AX = B

ACM106a - Homework 2 Solutions

Numerical Methods for Differential Equations Mathematical and Computational Tools

Your first day at work MATH 806 (Fall 2015)

An Analysis of Five Numerical Methods for Approximating Certain Hypergeometric Functions in Domains within their Radii of Convergence

A very short introduction to the Finite Element Method

Kernel Method: Data Analysis with Positive Definite Kernels

Numerical Linear Algebra

Lecture Note 7: Iterative methods for solving linear systems. Xiaoqun Zhang Shanghai Jiao Tong University

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

2.3 Variational form of boundary value problems

MATH 532: Linear Algebra

Linear Algebra Massoud Malek

Lecture 18 Classical Iterative Methods

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

The Plane Stress Problem

October 25, 2013 INNER PRODUCT SPACES

EECS 275 Matrix Computation

Vectors in Function Spaces

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Variational Principles for Equilibrium Physical Systems

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit VII Sparse Matrix

Lecture Notes: African Institute of Mathematics Senegal, January Topic Title: A short introduction to numerical methods for elliptic PDEs

Spectral Properties of Elliptic Operators In previous work we have replaced the strong version of an elliptic boundary value problem

Iterative solvers for linear equations

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2

************************************* Applied Analysis I - (Advanced PDE I) (Math 940, Fall 2014) Baisheng Yan

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.

Methods for sparse analysis of high-dimensional data, II

Finite-dimensional spaces. C n is the space of n-tuples x = (x 1,..., x n ) of complex numbers. It is a Hilbert space with the inner product

High Performance Nonlinear Solvers

From Completing the Squares and Orthogonal Projection to Finite Element Methods

Transcription:

Boundary Value Problems and Iterative Methods for Linear Systems 1. Equilibrium Problems 1.1. Abstract setting We want to find a displacement u V. Here V is a complete vector space with a norm v V. In the absence of external forces the equilibrium solution minizes the internal energy Q(u). If there are external forces: Now changing the displacement from u to u + v corresponds to a work l(v) ( work of external forces ). Here l: V R is linear and bounded: v V : l(v) C l v Principle of virtual displacements: The equilibrium solution u V minimizes F (u) := Q(u) l(u) For a linear problem the energy Q(u) is quadratic and has the form where a: V V R is bilinear and bounded: Q(u) = 1 a(u, u) u, v V : a(u, v) C a u V v V (1) The bilinear form a should be symmetric: a(u, v) = a(v, u) for all u, v V. We want that the energy Q(u) = 1 a(u, u) is positive for nonzero u V, moreover we need a lower bound. We require that the bilinear form a(u, v) is coercive: there exists γ > 0 such that u V : a(u, u) γ u V () Minimization Problem (MIN): Find u V such that F (u) is minimal. We claim that (MIN) is equivalent to the following linear problem: Variational Problem (VAR): Find u V such that v V : a(u, v) = l(v) Theorem 1.1. The following statements are equivalent: 1. u minimizes F (u) over all u V. u satisfies (VAR) 1

Proof. (1) Assume u V solves (MIN). Then for any v V and any ε R we have Q(u) Q(u + εv) We have by using the bilinearity and symmetry of a(, ), and the linearity of l( ) Q(u + εv) = 1 a(u + εv, u + εv) l(u + εv) = 1 a(u, u) + εa(u, v) + 1 ε a(v, v) l(u) εl(v) Q(u + εv) = Q(u) + ε [a(u, v) l(v)] + 1 ε a(v, v) Consider this as a function f(ε) for ε R. If this is minimal for ε = 0 then we must have a(u, v) l(v) = 0 (otherwise we could achieve a smaller value with ε 0). () Assume u satisfies (VAR). Then we have for any nonzero v V since by coercivity a(v, v) γ v V and v V Q(u + v) = Q(u) + [a(u, v) l(v)] + 1 a(v, v) }{{} }{{} 0 by (VAR) > 0 > 0 for nonzero v. Note that a(, ) is an inner product on V with the corresponding norm and by (3), () we have upper and lower bounds u a := a(u, u) 1/ u V : γ 1/ u V u a Ca 1/ u V Theorem 1.. The variational problem (VAR) has a unique solution u V. Proof. Note that V with the inner product a(, ) forms a Hilbert space. The functional l: V R is linear and bounded: l(v) C v a with C := γ 1/ C l. By the Riesz representation theorem there exists a unique u V such that v V : a(u, v) = l(v) 1.. Example Problem: Elastic string The internal energy of the elastic string is given by where the stiffness c(x) satisfies Q(u) = 1 a(u, u), a(u, v) := c(x)u (x)v (x)dx 0 < c min c(x) c max for x For a force f(x) the work of the external force is given by l(v) = f(x)v(x)dx

Let H 1 () denote the space with the norm H 1 () := { u u L () and u L () } We define the space V as with the norm u H 1. We have the Poincare inequality: For u H 1 0 () u H 1 () = u L () + u L () V = H0 1 () := { u u H 1 (), u = 0 on } u L C u L Hence we can define u V := u L as norm on the space V : u L u H 1 (1 + C ) u L Now we can show that a(, ) satisfies the boundedness with C a = c max : By Cauchy-Schwarz a(u, v) c max u v dx c max u L v L We can also show the coercivity of a(, ) with γ = c min : a(u, u) = c(x)u (x) dx c min u (x) dx = c min u L Assume that the given force f(x) satisfies f L (). Then we can show that functional l: V R is bounded with C l = f L : By Cauchy-Schwarz l(v) = f(x)v(x)dx f L v L Hence we obtain from Theorems 1.1, 1. that for any given load f L () the equilibrium problem has a unique solution u V satisfying (VAR). 1.3. Approximation of equilibrium solution In our example the space V = H0 1 () is infinite dimensional. On a computer we can only compute finitely many numbers. Choose a finite dimensional subspace V N V. Minimization Problem (MIN N ): Find u N V N such that F (u N ) is minimal. We claim that (MIN) is equivalent to the following linear problem: Variational Problem (VAR N ): Find u N V N such that v N V N : a(u N, v N ) = l(v N ) Since V N V all properties of a(u, v) and l(v) also hold for u, v V N. Therefore we obtain: u N satisfies (MIN N ) u N satisfies (VAR N ) problem (VAR N ) has a unique solution u N V N 3

Moreover, this solution is the best possible approximation of u in the space V N with respect to a : u u N a = min v V N u v N a To prove this we have to show that u N satisfies the normal equations, i.e., a(u u N, v N ) = 0 for all v V N : This follows from a(u N, v N ) (VAR N ) = l(v N ) (VAR) = a(u, v N ) In order to compute u N V N we choose a basis of V N. Assume dim V N = n we can pick a basis φ 1,..., φ n. Now we can write the solution u N V N as u N = c 1 φ 1 + + c n φ n with a coefficient vector c R n. We need that (VAR N ) holds for v = φ 1,..., φ n. This gives an n n linear system: A c = b where the so-called stiffness matrix A R n n is the Gram matrix with entries and the right-hand side vector b R n has entries This leads to the following algorithm: A jk = a(φ k, φ j ) b j = l(φ j ). 1. Compute the entries of the stiffness matrix A R n n. Compute the entries of the right-hand-side vector b R n 3. Solve the n n linear system A c = b We can use Gaussian elimination to solve the linear system. For a general n n matrix A this requires O(n 3 ) operations. 1.4. p-version Let = ( 1, 1). We want to use finite dimensional spaces V N so that we can obtain good approximations of our solution u(x). One good choice are polynomials: we pick the spaces for N. V N = {u P N u( 1) = u(1) = 0} Since u V we have u( 1) = u(1) = 0 and therefore u (x)dx = u(1) u( 1) = 0. We now want to construct v N V N such that u v N a is small. Note that u v N 1 a c max u v N L Therefore we have to find q N 1 := v N P N 1 such that u q N 1 L is small. We define q N 1 as the L projection of u onto the space P N 1. Then we must have (u q N 1 )r dx = 0 for all r P N 1. In particular for r(x) = 1 we obtain (u q N 1 )dx = 0, hence q N 1(x)dx = 0. We now define v N as the antiderivative v N (x) := x 1 q N 1 (t)dt, 4

then clearly v N P N and v N ( 1) = 0, v N (1) = 0, i.e., v N V N. Now we can give an upper bound for u q N 1 L. Since q N 1 is the best L approximation we have for any q N 1 P N 1 u q N 1 L u q N 1 L u q N 1 L w where we use the weight function w(x) = (1 x ) 1/ 1 on = ( 1, 1). The function u has a Chebyshev expansion u = a k T k and we choose q N 1 P N 1 as the truncated Chebyshev expansion (this minimizes u q N 1 L w ) Then we have Therefore we obtain the upper bound: q N 1 := k=0 u q N 1 L w = N 1 k=0 k=n u u N a c π max where a k are the Chebyshev coefficients of the function u (x). a k T k a k T k L w }{{} π/ a k k=n 1.5. h-version. Solution of the linear system: Direct solvers versus iterative solvers In many applications we have to solve a linear system Ax = b with A R n n and b R n given. If n is large the solution of the linear system takes a lot of operations, and standard Gaussian elimination may take too long. But in many cases most entries of the matrix A are zero and A is a so-called sparse matrix. This means each equation only couples very few of the n unknowns x 1,..., x n. A typical example are discretizations of partial differential equations, see next section for an example. Direct solvers will give the exact solution after finitely many operations (if we ignore roundoff errors). Gaussian elimination with partial pivoting: This gives a decomposition LU = lower triangular, U is upper triangular. row p 1 of A. row p n of A where L is Cholesky decomposition: We need that A is symmetric positive definite. This gives a decomposition A = LL where L is lower triangular. Cholesky decomposition takes about half the number of operations of Gaussian elimination. 5

Cost for Gaussian elimination and Cholesky algorithm: for full matrices finding the decomposition takes Cn 3 operations. Once have the decomposition solving the linear system for a given vector b takes n operations. for band matrices with bandwidth m, i.e., A ij = 0 for i j > m: Finding the decomposition takes Cm n operations, solving a linear system then takes Cmn operations. In Matlab we should initialize the matrix A as a sparse matrix structure. Then Matlab will only use storage and operations to compute the nonzero elements of L, U. For a matrix A with bandwidth m the factors L, U will also have bandwidth m. For a general sparse matrix A, the factors L, U will usually have additional nonzero elements at locations where A had zero elements. This is called fill-in, and this increases the number of operations. Reordering: If you use the Matlab command x=a\b (where the matrix has sparse array type) then Matlab will try to renumber the unknowns in such a way that the amount of fill-in will minimized. This can substantially reduce the number of operations. The command spparms( spumoni,) makes Matlab print out details about the algorithms used for each following \ command. Try the following example for solving u = 1 on the square = (0, 1) : N = 50; A = delsq(numgrid( S,N+1)); figure(1); spy(a) n = size(a,1); b = ones(n,1)/n^; spparms( spumoni,) u = A\b; figure(); surf(reshape(u,n-1,n-1)) There are also versions of the lu and chol commands that use reordering to minimize fill-in. 3. Convection diffusion problem in R d We consider a typical application problem which leads to a large sparse linear system. Equilibrium problems for elastic deformations or heat transfer lead to elliptic differential equations. Boundary value problem In the convection diffusion problem we have a domain R d. For d = 1 we consider an interval, for d = we consider a polygon, for d = 3 we consider a polyhedron. We want to find a function u(x) for x such that u + b u = f in, u = 0 on the boundary where b R n is a constant vector, and f is a given function on. This is called a boundary value problem. Variational formulation We first want to find the variational formulation : If we multiply the PDE by a test function v which is zero on the boundary and integrate over we obtain after using the first Green formula ( u)v dx + u v dx = ( nu)v ds [ u v + (b u)v] dx = fv dx } {{ } }{{ } a(u, v) l(v) 6

We use the Hilbert space V = H0 {u 1() = u V = ( } u + u ) dx <, u = 0 with the norm ( u + u ) dx = u L () + u L (). Note that (b u)u dx = (b 1u x1 u + b u x u) dx = 0: For β b(x ) x =α x 1 =a(x ) b 1u x1 u dx 1 dx integration by parts gives for the inner integral b(x ) x 1 =a(x ) u x 1 u dx 1 = b(x ) x 1 =a(x ) u x 1 u dx 1 since u is zero on the boundary. We then obtain that a(, ): V V R is a bilinear form satisfying for all u, v V a(u, v) L a u V v V (3) a(u, u) γ a u V (4) The first inequality follows from the Cauchy-Schwartz inequality. For the second inequality we use a(u, v) = u u dx and the Poincare inequality u L () C u L () ). We obtain that l: V R is a linear functional such that l(v) C l v V. The variational formulation is: Find u V such that v V : a(u, v) = l(v) By the Lax-Milgram theorem (see Appendix A below) this variational problem has a unique solution u V. Finite element discretization We choose a finite dimensional subspace V h V. For d = the domain is a polygon, and we divide it into a mesh of triangles. (For d = 1 we divide the interval into subintervals, for d = 3 we divide the polyhedron into a mesh of tetrahedra). Then we define V h as the space of piecewise linear functions on the mesh which are continuous in and are zero on the boundary. The discrete problem is: Find u h V h such that v h V h : a(u h, v h ) = l(v h ) (5) Since V h V the inequalities (3), (4) are satisfied for u, v V h. Hence by the Lax-Milgram theorem the discrete problem has a unique solution u h. We can specify a function v h V h by specifying the values v 1,..., v n at the interior nodes x 1,..., x n of the mesh. The basis function φ j is the function in V h with φ j (x j ) = 1 and φ(x k ) = 0 for k j. We can then write u h as u h = u 1 φ 1 + + u n φ n where u = u 1. u n R n is the coefficient vector. Now (5) for v h = φ 1,..., φ n gives the linear system Au = b, A jk = a(φ k, φ j ), b j = l(φ j ). Therefore the finite element method involves the following steps: pick a mesh on assemble the stiffness matrix A and the right hand side vector b solve the linear system Au = b 7

Work for direct solvers For d = 1 we obtain a tridiagonal matrix A. Hence the work is proportional to N = 1/h. As a simple example for d = 3 consider the cube = (0, 1) 3. Let h = 1/N with positive integer N. By using uniform grids x 1 = j 1 /N, x = j /N, x 3 = j 3 /N with j 1, j, j 3 {0,..., N} for each coordinate we can subdivide into N 3 smaller cubes. We can then subdivide each of the smaller cubes into tetrahedra. We have n = (N 1) 3 interior nodes with j 1, j, j 3 {1,..., N 1}, and we can order them lexicographically by (j 1, j, j 3 ): (1, 1, 1),..., (1, 1, N 1), (1,, 1),..., (N, N, N). Then the resulting stiffness matrix A has size n n with n = (N 1) 3, and bandwidth (N 1). This will also hold for a more general domain R d, assuming that all triangles/tetrahedra are of size h, up to a constant : We will have n = dim V h ch d and a bandwidthm c h 1 d. Therefore the work for Gaussian elimination is with h cn 1 m n C ( N d 1) N d = CN 3d For d = we have therefore O(N 4 ) operations. For d = 3 we have O(N 7 ) operations. Using Matlab s reordering algorithms reduces the work to N 3 for d =, but for d = 3 it does not improve the rate O(N 7 ). Work of direct solvers for the convection-diffusion problem: d = 1 d = d = 3 Gaussian elimination (using band structure) N 1 N 4 N 7 Gaussian elimination with reordering N 1 N 3 N 7 Estimates (A u, v) L u v and (A u, u) γ u A function v h V h is given by a coefficient vector v = v 1. v n for the stiffness matrix A and v h L. How are these norms related to the norm v the coefficient vector v?. For the function v h we have the norms v h L We assume that all triangles are of size h, up to a constant. More precisely: We assume that a circle of radius c 0 h fits inside each triangle, and each triangle fits inside a circle of radius C 0 h. Then one can show that there exist constants c 1, c, c 3 depending on c 0 and C 0 such that c 1 h d/ v v h L c h d/ v v h L c 3 h 1 h d/ v This implies v h H 1 = v h L + v h L c h d v Hence we obtain for functions u h, v h V h with coefficient vectors u, v (A u, v) = a(u h, v h ) L a u h H 1 v h H 1 L a c h d u v (6) (A u, u) = a(u h, u h ) γ a u h L γ ac 1h d u (7) Hence we obtain ( ) L = A Ch d, γ = λ 1 min (A + A ) C h d We can split the bilinear form a(u, v) into a diffusion part and a convection part a(u, v) = u v dx + (b u)v dx, }{{}}{{} a diff (u, v) a conv (u, v) 8

hence we have A = A diff + A conv with (A diff u, v) = u h v h dx u h L v h L c 3h d u v (A conv u, v) = u h (bv h ) dx u h L b v h L c 3 c b h d 1 u v 4. 1-step minimum residual method aka GMRES(1) We want to solve the linear system Au = b where A R n n and b R n. We assume that A is positive definite: (Au, u) γ u for all u R n The current guess is u (k). We compute the residual r (k) := b Au (k) and define the new guess as u (k+1) := u (k) + α k r (k) where we choose α k such that the new residual has r (k+1) := b Au (k+1) has minimum norm r (k+1), yielding ( Ar (k), r (k)) α k := Ar (k) Note that each step requires one matrix-vector product Ar (k) (and a few inner products of vectors). If the matrix A satisfies (6), (7) we obtained earlier (see Appendix A below) r (k+1) ( 1 K 1) ( ) 1/ r (k) L with K = (8) γ implying r (k) ( 1 K 1) k/ r (0), Let κ := L/γ. Since A 1 γ 1 we have cond (A) κ: If the matrix A is symmetric we have cond (A) = κ: u (k) u γ 1 ( 1 K 1) k/ r (0) (9) cond (A) = A A 1 Lγ 1 = κ. L = A = λ max (A), γ = λ min (A), cond (A) = A A 1 = Lγ 1 = κ. Assume that we have r (k+1) q r (k) with q = 1 ε. In order to achieve r (k) δ we need to pick k such that r (k) q k r (0) δ, hence k log(δ/ r (0) ) log q For q = 1 ε the first order Taylor approximation gives log(1 ε) ε, hence we need approximatively ) steps for the iterative method. k ε 1 log ( r (0) δ = ε 1 C δ Here we have q = ( 1 K 1) 1/ 1 1 K 1 using Taylor. Hence we need steps for the iterative method. k C δ K = C δ κ Note that for the convection diffusion problem we have κ = Ch and q 1 ch 4. Therefore it would seem that we need Ch 4 steps of our iterative method. But it turns out that this estimate is too pessimistic. Actually we have q 1 ch and we need only Ch steps of our iterative method as we will see in the next section. 9

5. Sharper estimates for the convergence factor Symmetric case Recall that r (k+1) = (I αa)r (k) r (k) I αa. If A is symmetric, then also I αa is symmetric and we have with the eigenvalues λ 1,..., λ n of A I αa = max 1 αλ j (10) j=1,...,n If A is positive definite, the eigenvalues are positive, and we can minimize (10) by choosing α such that yielding α = λ max + λ min, 1 + αλ max = (1 αλ min ) I αa = λ max λ min λ max + λ min = 1 κ + 1 with κ = λ max λ min So the convergence factor is q = 1 κ + 1 and the number of iterations is proportional to κ = cond (A) (and not κ as the earlier estimate (8) would suggest). Nonsymmetric case We can write A as a sum of a symmetric part H and antisymmetric part S: A = H + S, H := 1 (A + A ), S := 1 (A A ) We assume that A is positive definite, i.e., (Av, v) = (Hv, v) > 0 for v 0. Let u denote the current guess, and r := b Au the residual. The next approximation is u new = u + αr, with the residual r new = b Au new = (I αa)r. Hence r new = ((I αa)r, (I αa)r) = r α (Ar, r) + α Ar Note that both Ar and (Ar, r) 1/ = (Hr, r) 1/ define norms on R n. Therefore there exists C > 0 such that Then Ar C (Ar, r) for all r R d (11) r new r + [ α + Cα ] (Ar, r) The bound is minimal for α = C 1, and with this we get r new r C 1 (Ar, r) It remains to find C such that (11) holds: with v = Ar we get [ 1 γ ] r C (Ar, r) = (Hr, r) = ( HA 1 v, A 1 v ) Then we obtain (v, v) C(A} {{ HA 1 } v, v) with C = λ min (B) 1 = λ max (B 1 ) since B is symmetric. Hence we B need an estimate ( w, B 1 w ) C (w, w) with B 1 = AH 1 A : Using A = H S we get ( w, B 1 w ) = ( (H S)w, H 1 (H S)w ) = (Hw, w) (Sw, w) ( Hw, H 1 Sw ) + ( Sw, H 1 Sw ) }{{}}{{} 0 0 λ max (H) w + λ min (H) Sw 10

Since (Sw, Sw) = ( S w, w) ρ(s) w we obtain Note: the eigenvalues of H are real and positive. C = λ max (H) + ρ(s) λ min (H) the eigenvalues of S are of the form ±α j i with α j 0. Proof: Let µ j denote the eigenvalues of S. The matrix S is symmetric and has real eigenvalues µ j 0 because ( S w, w ) = (Sw, Sw) 0. Since the matrix S is real, taking the complex conjugate of Sv = µ j v gives Sv = µ j v. Hence µ j is also an eigenvalue of S. Theorem 5.1. Let A R n n, let H := 1 (A + A ), S := 1 (A A ). If A is positive definite, i.e., λ min (H) > 0 the 1-step minimum residual iteration satisfies r (k+1) ( 1 K 1) 1/ r (k) K := cond (H) + ( ) ρ(s) (1) λ min (H) ( ) A Note: The number of iterations is proportional to K. In our earlier estimate (9) we had K = whereas γ we now obtain K = H ( ) S + γ γ This shows that for a symmetric matrix A = H the number of steps is proportional to the condition number. If we have nonsymmetric A = H +S then K increases by ( S /γ). So we see that the quadratic term ( A /γ) in our earlier estimate is actually only caused by the antisymmetric part S. Application to convection diffusion problem Recall that A = A diff + A conv with the symmetric matrix H = A diff and the antisymmetric matrix S = A conv and Therefore we have yielding with (1) C 1 h d u (A diffu, u) C h d u (A conv u, v) C 3 h d 1 u v λ min (H) C 1 h d, λ max (H) C h d, ρ(s) = S C 3 h d 1 ( ) ρ(s) K := cond (H) + C ( ) h C3 + h 1 = Ch, q = ( 1 C 1 h ) 1/ λ min (H) C 1 C 1 This means that we need C h steps of the iterative method to reduce the norm of the residual by a fixed factor. ( ) Note: C 3 is proportional to b, so we obtain K = C + C b h. So for a problem with strong convection the number of iterations can be very large. Recall that the stiffness matrix A is of size n n with cn nonzero elements where n ch d cn d (for the meshsize h 1/N). 11

Therefore the work of a matrix-vector product is given by the number of nonzero matrix elements cn d. The work of one step of the 1-step min. res. method is one matrix-vector product, and some inner products, so the work per step is c N d. The number of steps is proportional to h N if we want to achieve a residual with r δ. Hence the total work for our iterative method with q = 1 ch is CN N d If we had an iterative method with q = 1 ch we would obtain a toal work of CNN d instead. Summary: work for solving the convection-diffusion problem d = 1 d = d = 3 Gaussian elimination (using band structure) N 1 N 4 N 7 Gaussian elimination with reordering N 1 N 3 N 7 1-step min. res. method, q = 1 ch N 3 N 4 N 5 iterative method with q = 1 ch N N 3 N 4 Note that for d = 1 using an iterative method is pointless. For d = the direct solver with reordering is better than the 1-step min. res. method. For d = 3 the iterative method is clearly better than the direct method. In the case of a symmetric matrix we can construct an iterative method with q = 1 ch. This is the conjugate gradient method which we will discuss next. A. Solving F (u) = b using Richardson iteration or minimal residual method Lemma A.1. Let V be a Hilbert space. Assume that the function F : V V satisfies with constants L, γ > 0 for all u, v V F (v) F (u) L v u (13) F (v) F (u), v u γ v u (14) Then the equation F (u) = b with b V has a unique solution u V. The inverse mapping satisfies for b, c V F 1 (c) F 1 (b) γ 1 c b. (15) Proof. Consider the Richardson iteration u k+1 = G(u k ) with G(u) := u + α(b F (u)) with α > 0. We claim that G is a contraction if α is small: With e := v u we have G(v) G(u) = e α(f (v) F (u)) = e α F (v) F (u), e + α F (v) F (u) (1 αγ + α L ) e. For g(α) := 1 αγ+α L we have g(0) = 1 and g (0) < 0, so G is a contraction for sufficiently small α. It is easy to see that g(α) < 1 for α (0, γ/l ); we can minimize g(α) by choosing α = γ/l and obtain G(v) G(u) (1 γ /L ) 1/ v u. By the contraction mapping theorem the equation G(u) = u F (u) = b has a unique solution. We obtain (15) from γ v u F (v) F (u), v u F (v) F (u) v u. If we know some (possibly nonoptimal) constants L, γ satisfying (13), (14) the Richardson iteration u k+1 = u k + α (b F (u k )) can be used with α = γ/l to find an approximate solution of the nonlinear equation, and we have ) 1/ u k+1 u (1 γ L u k u. 1

If we do not know the constants γ, L we can use a line search for α > 0 such that for u k+1 = u k + αr k the new residual r k+1 = b F (u k+1 ) has minimal norm, i.e., f k (α) := b F (u k + αr k ) becomes minimal: r k+1 = f k (α) = r k + F (u k ) F (u k + αr k ) = r k α 1 F (u k + αr k ) F (u k ), αr k + F (u k + αr k ) F (u k ) (1 αγ + αl ) r k This means that f k (α) < f k (0) for α (0, γ/l ), and f k (α) (1 γ /L )f k (0) for α = γ/l. Assume that our approximate line search yields a value α so that f k (α) < q f k (0) with some q < 1 independent of k, then r k = b F (u k ) q k/ r 0 0 as k Note that (15) implies and u k u γ 1 q k/ r 0 0 as k. u k u γ 1 F (u k ) b Corollary A.. Assume that f : [t 0, T ] R n R n satisfies with constants L > 0, L R for all t [t 0, T ], y, ỹ R n f(t, ỹ) f(t, y) L ỹ y f(t, ỹ) f(t, y), ỹ y L ỹ y Then for t [t 0, T ], y 0 R n the backward Euler equation y = y 0 + hf(t, y) has a unique solution y R n if hl < 1. In particular for L 0 (dissipative problem) there is a unique solution for any h > 0. Proof. Define F : R n R n by F (y) = y hf(t, y). Then F (v) F (u), v u = (v u) h [f(t, v) f(t, u)], v u (1 hl) v u Note that the assertion is independent of L. Let y j, ỹ j be values at time t j. Then the values at time t j+1 = t j +h are given by y j+1 = F 1 (y j ), ỹ j+1 = F 1 (ỹ j ), and we obtain from (15) with γ = 1 hl ỹ j y j 1 1 hl ỹ j y j. Corollary A.3. Let V be a Hilbert space. Assume that the function F : V V satisfies with constants L, γ > 0 for all u, v V F (v) F (u) V L v u [F (v) F (u)] v u γ v u Then the equation F (u) = f with f V has a unique solution u V. Proof. By the Riesz representation theorem there is a linear isometry φ: V V such that f v = φf, v for all v V. Therefore we define F := φ F : V V and can apply the previous Lemma. 13

Corollary A.4. (Lax-Milgram) Let V be a Hilbert space. Assume that the bilinear form a: V V R satisfies with constants L, γ > 0 for all u, v V a(u, v) L u v a(u, u) γ u Then the equation there is a unique u V which satisfies a(u, v) = f v for all v V and we have u γ 1 f V. Proof. Define F : V V by F (u) v := a(u, v). By the definition of V the function F satisfies the assumptions of Cor. 1. The estimate for u follows from γ u a(u, u) = f u f V u. Corollary A.5. Assume A R n n satisfies for all u R n Au, u γ u (16) Then the equation Au = b has for b R n a unique solution and we have A 1 γ 1. It can be found with the following iterative methods: 1. Richardson iteration: Let L := A, then for α (0, γ/l ) the iteration u k+1 = u k + α(b Au k ) (17) converges. In particular, for α = γ/l we have u k+1 u (1 γ /L ) 1/ u k u. A drawback of the method is that we need to know some (possibly nonoptimal) constants γ, L satisfying (7), A L in order to choose α (or we have to experiment with different values of α).. 1-step minimum residual: We use (17) and choose α so that the norm of the new residual r k+1 = b Au k+1 becomes minimal: r k+1 r = k αar k r = k α Ar k, r k + α Ar k i.e., then α k := Ar k, r k Ar k r k+1 r = k Ar k, r k Ar k Therefore the residuals r k = A(u u k ) converge and r k (1 γ /L ) k/ r 0, ) r (1 k γ L ( ) k/ u k u γ 1 1 γ L r 0 This method corresponds to the first step of the GMRES method, or the GMRES(1) method which is restarted after every step. The full GMRES method minimizes the residuals over multiple directions, so the norm of the residual can only be lower. Hence the above estimates for r k and u k u also hold for the GMRES method. 14