MATH661 EC - Least squares, minimax

Posted: 10/25/23

Due: 11/08/23, 11:59PM

Time constraints and clasas cancellation at time of H01 did not allow a computational assignment on least squares and minimax approximation. These are important topics to explore numerically so this assignment is offered as extra credit, with 4 course points for the first three questions. These correspond to a normal homework assignment effort. An additional 3 course points are awarded to correct solution of the fourth question on the Remez algorithm. For Track 1 a solution is to be sought by computer-aided calculation, and for Track 2 a general implementation is required. The effort requried for this single question is comparable to a full homework assignment.

1Track 1

  1. Apply the Gram-Schmidt process to {1,t,t2} to obtain the first three Legendre polynomials P0,P1,P2, orthonormal with respect to the scalar product

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

    Show intermediate steps. Check hand calculations with symbolic integration packages.

  2. Find the best approximant of f(t)=1+cos(πt)+sin(πt) in the Hilbert space =(C(),,+,) with scalar product and norm

    (f,g)=-11f(t)g(t)dt,||f||=(f,f)1/2.
  3. Find the best inf-norm approximant by g(t)=a+bt of f(t)=1+cos(πt)+sin(πt), f:[0,1].

    1. By the equioscillation theorem, the solution is a line that intersects the graph of f twice such that the error e(t)=f(t)-g(t) has three extrema of equal absolute value at 0,x,1, with e stationary at t=x. Write the four equations that arise

    2. Solve the above problem, and plot f,g.

  4. Extra credit (3 points). Apply the Remez algorithm to Q3

2Track 2

  1. Find and plot the first six members of the orthonormal basis obtained from applying the Gram-Schmidt algorithm to {1,t,t2,} with the scalar product

    (f,g)=-01f(t)g(t)log(1-t)dt.
  2. Find and plot the best approximants of

    f(t)=tan(πt2),

    in span(n) for n={l0(t),l1(t),,ln(t)} and scalar product from problem 1, for n=1,2,3,4,5,6.

    1. First, carry out analytical computations. Symbolic computation software (Maple, Mathematica, Maxima) is allowed. Maxima is available in the SciComp@UNC virtual machine.

    2. For each n, form the matrix 𝑳=[ l0(𝒕) l1(𝒕) 𝒍n(𝒕) ]m×n at sample points 𝒕 within [0,1] and mn. Solve the least squares problem

      min𝒄||𝑳𝒄-f(𝒕)||.

      in the Euclidean two-norm. Plot the numerically determined approximants

      p(t)=n(t)𝒄

      together with the analytically determined approximants, and compare.

  3. Apply the Remez algorithm to find the best inf-norm approximant by a quadratic of f:[0,1], f(t)=sin(πt). Establish your own convergence criteria.

  4. Extra credit (3points). Implement the Remez algorithm. Use whatever root-finding routine is available within the programming environment (e.g., Roots for Julia) to solve the extrema conditions f'(x)-p'(x) needed in the Remez algorithm.