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

From testwiki
Jump to navigation Jump to search

Problem 1

To compute 2, we consider the following Eudoxos iterations: starting with x0=y0=1, we set xn+1=xn+yn followed by yn+1=xn+1+xn. Then yn/xn2


Problem 1a

Explain the Eudoxos method in terms of the power method.

Solution 1a

The iteration can be represented in matrix formulation as follows:


xn+1=xn+ynyn+1=xn+1+xn=2xn+yn


which can be written as


[1121]A[xnyn]=[xn+1yn+1]


Thus the iteration is just the power method since each step is represented by a multiplication by the matrix A.


The power method converges to the eigenvector of the largest eigenvalue.


The eigenvalues of A are computed to be 1±2. Hence the largest eigenvalue is 1+2


The corresponding eigenvector is then


[22]


Then yn/xn2 as desired.


Problem 1b

How many iterations are required for an error |yn/xn2|106


Solution 1b

Since convergence is linear, 7 steps is required to achieve the error bound.

Problem 2

Let {pn(x)} be a sequence of monic polynomials orthogonal on [a,b] with respect to the positive weight function w(x) ( pn has degree n). Show that pn satisfy a three term recursion formula of the form


pn(x)=(xan)pn1(x)bnpn2(x)


Give expressions for the coefficients an and bn

Solution 2a

First notice that pnxpn1Πn1 and therefore we can express it as a linear combination of the monic polynomials of degree n1 or less i.e.


pnxpn1=anpn1bnpn2+i=0n3αipi(*)


Taking the inner product of both side of (*) with pn1 yields from the orthogonality of the polynomials:


xpn1,pn1=anpn1,pn1


Rearranging terms then yields


an=xpn1,pn1pn1,pn1


Similarly, taking the inner product of both side of (*) with pn2 yields from the orthogonality of the polynomials:


bn=xpn1,pn2pn2,pn2


Notice that


xpn1,pn2=pn1,xpn2=pn1,pn1+i=0n2αipi=pn1,pn1


Therefore,


bn=pn1,pn1pn2,pn2


Finally, taking inner product of both side of (*) with pk,k=0,,n3 yields,


αk=xpn1,pkpk,pk


Notice that


xpn1,pk=pn1,xpkΠn2=0


which implies αk=0 for k=0,1,n3

Problem 3a

Find {p0,p1,p2} such that pi is a polynomial of degree i and this set is orthogonal on [0,) with respect to the weight function w(x)=ex


Solution 3a

Using Gram Schmidt with inner product defined as


f,g=0w(x)fgdx


and power basis 1,x,x2 as starting vectors, we get


p0=1


p1=x1


p2=x24x+2

Problem 3b

Find the weights and nodes of the 2 point Gaussian formula


0f(x)exdxw1f(x1)+w2f(x2)


Note: 0xnexdx=n!,0!=1


Solution 3b

Using test functions f(x)=1 and f(x)=x and using the roots of p2 as nodes we find


x1=2+2


x2=22


w1=224


w2=2+24


Template:BookCat