Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/August 2009

From testwiki
Jump to navigation Jump to search

Problem 1

Let A be a real symmetric matrix of order n with n distinct eigenvalues, and let v1Rn be such that v12=1 and the inner product (v1,u)0 for every eigenvector u of A.

Problem 1a

Let Pn denote the space of polynomials of degree at most n1. Show that

p,q(p(A)v1,q(A)v1)

defines an inner product on Pn, where the expression on the right above is the Euclidean inner product in Rn

Solution 1a

Symmetry

p,q=(p(A)v1,q(A)v1)=(q(A)v1,p(A)v1)=q,p

Linearity of 1st Argument

Let α

αp,q=(αp(A)v1,q(A)v1)=α(p(A)v1,q(A)v1)=αp,q

p+r,q=((p(A)+r(A))v1,q(A)v1)=(p(A)v1,q(A)v1)+(r(A)v1,q(A)v1)=p,q+r,q

Positive Definiteness

p,p=(p(A)v1v^,p(A)v1)v^ where v^Rn=(v^,v^)=i=1n(v^i)20

"Zeroness"

We also need to show that p,p=0 if and only if p=0.

Forward Direction (alt)

Suppose p0. It suffices to show p,p0. However, this a trivial consequence of the fact that p(A)v10 (which is clear from the fact that p(A)0 for p0 with degree less than n and that vi does not lie in the orthogonal compliment of any of the n distinct eigen vectors of A).

Forward Direction

Claim: If p,p=0, then p=0.

From hypothesis

v1=i=1nαiui

where ui are the orthogonal eigenvectors of A and all αi are non-zero

p,p,=(p(A)v1,p(A)v1)=(p(A)i=1nαiui,p(A)i=1nαiui)=(i=1nβiui,i=1nβui) (since ui are eigenvectors )=0 (by hypothesis) 

Notice that βi is a linear combination of αi, the coefficients of the polynomial A, and the scaling coefficient mi of the eigenvector e.g. Aui=miui

Since ui0i and αi0, this implies p=0.

Reverse Direction

If p=0, then p,p=(p(A)0v1,p(A)0v1)=0

Problem 1b

Consider the recurrence

βj+1vj+1=Avjαjvjβjvj1

where the αj and βj are scalars and v00. Show that vj=pj1(A)v1, where pj1(t) is a polynomial of degree j1

Solution 1b

By induction.

Base Case

β2v2=Av1α1v1β1v00v2=1β2[Av1α1v1]v2=p1(A)v1p1(t)=1β2[tα1]

β3v3=Av2α2v2β2v1v3=1β3[Av2p2(A)v1α2v2p1(A)v1β2v1p0(A)v1]p2(A)v1

Induction Step

Claim: vj=pj1(A)v1

Hypothesis:

Suppose

vj=pj1(A)v1

vj1=pj2(A)v1

where pj1 (respectively pj2) has degree j1 (respectively j2). Then for βj+10

vj+1=Apj1(A)αjpj1(A)βjpj2(A)βj+1v1

which is as desired.

Problem 1c

Suppose the scalars above are such that αj=(Avj,vj) and βj+1 is chosen so that vj+12=1. Use this to show that that the polynomials in part (b) are othogonal with respect to the inner product from part (a.

Solution 1c

Since vj=pj1(A)v1 and p,q(p(A)v1,q(A)v1), it is equivalent to show that (vi,vj)=0 for ij.

Since

vj+1=1βj+1Avjαjβjvjβj+1βjvj1,

it is then sufficient to show that

(vj+1,vj)=(vj+1,vj1)=0

Claim (vj+1,vj)=0j

By induction.

Base Case

v2=1β2(Av1α1v1)(v2,v1)=1β2[(Av1,v1)α1(Av1,v1)(v1,v1)1]=0

Induction Step

Assume: (vj,vj1)=0

Claim: (vj+1,vj)=0

vj+1=1βj+1[Avjαjvjβjvj1](vj+1,vj)=1βj+1[(Avj,vj)αj(Avj,vj)(vj,vj)1βj(vj1,vj)0]=0

Claim (vj+1,vj1)=0

By induction.

Base Case

v3=1β3[Av2α2v2β2v1](v3,v1)=1β3[(Av2,v1)α2(v2,v1)0β2(v1,v1)1]=1β3[(Av2,v1)β2]=1β3[(v2,Av1)β2] (because A symmetric) =1β3[β2β2]=0 (see below) 

β2v2=Av1α1v1β2(v2,v2)1=(Av1,v2)α1(v1,v2)0β2=(Av1,v2)

Induction Step

Assume: (vj,vj2)=0

Claim: (vj+1,vj1)=0

(vj+1,vj1)=1βj+1[(Avj,vj1αj(vj,vj1)0βj(vj1,vj1)1=1βj+1[(Avj,vj1)βj)]=1βj+1[(vj,Avj1)βj] (because A symmetric)=1βj+1[βjβj]=0 (see below) 

βjvj=Avj1αj1vj1βj1vj2βj(vj,vj)1=(Avj1,vj)αj1(vj1,vj)0βj1(vj2,vj)0βj=(Avj1,vj)

Problem 2

Consider the n-panel trapezoid rule In(f) for calculating the integral 01f(x)dx of a continuous function fC[0,1],

In(f)=k=0n1(tk+1tk2)(f(tk)+f(tk+1))

where 0=t0<t1<...<tn=1

Problem 2a

Find a piecewise linear function G such that

In(f)01f(t)dt=01G(t)f(t)dt

for any continuous function f such that f is integrable over [0,1]. Hint: Find G by applying the fundamental theorem of calculus to tktk+1(f(t)G(t))dt.

Solution 2a

Rewrite given equation on specific interval

For a specific interval [tk,tk+1], we have from hypothesis

(tk+1tk2)(f(tk)+f(tk+1))tktk+1f(t)=tktk+1G(t)f(t)dt.

Distributing and rearranging terms gives

(1)(tk+1tk2)f(tk)+(tk+1tk2)f(tk+1))tktk+1f(t)=tktk+1G(t)f(t)

Apply Hint

Starting with the hint and applying product rule, we get

tktk+1(f(t)G(t))dt=tktk+1f(t)G(t)dt+tktk+1f(t)G(t)dt.

Also, we know from the Fundamental Theorem of Calculus

tktk+1(f(t)G(t))dt=f(tk+1)G(tk+1)f(tk)G(tk).

Setting the above two equations equal to each other and solving for tktk+1f(t)G(t) yields

(2)G(tk)f(tk)+G(tk+1)f(tk+1)tktk+1G(t)f(t)dt=tktk+1G(t)f(t)

Choose G'(t)

Let G(t)=1. Therefore, since G(t) is linear

(3)G(t)=t+b

By comparing equations (1) and (2) we see that

G(tk+1)=tk+1tk2 and

G(tk)=tk+1tk2.

Plugging in either G(tk) or G(tk+1) into equation (3), we get that

b=tk+1+tk2

Hence

G(t)=ttk+1+tk2

Problem 2b

Apply the previous result to f(x)=xα, 0<α<1, to obtain a rate of convergence.

Solution 2b

Problem 3

Let C[a,b] denote the set of all real-valued continuous functions defined on the closed interval [a,b] be positive everywhere in [a,b]. Let {Qn}n=0 be a system of polynomials with degQn=n for each n, orthogonal with respect to the inner product

g,h=abρ(x)g(x)h(x)dx,g,hC[a,b]

For a fixed integer n2, let x1,,xn be the n distinct roots of Qn in (a,b). Let

rk(x)=(xx1)(xxk1)(xxk+1)(xxn)(xkx1)(xkxk1)(xkxk+1)(xkxn),k=1,2,,n

be polynomials of degree n1. Show that

abρ(x)rj(x)rk(x)dx=0,jk

and that

k=1nabρ(x)(rk(x))2dx=abρ(x)dx

Hint: Use orthogonality to simplify abρ(x)(k=1nrk(x))2dx

Solution 3a

abρ(x)rj(x)rk(x)dx=abρ(x)ijxxixjxiikxxixkxidx=abik,ijnxxiijnxjxiQn2i=1nxxiiknxkxinQdx=0

Solution 3b

k=1nabρ(x)(rk(x))2dx=abρ(x)k=1n(rk(x))2dx=abρ(x)(k=1nrk(x))2dx (from part a) =abρ(x)(1)2dx (from claim) =abρ(x)dx

Claim

k=1nrk(x)=1

Proof

Since rk is a polynomial of degree n1 for all k, k=1nrk(x) is a polynomial of degree n1.

Notice that k=1nrk(xi)=1 for i=1,2,,n where xi are the n distinct roots of Qn. Since k=1nrk(x) is a polynomial of degree n1 and takes on the value 1, n distinct times

k=1nrk(x)=1

Template:BookCat