Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/January 2005

From testwiki
Jump to navigation Jump to search

Problem 1

Given fC[a,b], let pn* denote the best uniform approximation to f among polynomials of degree n, i.e.


maxx[a,b]|f(x)pn(x)|


is minimized by the choice pn=pn*. Let e(x)=f(x)pn*(x). Prove that there are at least two points x1,x2[a,b] such that


|e(x1)|=|e(x2)|=maxx[a,b]|f(x)pn*(x)|


and e(x1)=e(x2)

Solution 1

Since both f(x) and pn*(x) are continuous, so is the function


e(x)=f(x)pn*(x)


and therefore e(x) attains both a maximum and a minimum on [a,b].


Let M=maxx[a,b]e(x) and m=minx[a,b]e(x)


If Mm, then there exists a polynomial q(x)=pn*(x)+M+m2 (a vertical shift of the supposed best approximation pn*(x)) which is a better approximation to f(x).


f(x)q(x)=f(x)pn*(x)M+m2MM+m2=Mm2f(x)q(x)mM+m2=mM2


Therefore,


f(x)q(x)Mm2fpn*=M


Equality holds if and only if m=M.

Problem 2a

Find the node x1 and the weight w1 so that the integration rule


I=01x12f(x)dxw1f(x1)


is exact for linear functions. (No knowledge of orthogonal polynomials is required.)

Solution 2a

Let f(x)=1. Then


011x12=w11


which implies after computation


w1=2


Let f(x)=x. Then


01xx12=w1x1=2x1


which implies after computation


x1=13

Problem 2b

Show that no one-point rule for approximating I can be exact for quadratics.

Solution 2b

Suppose there is a one-point rule for approximating I that is exact for quadratics.


Let f(x)=x2.


Then,


01x2x12=25


but


w1x12=2(13)2=29,


a contradiction.

Problem 2c

In fact


Iw1f(x1)=cf(ξ) for some ξ[0,1]


Find c.

Solution 2c

Let f(x)=x2. Then f(x)=2


Using the values computed in part (b), we have


2529=c2


which implies


c=445

Problem 2d

Let f(x) and g(x) be two polynomials of degree 3. Suppose f and g agree at x=a, x=b, and x=(a+b)/2. Show


abf(x)dx=abg(x)dx

Solution 2d

There exist w1,w2,w3 such that if f(x) is a polynomial of degree 3


abf(x)dx=w1f(a)+w2f(b)+w3f(a+b2)


Hence,


abf(x)dx=w1f(a)+w2f(b)+w3f(a+b2)=w1g(a)+w2g(b)+w3g(a+b2)=abg(x)dx

Problem 3

Let ARn×n be nonsingular and bRn. Consider the following iteration for the solution Ax=b


xk+1=xk+α(bAxk)

Problem 3a

Show that if all eigenvalues of A have positive real part then there will be some real α such that the iterates converge for any starting vector x0. Discuss how to choose α optimally in case A is symmetric and determine the rate of convergence.

Solution 3a

Convergence of any starting vector

Using the iteration xk+1=xk+α(bAxk), we have that


ek+1=xk+1x*=xkx*+α(bAxk)=xkx*+α(Ax*Axk)=ekαAek=(IαA)ek

Then, computing norms we obtain

ek+1IαAek.


In particular, considering 2, we have that

ek+12IαA2ek2.


Now, in order to study the convergence of the method, we need to analyze IαA2. We use the following characterization:

IαA22=ρ((IαA)(IαA)*)=ρ(IαA*αA+|α|2AA*)


Let's denote by λ an eigenvalue of the matrix A. Then ρ((IαA)(IαA)*)<1 implies


12αRe(λ)+α2|λ|2<1


i.e.


2αRe(λ)+α2|λ|2<0


The above equation is quadratic with respect to α and opens upward. Hence using the quadratic formula we can find the roots of the equation to be


α1=0α2=2Re(λ)|λ|2


Then, if Re(λ)>0 for all the eigenvalues of the matrix A, we can find α(0,2Re(λ)|λ|2) such that ρ((IαA)(IαA)*)<1, i.e., the method converges.

Choosing alpha if A symmetric

On the other hand, if the matrix A is symmetric, we have that IαA2=ρ(IαA). Then using the Schur decomposition, we can find a unitary matrix U and a diagonal matrix Λ such that A=U*ΛU, and in consequence,


IαA2=IαΛ2=ρ(IαΛ)=maxi=1,,n(1αλi)


This last expression is minimized if (1αλ1)=(1αλn), i.e, if αopt=2/(λ1+λn). With this optimal value of α, we obtain that


(IαoptΛ)i,i=12λ1+λnλi,


which implies that


IαoptΛ2=λnλ1λ1+λn.


Finally, we've obtained that


ek+12λnλ1λ1+λnek2.

Problem 3b

Show that if some eigenvalues of A have negative real part and some have positive real part, then there is no real α for which the iterations converge.

Solution 3b

If Re(λi)>0 for i=1,2,,n, then convergence occurs if


α(0,2Re(λ)|λ|2)


Hence α>0.


Similarly, if Re(λi)<0 for i=1,2,,n, then convergence occurs if


α(2Re(λ)|λ|2,0)


Hence α<0.


If some eigenvalues are positive and some negative, there does not exist a real α for which the iterations converge since α cannot be both positive and negative simultaneously.

Problem 3c

Let p=IαA<1 for a matrix norm associated to a vector norm. Show that the error can be expressed in terms of the difference between consecutive iterates, namely


xxk+1ρ1ρxkxk+1

(The proof of this is short but a little tricky)

Solution 3c

xxk+1pxxk+1+xk+1xkpxxk+1+pxk+1xk(1p)xxk+1pxk+1xkxxk+1p1pxk+1xk

Problem 3d

Let A be the tridiagonal matrix


(310001310031013)


Find a value of α that guarantees convergence

Solution 3d

By Gerschgorin's theorem, the magnitude of all the eigenvalues are between 1 and 5 i.e.


1<|λ|<5


Therefore,


ρ(IαA)=maxi(|1αλi|)|1α5|


We want


ρ(IαA)<|1α5|<1


Therefore,


0<α<25

Template:BookCat