MATH566 Midterm Test Solution

Present a concise formulation of the theoretical motivation of your answer, and then proceed to solve the following problems.

The specific course concept being verified in each question is listed below.

  1. Consider

    S(x)={ 2 x0 f(x) 0x1 2-x 1x ..

    Determine f(x) as the circular arc such that S(x) is a spline function. With S(k)=dkS/dxk denoting the kth derivative of S(x), up to what k is S(k)(x) continuous?

    Question.

    Course concept: understanding of spline as a piecewise interpolation with continuity up to some degree of the derivative.

    Solution. Sketch S(x)

    Circle x2+y2=2 passes through points (0,2) and (1,1), hence

    y=f(x)=2-x2

    Note that S(0-)=0,S(0+)=-1. Compute y' and obtain

    y'=f'(x)=-x2-x2,f'(0)=0=S(0+),f'(1)=-1=S(0-).

    Conclude that S(x) exhibits continuity in derivative, k1. Recall that second derivative indicates curvature, which a positive constant for a circle, zero for a line segment, hence k=1, S(x) is continuous up to first derivative.

    Note: understanding the significance of a second derivative is more insightful and requires less computational effort than evaluating y''.

  2. Recall the Chebyshev recurrence relation Tn+1(x)=2xTn(x)-Tn-1(x), T0(x)=1, T1(x)=x. Compute the zeros of T3(x) to an accuracy of 3 significant decimal digits.

    Question.

    Course concept: Chebyshev polynomial properties, need for identification of good initial approximation of a root, and understanding of quadratic convergence of Newton's method.

    Solution. Apply recurrence relation to find

    T2(x)=2x2-1,T3(x)=2x(2x2-1)-x=4x3-3x.

    T3(x) has roots x1,2=±3/2 and x3=0. To compute 3 to 3 significant digit start from initial guess

    z0=74,z02=4916=3+1163

    that is at distance 1/16<0.1 from root, and already has two accurate significant digits z01.7. Since Newton's method to find roots of f(z)=z2-3, converges quadratically, a single iteration will lead to at least three accurate significant digits. Newton's iteration is

    zn+1=zn-f(zn)f'(zn)=zn-zn2-32zn=12(zn+3zn),

    and

    z1=12(74+127)=9756,

    leading to x1,2±97/112=0.866.

  3. Write the Lagrange form of the cubic interpolating polynomial p3(t)of data

    𝒟={(-32,0),(0,0),(32,0),(1,1)}.

    What are the coefficients of p3(t) expressed in the monomial basis?

    Question.

    Course concept: Lagrange form, uniqueness of interpolating polynomial.

    Solution. The Lagrange form is

    p3(t)=i=03yii(t)=3(t)=(t+3/2)t(t-3/2)(1+3/2)1(1-3/2).

    Since the interpolating polynomial is unique and the data points contain roots and an additional point on the graph of T3(t), deduce that the monomial expansion of p3(t) is

    p3(t)=T3(t)=4t3-3t.

  4. Find L2(t), the quadratic polynomial within the set {L0(t),L1(t),L2(t),..} orthonormal with respect to the scalar product

    (f,g)=-11f(t)g(t)dt.

    Question.

    Course concept: orthogonality and Gram-Schmidt process.

    Solution. Apply Gram-Schmidt to {1,t,t2}

    Degree 0:

    L0(t)=1(1,1)1/2,(1,1)=-1111dt=2L0(t)=12.

    Degree 1:

    w(t)=t-(t,L0)L0,(t,L0)=12-11tdt=0w(t)=t
    L1(t)=w(t)(w,w)1/2
    (w,w)=-11ttdt=23L1(t)=t32

    Degree 2:

    w(t)=t2-(t2,L0)L0(t)-(t2,L1)L1(t)
    (t2,L1)=0(oddintegrand)
    (t2,L0)=12-11t2dt=232
    w(t)=t2-13,(w,w)=-11(t2-13)2dt=845

    L2(t)=458(t2-13).

  5. The secant method to solve f(x)=0 can be interpreted as a modification of Newton's method

    xn+1=xn-f(xn)f'(xn)=xn-fnfn',

    in which f'(xn)fn' is approximated as

    fn'fn-fn-1xn-xn-1,

    or the derivative of the interpolation of data 𝒟={(xn-1,fn-1),(xn,fn)}. Construct another modification of Newton's method in which fn' is approximated as the derivative of the interpolation of data 𝒟={(xn-2,fn-2),(xn-1,fn-1),(xn,fn)}. What is the expected order of convergence of this method?

    Question.

    Course concept: construction a numerical method using known interpolation forms.

    Solution. The interpolant of 𝒟 in Newton form is

    p2(t)=fn+[fn,fn-1](t-xn)+[fn,fn-1,fn-2](t-xn)(t-xn-1).

    Compute derivative

    p2'(t)=[fn,fn-1]+[fn,fn-1,fn-2](2t-(xn+xn-1)).

    Evaluate at t=xn

    fn'p2'(xn)=[fn,fn-1]+[fn,fn-1,fn-2](xn-xn-1)
    fn'fn-fn-1xn-xn-1+fn-fn-1xn-xn-1-fn-1-fn-2xn-1-xn-2xn-xn-2(xn-xn-1).

    Alternatively, use Lagrange form

    p2(t)=k=02fn-kn-k(t)

    The derivative is

    p2'(t)=k=02fn-kn-k'(t)

    Evaluate n-k'(xn)

    n'(xn)=ddt[(t-xn-1)(t-xn-2)(xn-xn-1)(xn-xn-2)]t=xn=1(xn-xn-1)(xn-xn-2)[xn-xn-2+xn-xn-1]
    n-1'(xn)=ddt[(t-xn)(t-xn-2)(xn-1-xn)(xn-1-xn-2)]t=xn=1(xn-1-xn)(xn-1-xn-2)[xn-xn-2]
    n-2'(xn)=ddt[(t-xn-1)(t-xn)(xn-2-xn-1)(xn-2-xn)]t=xn=1(xn-2-xn-1)(xn-2-xn)[xn-xn-1]

    Obtain

    fn'fnn'(xn)+fn-1n-1'(xn)+fn-2n-2'(xn)

    to replace f'(xn) in Newton's method. Use of a higher degree interpolant implies that the expected convergence rate p should be higher than secant, but lower than Newton which uses the exact f'(xn), ϕ<p<2.