Assignment 11 - Solutions to Additional Problems

  1. Consider the inner product <f,g> = ∫0 f(x)g(x)e- xdx. Use the Gram-Schmidt procedure to make {1,x,x2} into an orthonormal set relative to this inner product. (The polynomials you get are called the Laguerre polynomials.)

    Solution We will need the fact that for any integer n ≥ 0, we have
    0 xne- xdx = n!.
    Using this and the Gram-Schmidt process we get the polynomials {1,x-1,½(x2 - 4x + 2)}.

  2. The table below contains data obtained by measuring the concentraion of a drug in a person's blood. Use MATLAB, MAPLE, or other software to find and sketch the straight line that best fits the data in the discrete least squares sense.

    Log of Concentration
    t 0 1 2 3 4
    ln(C)-0.1 -0.4 -0.8 -1.1 -1.5

    Solution Let e = [1 1 1 1 1]T, t = [0 1 2 3 4]T, and y = [-0.1 -0.4 -0.8 -1.1 -1.5]T. To do a least squares straight-line fit y = a + bt to the data, we need to find a and b such that ||y - ae - bt|| is a minimum. The norm and inner product are the standard ones for R5. This is equivalent to finding u in the span of e and t that minimizes ||y - u||. Recall that we showed that there is a unique solution to this problem,

    u* = < y,u1> u1 + < y,u2> u2

    where u1, u2 form an orthonormal basis for the span of e and t. To obtain a and b, we use the Gram-Schmisdt process to find an orthonormal set. First, we let
    u1 = 5e
    Next, we define w2 = t - < t, u1> u1 = t -2e = [-2 -1 0 1 2]T
    and we obtain
    u2 = 10w2.
    Using MATLAB we get < y,u1> = -1.7441 and < y,u2> = -1.1068. Consequently, the minimizer is
    u* = - 1.7441u1 - 1.1068u2.
    We now change back to our original {e,t} basis using
    u1 = 5e and u2 = 10(t -2e).
    The result is:

    u* = - 1.7441×5e - 1.1068×10(t -2e) = - 0.78e -0.35(t -2e) = - 0.08e - 0.35t,

    which yields a = -0.08 and b = -0.35. The line we want is thus y = - 0.08 - 0.35t.

  3. Use the orthonormal basis comprising the normalized Legendre polynomials (Williamson/Trotter, p. 166) to obtain the (quadratic) polynomial in P2 that gives the best continuous least square fit for the function f(x) = e2x on the interval [-1,1]. Use MATLAB, MAPLE, or other software to sketch both the function and the polynomial that fits it.
  4. .

    Solution This problem is really a straightforward application of the minimization results we got earlier. The inner product is the one found in Example 11 on p. 166 of the text. The normalized Legendre polynomials of degree 0, 1, and 2 are found at the bottom of p. 166. To simplify notation here, we will let

    p0(x) = 2-1/2,   p1(x) = (3/2)1/2x,   and   p2(x)= (5/8)1/2(3x2-1).

    The polynomial p(x) that minimizes ||f-q|| among all q in P2 is

    p(x) = < f, p0> p0(x) + < f, p1> p1(x) + < f, p2> p2(x).

    The inner products are all integrals of products of polynomials and exponentials; doing them results in these values:

    < f, p0> = 8-1/2(e2 - e-2)
    < f, p1> = (3/32)1/2(e2 + 3e-2)
    < f, p2> = (5/128)1/2(e2 - 13e-2)

    The final polynomial we get is
    p(x) = (1/4)(e2 - e-2) + (3/8)(e2 + 3e-2)x + (5/32)(e2 - 13e-2)(3x2-1).

    Here is the required plot.