Skip to main content

Numerical Methods · Numerical differentiation and quadrature

Two Gauss nodes integrate cubics exactly and miss a concrete quartic

Problem

Numerical Methods practice problem

Work throughout with the standard L2[−1,1]L^2[-1,1] inner product. Let P0≡1P_0\equiv 1, P1(x)=xP_1(x)=x, and P2(x)=(3x2−1)/2P_2(x)=(3x^2-1)/2 denote the first three Legendre polynomials, which are orthogonal on [−1,1][-1,1].

1. Show that the roots of P2P_2 are x±=±1/3x_\pm=\pm 1/\sqrt{3}. Determine the unique weights w±w_\pm that make the interpolatory ruleQ2(f)=w−f(x−)+w+f(x+)Q_2(f)=w_-f(x_-)+w_+f(x_+)exact for f(x)=1f(x)=1 and f(x)=xf(x)=x. Equivalently, evaluate the classical weight formulawi=2(1−xi2)(P2′(xi))2.w_i=\frac{2}{(1-x_i^2)\bigl(P_2'(x_i)\bigr)^2}.Record Q2Q_2 explicitly.

2. Prove that Q2Q_2 is exact for every polynomial of degree at most 33. You may use either the interpolatory error formula or orthogonality of P2P_2 to P1\mathbb P_1. Give a one-line counterexample showing that exactness can fail at degree 44.

3. Let I(f)=∫−11f(x) dxI(f)=\int_{-1}^{1}f(x)\,dx. Compute I(x4)I(x^4) and Q2(x4)Q_2(x^4) as rational numbers, and record the signed error I(x4)−Q2(x4)I(x^4)-Q_2(x^4). Deduce the constant cc in the representation I(p)−Q2(p)=c p(4)I(p)-Q_2(p)=c\,p^{(4)} for every quartic pp. Then, using the three-point Gauss–Legendre nodes 0,±3/50,\pm\sqrt{3/5} and weights 8/9, 5/9, 5/98/9,\,5/9,\,5/9, verify that the three-point rule is exact on x4x^4.

4. Transfer Q2Q_2 to [0,2][0,2] by the affine map t=x+1t=x+1. Write the resulting nodes and weights, evaluate the mapped rule on t↦t3t\mapsto t^3 and on t↦t4t\mapsto t^4, and compare with the exact integrals ∫02t3 dt\int_0^2 t^3\,dt and ∫02t4 dt\int_0^2 t^4\,dt. Explain why the cubic is recovered exactly while the quartic error equals the reference error from part 3.

Do not replace Gauss nodes by Chebyshev extrema or by equispaced Newton–Cotes nodes, and do not invoke an adaptive panel-halving estimator.

Hint

Hint

The even/odd split of the moment system forces w+=w−w_+=w_- as soon as the nodes are symmetric, and the constant-function moment then gives each weight equal to 11.

Check your work

Work the problem yourself first. Then open it in Training to check your answer and read the full worked solution.

The answer check and full solution for this problem come with ProofAnvil Practice membership ($19 USD monthly). See membership. Or start with the free Numerical Methods sample problem: Try the free sample problem.

More Numerical Methods practice problems

Back to Numerical Methods

An original ProofAnvil practice problem, written for this course. ProofAnvil is a practice course, not a homework-answer service.