MATH 661.FA21 Practice Final Examination 2

Solve the problems for your appropriate course track. Problems probe understanding of the course concepts. Formulate your answers clearly and cogently. Sketch out an approach on scratch paper first. Then briefly transcribe the approach to the answer you turn in, followed by appropriate calculations and conclusions, within allotted time. Use concise, complete English sentences in the description of your approach.

Each question is meant to be completely answered and transcribed from proof to final copy within thirty minutes. Concentrate foremost on clear exposition of the concept underlying your approach.

1Track 1

  1. Consider the solution f(t) to

    f(t)=argminp(t)||cost-p(t)||,

    where p(t) is a first-degree polynomial. Is f(t) an acceptable approximation of cost over the interval [0,π/2]? If not, is there a restriction of f to a subinterval [a,b][0,π/2] that is an acceptable approximation?

    Solution. Per equi-oscillation theorem the error e(t)=p(t)-f(t), p(t)=c0+c1t would change sign three times over interval [0,π/2], at 0, ξ,π/2, where ξ is some intermediate point 0<ξ<π/2. This implies e(0)=p(0)-f(0)=p(0)-1>0, hence p(0)>1, an inadmissable value for cosine. An inf-norm approximant q(t)=d0+d1t can be constructed on some interval [a,π/2] such that q(a)=1.

    Figure 1.

  2. Determine the quadrature nodes xi such that

    0e-αtf(t)dt=i=01wif(xi)+e2,

    has maximal order of accuracy.

    Solution. The quadrature error e2 has minimal order for Gauss-Laguerre quadrature with scalar product

    (f,g)=0e-αtf(t)g(t)dt=1α0e-sf(s/α)g(s/α)ds.

    The quadrature nodes are roots of φ2 obtained by orthogonalization of {1,s,s2}. Carry out Gram-Schmidt.

    0

    φ0=1/(1,1)1/2

    (1,1)=0e-sds=1φ0=1.

    1

    φ1=g1/(g1,g1)1/2, g1=s-(s,φ0)φ0

    (s,φ0)=0e-ssds=1,
    g1=s-1
    (g1,g1)=1
    φ1=s-1

    2

    φ2=g2/(g2,g2)1/2, g2=s2-(s2,φ0)φ0-(s2,φ1)φ1

    (s2,φ0)=2,(s2,φ1)=4
    g2=s2-4(s-1)-21=s2-4s+2

    Roots of φ2 are the same as of g2, hence the quadrature nodes are at

    s1,2=2±2,

    or in terms of t

    t1,2=1α(2±2).
    0e-αtf(t)dti=01wif(xi)=w0f(1α(2-2))+w1f(1α(2+2)).

    The weights are determined by imposing moment conditions for 1,t

    0e-αt1dt=1α=w0+w1
    0e-αttdt=1α2=w0(1α(2-2))+w1(1α(2+2)).

  3. For what values a is the matrix

    𝑨=[ 1 a a a 1 a a a 1 ]

    positive definite?

    Solution. 𝑨 is positive definite if for any 𝒃3, 𝒃T𝑨𝒃>0, under which condition 𝑨 is symmetric positive definite, and admits an orthogonal diagonalization

    𝑨=𝑸T𝚲𝑸,

    hence 𝒄T𝚲𝒄>0, with 𝒄=𝑸𝒃, and 𝑨 would need to have positive eigenvalues for it to be positive definite. The eigenvalue problem is

    𝑨𝒙=λ𝒙(𝑨-λ𝑰)𝒙=𝟎,

    and λ is an eigenvalue if the homogeneous system admits a non-trivial solution, or is a root of the characteristic polynomial

    p(λ)=det(𝑨-λ𝑰)=1-3a2+2a3-3λ+3a2λ+3λ2-λ3

    Since

    [ a a a a a a a a a ]

    is of rank 1, λ=a-1 is a double eigenvalue

    p(λ)=(a-1-λ)2(1+2a-λ).

    𝑨 is s.p.d. if

    λ1,2=1+a>0a>-1

    and

    λ3=1+2a>0a>-1/2.

    The more restrictive condition is a>-1/2.

  4. Compute the first three significant digits of eigenvalue λ10 of

    𝑨=[ 2 0 -1 -2 -10 0 -1 -1 4 ].

    Solution. Apply inverse power iteration with shift μ0=10, from starting vector

    𝒗0=[ 1 0 0 ]
    (𝑨-μ𝑰)𝒗1=𝒗0
    [ -8 0 -1 -2 -20 0 -1 -1 -6 ]𝒗1=[ 1 0 0 ]𝒗1=1157[ -20 2 3 ]

    Compute Raleigh quotient to obtain next approximant μ1 of eigenvalue

    μ1=𝒗1T𝑨𝒗1𝒗1T𝒗1=2.4,

    and continue procedure to convergence.

  5. Reduce the matrix 𝑨 above to lower triangular form by a Givens rotation.

    Solution. Only one rotation has to be applied in order to eliminate element 1,3

    [ cosθ 0 -sinθ 0 1 0 sinθ 0 cosθ ][ 2 0 -1 -2 -10 0 -1 -1 4 ]=[ -cosθ-4sinθ ],

    with θ determined from

    cosθ+4sinθ=0tanθ=-14.

2Track 2

  1. Determine the eigenvalues, determinant, and singular values of a Householder reflector.

    Solution. A Householder reflector 𝑯m×m

    𝑯=𝑰-2𝒗𝒗T𝒗T𝒗

    is an orthogonal matrix hence eigenvalues are ±1, determinant is ±1, and singular values are all 1.

  2. Construct a second-order, centered discretization of the Laplacian operator

    2u(xi,yj)

    on a Cartesian grid xi=ih, i=0,..,m+1, yj=jh, j=0,..,n+1. Assume u0j=ui0=um+1,j=ui,n+1=0. Express the discretization as a matrix 𝑨 acting on the vector

    𝒖=[ u11 u21 .. um1 u12 .. umn ]T.

    Present an efficient algorithm to orthonormalize 𝑨, i.e., compute 𝑸𝑹=𝑨.

    Solution. The second-order centered derivative approximation is

    dfdtδf=fi+1/2-fi-1/2hd2fdt2δ2f=fi+1-2fi+fi-1h2.

    The Laplacian at (i,j) is approximated by

    2u(xi,yj)=1h2(ui+1,j+ui,j+1+ui-1,j+ui,j-1-4ui,j),

    with 𝑨 a penta-diagonal matrix

    𝑨=[ -4 1 0 1 1 -4 1 0 1 1 -4 1 ? ].

    Given that 𝑨 is sparse, the most efficient QR factorization is through Givens rotators to eliminate element (i,j)

    Gi,j=[ 1 cosθ -sinθ sinθ cosθ ]
  3. Prove that the eigenvalues of a Hermitian matrix are real. Prove that the eigenvalues of a skew-Hermitian matrix are pure imaginary.

    Solution. Take adjoint of

    𝑨𝒙=λ𝒙𝒙𝑨=𝒙𝑨=λ𝒙

    Multiply first on left by 𝒙, second on right by 𝒙 and obtain

    𝒙𝑨𝒙=λ𝒙𝒙=λ𝒙𝒙

    Since 𝒙𝟎 it results that λ=λ, hence λ is real. Similar proof for skew-hermitian case 𝑨=-𝑨

  4. Find a two-point Gaussian quadrature for the integral

    F(s)=0e-stf(t)dt,s>0.

    Derive the error expression, its leading order, and how it scales with s as s.

    Solution. Upon rescaling

    0e-stf(t)dt=1s0e-uf(us)du.

    See Track 1 for Gauss-Laguerre quadrature, and apply.

  5. Determine the values a,b,c such that

    f(t)={ 3+t-9t2 t[0,1] a+b(t-1)+c(t-1)2+d(t-1)3 t[1,2] .,

    is a cubic spline with knots x0=0, x1=1, and x2=2. Determine d such ||f''||2 is a minimum.

    Solution. At the common node (knot) x1 impose continuity in function and first two derivatives

    -5=a
    -17=b
    -18=2cc=-9.

    Compute

    S(d)=||f''||2=02f(t)dt=01(-18)2dt+12(-18+6d(t-1))2dt

    and impose

    S'(d)=0

    to determine d.