Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/Jan04 667

From testwiki
Jump to navigation Jump to search

Problem 4a

Consider the boundary value problem


{u(x)+b(x)u(x)=f(x),0x1u(0)=ul,u(1)=ur(1)


where b(x),f(x)C[0,1], and b(x)0. Formulate a difference method for the approximate solution of (1) on a uniform mesh of size h. Explain how u(x) is approximated by a difference quotient

Solution 4a

From Taylor expansion of u(x+h) and u(xh) around x, we have


u(x)=u(x+h)2u(x)+u(xh)h2+u(ξ)12h2


Let P={xi}i=0N+1 be a uniform partition of [0,1] with step size h


Then for i=2,,N1 we have


[1h22h2+b(xi)1h2][ui1uiui+1]=f(xi)


For i=1:


[2h2+b(x1)1h2][u1u2]=f(x1)+ulh2


For i=N:


[1h22h2+b(xN)][uN1uN]=f(xN)+urh2

Problem 4b

Suppose b(x)=0 and ul=ur=0 in (1). Formulate a finite element method for the approximate solution of (1) in this special case, again on a uniform mesh. Using the standard "hat functions" basis for the finite element space, write out the finite element equations explicitly. Show that if an appropriate quadrature formula is used on the right-hand side of the finiite element equations, they (the finite element equations) are the same as the finite difference equations.

Solution 4b

[2h1h1h2h1h1h2h][u1uN]=[01fϕi01fϕN]


Since we are integrating hat functions on the right hand side, an appropriate quadrature formula would be to take half of the midpoint rule. The regular midpoint rule would give double the actual integral value of a hat function.


Therefore 01f(x)ϕi(x)hf(xi)


Then the finite difference method and the finite element method yield the same matrix.

Problem 4c

Show that the matrix in (b) is non singluar.

Solution 4c

Since the matrix is diagonally dominant, it is non-singular.

To show that the matrix has a non-zero determinant, 2n elementary row operation can be used to show that

[2h1h1h2h1h1h2h]

has the same determinant as


[1h2h1h1h2hn+1h]

which is n+1hn0.

Problem 5

Consider the following dissipative initial value problem,


{y+f(y)=0,0x1y(0)=y0(2)


where f:RR is smooth and satisfies 0f(y)


Problem 5a

Write the Backward Euler Method for (2). This gives rise to an algebraic equation. Explain how you would solve this equation.

Solution 5a

Using Taylor Expansion we have


y(xh)=y(x)y(x)h+y(ξ)2h2y(x)=y(xh)+y(x)hy(ξ)2h2y(xn)=y(xn1)+y(xn)f(y(xn))hy(ξ)2h2O(h2)(*)


Thus we have Backwards Euler Method:


yn=yn1hf(yn)(**)


Let eny(xn1)yn

Problem 5b

Derive an error estimate of the form


|y(xn)yn|M2h,n=1,2,


where M=max0x1|y(x)|. Do this directly, not as an application of a standard theorem. (Note that there is no exponential on the right hand side.

Solution 5b

Subtracting (*) and (**), we have


en=en1h[f(y(xn))f(yn)]y(ξ)2h2=en1hf(y(α))eny(ξ)2h2 (by MVT) en2=en1enhf(yα)<0en2y(ξ)2h2enen1eny(ξ)2h2enenen1y(ξ)2h2enen1+y2h2enny2h2M2h

Problem 6


Solution 6

Template:BookCat