Periodic Functions & Orthogonal Functions — Question 8

PDF ↗

Question 8

Approximate f(x)=|x|f(x)=|x| on [−1,1][-1,1] by a polynomial g(x)=a+bx2g(x)=a+bx^2. Use the squared error ∥f−g∥22=∫−11(f−g)2dx\|f-g\|_2^2=\int_{-1}^1(f-g)^2dx. For this inner product, 11 and p2=x2−1/3p_2=x^2-1/3 are orthogonal, with squared norms 22 and 8/458/45 respectively.

Tasks

  1. Compute the projection coefficients onto 1,p21,p_2 and find the unique polynomial g*g_* minimizing the squared integral error.

  2. Verify directly that the residual is orthogonal to both 11 and x2x^2. Prove the error decomposition that establishes the minimum and uniqueness.

  3. Compute the exact minimum squared error. Sketch ff and g*g_*, and identify where the largest absolute residual occurs.

  4. Does the least-squares optimum also minimize the maximum absolute error? Compare it with h(x)=1/8+x2h(x)=1/8+x^2 and justify your conclusion by exact uniform error bounds.

Original worksheet page 1: question and worked solution for 8-3-008
Show solutionHide solution

Question 8 – Solution

Strategy. Use an orthogonal basis for the integral objective, then test the distinct uniform-error objective separately.

Step 1: Compute the projection. The needed moments are ⟨f,1⟩=1\langle f,1\rangle=1 and ⟨f,p2⟩=1/2−1/3=1/6\langle f,p_2\rangle=1/2-1/3=1/6. Thus g*=12+1/68/45(x2−1/3)=316+1516x2.g_*=\frac 12+\frac{1/6}{8/45}(x^2-1/3) =\boxed{\frac 3{16}+\frac{15}{16}x^2.}

Step 2: Verify residual orthogonality and uniqueness. For r=f−g*r=f-g_*, ∫−11rdx=1−38−58=0,∫−11rx2dx=12−18−38=0.\int_{-1}^1r\,dx=1-\frac 38-\frac 58=0,\qquad \int_{-1}^1rx^2dx=\frac 12-\frac 18-\frac 38=0. For any other g=a+bx2g=a+bx^2, the cross term vanishes, so ∥f−g∥22=∥r∥22+∥g*−g∥22\|f-g\|_2^2=\|r\|_2^2+\|g_*-g\|_2^2. The second term is zero only when the two continuous polynomials agree, proving both optimality and uniqueness.

Step 3: Evaluate the two errors for the optimum. Subtracting the squared projection norm from ∥f∥22=2/3\|f\|_2^2=2/3 gives ∥r∥22=23−12−(1/6)28/45=196.\boxed{\|r\|_2^2=\frac 23-\frac 12-\frac{(1/6)^2}{8/45}=\frac 1{96}.} On [0,1][0,1], r=x−3/16−15x2/16r=x-3/16-15x^2/16 has maximum 19/24019/240 at x=8/15x=8/15, and endpoint values −3/16,−1/8-3/16,-1/8. By evenness, the largest absolute error is ∥r∥∞=3/16\boxed{\|r\|_\infty=3/16}, attained at zero.

Step 4: Disprove uniform optimality. For h=1/8+x2h=1/8+x^2, put t=|x|∈[0,1]t=|x|\in[0,1]. Then f−h=t(1−t)−1/8∈[−1/8,1/8]f-h=t(1-t)-1/8\in[-1/8,1/8], with both extremes attained. Hence ∥f−h∥∞=1/8<3/16\boxed{\|f-h\|_\infty=1/8<3/16}. This competitor proves that the unique least-squares solution is not a uniform best approximation. Different error objectives need not select the same function.

See the diagram in the original worksheet below.

Original worksheet page 2: question and worked solution for 8-3-008

Original worksheet layout. Use Enlarge or open the PDF for a closer view.