Home Random quiz Cards

Chapter 9

Numerical Integration

Rendered from the uploaded full LaTeX source with KaTeX. No PDF, no PDF.js, no image extraction, and no raw LaTeX displayed.

Learning goals

After completing this chapter, the reader should be able to:

  1. derive midpoint, trapezoidal, Simpson, and higher Newton–Cotes rules from interpolation;

  2. prove classical error formulas for elementary and composite quadrature;

  3. distinguish local and global quadrature errors;

  4. use Richardson extrapolation and Romberg integration;

  5. understand the Euler–Maclaurin explanation for the high accuracy of the trapezoidal rule on periodic analytic functions;

  6. construct Gaussian quadrature rules and prove their degree of exactness;

  7. compare Newton–Cotes, Gauss, Clenshaw–Curtis, and adaptive quadrature;

  8. treat endpoint singularities, infinite intervals, and oscillatory integrals by suitable transformations or specialized rules;

  9. understand multidimensional cubature, Monte Carlo, quasi-Monte Carlo, and sparse-grid ideas;

  10. solve basic, advanced, and research-level problems on numerical integration.

The Numerical Integration Problem

The basic problem is to approximate I(f)=\int_a^b f(x)\,\dd x from finitely many values of f. A quadrature rule has the form Q_n(f)=\sum_{j=0}^n w_j f(x_j), where x_j are nodes and w_j are weights.

Key point: Central idea

Numerical integration is usually better conditioned than numerical differentiation. Small high-frequency perturbations may be averaged out by integration, while differentiation amplifies them.

The error is E_n(f)=I(f)-Q_n(f). The main goals are to choose nodes and weights so that E_n(f) is small for the target class of functions.

Interpolatory Quadrature

Let x_0,\ldots,x_n be distinct nodes in [a,b], and let p_n be the interpolating polynomial: p_n(x)=\sum_{j=0}^n f(x_j)\ell_j(x), where \ell_j(x)=\prod_{\substack{0\le m\le n\\m\ne j}} \frac{x-x_m}{x_j-x_m}. Integrating p_n gives the interpolatory quadrature rule Q_n(f)=\int_a^b p_n(x)\,\dd x = \sum_{j=0}^n \left( \int_a^b \ell_j(x)\,\dd x \right) f(x_j). Thus w_j=\int_a^b\ell_j(x)\,\dd x.

Theorem: Polynomial exactness of interpolatory quadrature

An interpolatory quadrature rule with n+1 distinct nodes is exact for every polynomial of degree at most n.

Proof

If p\in\mathbb P_n, then its interpolation polynomial at n+1 distinct nodes is exactly p. Therefore Q_n(p) = \int_a^b p(x)\,\dd x. Hence the rule is exact on \mathbb P_n.

Midpoint, Trapezoidal, and Simpson Rules

The midpoint rule is \int_a^b f(x)\,\dd x \approx (b-a)f\left(\frac{a+b}{2}\right). The trapezoidal rule is \int_a^b f(x)\,\dd x \approx \frac{b-a}{2}\left[f(a)+f(b)\right]. Simpson’s rule is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6} \left[ f(a)+4f\left(\frac{a+b}{2}\right)+f(b) \right].

Figure 9.1 Midpoint and trapezoid panels Two simple rules approximate area in different geometric ways.
Open visual gallery
Theorem: Trapezoidal rule error

If f\in C^2([a,b]), then \int_a^b f(x)\,\dd x - \frac{b-a}{2}\left[f(a)+f(b)\right] = -\frac{(b-a)^3}{12}f''(\xi) for some \xi\in(a,b).

Proof

Let p_1 be the linear interpolant of f at a and b. The interpolation error is f(x)-p_1(x) = \frac{f''(\xi_x)}{2}(x-a)(x-b). By the mean-value theorem for integrals, because (x-a)(x-b)\le0 on [a,b], there exists \xi\in(a,b) such that \int_a^b (f(x)-p_1(x))\,\dd x = \frac{f''(\xi)}{2}\int_a^b (x-a)(x-b)\,\dd x. A direct calculation gives \int_a^b (x-a)(x-b)\,\dd x = -\frac{(b-a)^3}{6}. Thus the error is -\frac{(b-a)^3}{12}f''(\xi).

Theorem: Simpson rule error

If f\in C^4([a,b]), then Simpson’s rule satisfies \int_a^b f(x)\,\dd x - \frac{b-a}{6} \left[ f(a)+4f\left(\frac{a+b}{2}\right)+f(b) \right] = -\frac{(b-a)^5}{2880}f^{(4)}(\xi) for some \xi\in(a,b).

Proof

The Simpson rule is exact for all polynomials of degree at most three. This follows by checking the monomials after mapping [a,b] to [-1,1]. The Peano-kernel form of the interpolation quadrature error then gives an error proportional to the fourth derivative. Evaluating the constant on f(x)=x^4 after the same affine mapping gives -\frac{(b-a)^5}{2880}f^{(4)}(\xi).

Composite Quadrature

Partition [a,b] into N subintervals of length h=\frac{b-a}{N}. The composite trapezoidal rule is T_N(f) = h\left[ \frac12 f(a)+ \sum_{j=1}^{N-1}f(a+jh)+ \frac12 f(b) \right]. The composite midpoint rule is M_N(f) = h\sum_{j=0}^{N-1} f\left(a+\left(j+\frac12\right)h\right). For N even, the composite Simpson rule is S_N(f) = \frac{h}{3} \left[ f(a)+f(b) + 4\sum_{\substack{1\le j\le N-1\\j\text{ odd}}}f(a+jh) + 2\sum_{\substack{2\le j\le N-2\\j\text{ even}}}f(a+jh) \right].

Theorem: Composite trapezoidal error

If f\in C^2([a,b]), then \int_a^b f(x)\,\dd x-T_N(f) = -\frac{b-a}{12}h^2 f''(\xi) for some \xi\in(a,b). Hence the composite trapezoidal rule is second-order accurate.

Proof

On each subinterval [x_j,x_{j+1}], the trapezoidal error is -\frac{h^3}{12}f''(\xi_j). Summing over N subintervals gives -\frac{h^3}{12}\sum_{j=0}^{N-1}f''(\xi_j). Since f'' is continuous, the average of the values f''(\xi_j) equals f''(\xi) for some \xi\in(a,b). Therefore E = -\frac{Nh^3}{12}f''(\xi) = -\frac{b-a}{12}h^2f''(\xi).

Theorem: Composite Simpson error

If f\in C^4([a,b]) and N is even, then \int_a^b f(x)\,\dd x-S_N(f) = -\frac{b-a}{180}h^4f^{(4)}(\xi) for some \xi\in(a,b). Hence the composite Simpson rule is fourth-order accurate.

Proof

Apply the single-panel Simpson error on each pair of subintervals of length 2h. Each panel error is -\frac{(2h)^5}{2880}f^{(4)}(\xi_j) = -\frac{h^5}{90}f^{(4)}(\xi_j). There are N/2 such panels. Summing and using the continuity of f^{(4)}, E = -\frac{N}{2}\frac{h^5}{90}f^{(4)}(\xi) = -\frac{b-a}{180}h^4 f^{(4)}(\xi).

Algorithm
Caption.

Composite Simpson rule

  1. function f, interval [a,b], even integer N

  2. h\gets (b-a)/N

  3. s\gets f(a)+f(b)

  4. For j=1,\ldots,N-1:

  5. If j is odd:

  6. s\gets s+4f(a+jh)

  7. Else:

  8. s\gets s+2f(a+jh)

  9. Return (h/3)s

Newton–Cotes Formulas

Newton–Cotes rules use equally spaced nodes. Closed Newton–Cotes formulas include endpoints; open Newton–Cotes formulas exclude endpoints.

Examples include: \text{trapezoidal rule}, \qquad \text{Simpson rule}, \qquad \text{Simpson }3/8\text{ rule}, \qquad \text{Boole rule}. High-degree Newton–Cotes rules can have negative weights and poor stability.

Warning: High-degree Newton–Cotes warning

Increasing the degree of a Newton–Cotes formula is not always a good idea. Equally spaced high-degree interpolation can be unstable, and the quadrature weights may become large or negative. Composite low-order rules are often safer.

Richardson Extrapolation and Romberg Integration

The composite trapezoidal rule has an asymptotic expansion T(h)=I+C_2h^2+C_4h^4+C_6h^6+\cdots. Richardson extrapolation eliminates the leading h^2 term: R_{1}(h) = \frac{4T(h/2)-T(h)}{3} = I+O(h^4). Repeated extrapolation gives Romberg integration.

Theorem: Romberg extrapolation formula

Let R_{k,0}=T(h_k), \qquad h_k=\frac{b-a}{2^k}. Define R_{k,j} = R_{k,j-1} + \frac{R_{k,j-1}-R_{k-1,j-1}}{4^j-1}, \qquad j=1,\ldots,k. If the trapezoidal expansion contains even powers of h, then R_{k,j} eliminates the first j even-power error terms.

Proof

Assume R_{k,0} = I+c_1h_k^2+c_2h_k^4+\cdots. The standard Richardson calculation shows that combining values at h_k and 2h_k with denominator 4^j-1 cancels the current leading even-power term. Induction on j proves that R_{k,j} eliminates the first j even-power terms.

Algorithm
Caption.

Romberg integration

  1. function f, interval [a,b], maximum level K

  2. For k=0,\ldots,K:

  3. Compute composite trapezoidal approximation R_{k,0} with 2^k panels

  4. For j=1,\ldots,k:

  5. R_{k,j}\gets R_{k,j-1}+\dfrac{R_{k,j-1}-R_{k-1,j-1}}{4^j-1}

  6. Return R_{K,K}

Figure 9.2 Simpson parabolic panel Simpson integrates a quadratic interpolant over pairs of panels.
Open visual gallery

Euler–Maclaurin Formula and Periodic Integrands

The Euler–Maclaurin formula explains the structure of trapezoidal-rule errors: \int_a^b f(x)\,\dd x - T_N(f) = -\sum_{k=1}^{p} \frac{B_{2k}}{(2k)!} h^{2k} \left[ f^{(2k-1)}(b)-f^{(2k-1)}(a) \right] +O(h^{2p+2}). If f is periodic and smooth, then the endpoint derivative differences vanish, which can make the trapezoidal rule extremely accurate. For periodic analytic functions, convergence may be spectral.

Theorem: Spectral behavior of trapezoidal rule for periodic analytic functions

If f is periodic and analytic in a strip around the real axis, then the composite trapezoidal rule converges geometrically with N, up to constants depending on the strip width.

Proof

A periodic analytic function has Fourier coefficients that decay geometrically. The trapezoidal rule samples the Fourier series exactly for modes compatible with the grid and aliases the rest. The quadrature error is therefore controlled by the tail of a geometrically decaying Fourier series, which gives geometric convergence.

Gaussian Quadrature

Gaussian quadrature chooses both nodes and weights to maximize polynomial exactness. For a weight function w(x)>0 on [a,b], the goal is to approximate \int_a^b f(x)w(x)\,\dd x \approx \sum_{j=1}^n \omega_j f(x_j). The nodes are the roots of an orthogonal polynomial of degree n.

For Gauss–Legendre quadrature on [-1,1], w(x)=1, and the nodes are the roots of the Legendre polynomial P_n.

Theorem: Degree of exactness of Gaussian quadrature

An n-point Gaussian quadrature rule associated with a positive weight function is exact for every polynomial of degree at most 2n-1.

Proof

Let p_n be the degree-n orthogonal polynomial whose roots are the quadrature nodes x_1,\ldots,x_n. Let q be any polynomial of degree at most 2n-1. Divide q by p_n: q=p_ns+r, where \deg r\le n-1, \qquad \deg s\le n-1. At the quadrature nodes, q(x_j)=r(x_j), because p_n(x_j)=0. Since the rule is interpolatory on the nodes, it integrates r exactly. Also, by orthogonality, \int_a^b p_n(x)s(x)w(x)\,\dd x=0, because \deg s\le n-1. Therefore \int_a^b q(x)w(x)\,\dd x = \int_a^b r(x)w(x)\,\dd x = \sum_{j=1}^n\omega_jr(x_j) = \sum_{j=1}^n\omega_jq(x_j). Thus the rule is exact through degree 2n-1.

Theorem: Positivity of Gaussian weights

For a positive weight function w, all Gaussian quadrature weights are positive.

Proof

Let \ell_j be the Lagrange cardinal polynomial for the Gaussian nodes. Since the rule is exact for degree 2n-1, it is exact for \ell_j^2, whose degree is 2n-2. Thus \omega_j = \sum_{i=1}^n\omega_i\ell_j(x_i)^2 = \int_a^b \ell_j(x)^2w(x)\,\dd x. The integrand is nonnegative and not identically zero, while w>0. Hence \omega_j>0.

Gauss–Legendre Nodes and Weights

For Gauss–Legendre quadrature on [-1,1], if x_j are roots of P_n, then \omega_j = \frac{2}{(1-x_j^2)[P_n'(x_j)]^2}. For a general interval [a,b], use x=\frac{b-a}{2}t+\frac{a+b}{2}, \qquad \dd x=\frac{b-a}{2}\dd t. Therefore \int_a^b f(x)\,\dd x \approx \frac{b-a}{2} \sum_{j=1}^{n}\omega_j f\left( \frac{b-a}{2}t_j+\frac{a+b}{2} \right).

Algorithm
Caption.

Gauss–Legendre quadrature on [a,b]

  1. function f, interval [a,b], Gauss nodes t_j and weights \omega_j on [-1,1]

  2. s\gets0

  3. For j=1,\ldots,n:

  4. x_j\gets (b-a)t_j/2+(a+b)/2

  5. s\gets s+\omega_jf(x_j)

  6. Return (b-a)s/2

Clenshaw–Curtis Quadrature

Clenshaw–Curtis quadrature uses Chebyshev–Lobatto points x_j=\cos\left(\frac{\pi j}{N}\right), \qquad j=0,\ldots,N. It can be interpreted as integrating a Chebyshev interpolant. Although Gaussian quadrature has higher polynomial exactness for a fixed number of nodes, Clenshaw– Curtis quadrature is often competitive for smooth functions and can be implemented efficiently using cosine transforms.

Chapter summary: Gaussian versus Clenshaw–Curtis quadrature
Gaussian quadrature.

Optimal polynomial exactness for n nodes: degree 2n-1. Excellent for smooth integrands and weighted integrals.

Clenshaw–Curtis quadrature.

Uses nested endpoint-including Chebyshev nodes, is simple to refine adaptively, and is often nearly as accurate for smooth functions.

Practical difference.

Gaussian nodes are not naturally nested, while Clenshaw–Curtis nodes have useful nested structure under dyadic refinement.

Adaptive Quadrature

Adaptive quadrature refines the interval where the estimated error is large. A common strategy compares Simpson approximations on one interval and on two halves.

Let S(a,b) denote Simpson’s rule on [a,b]. Compute S(a,b), \qquad S(a,m)+S(m,b), \qquad m=\frac{a+b}{2}. The difference estimates the error.

Algorithm
Caption.

Adaptive Simpson quadrature

  1. function f, interval [a,b], tolerance \tau

  2. m\gets(a+b)/2

  3. S_1\gets S(a,b)

  4. S_2\gets S(a,m)+S(m,b)

  5. If |S_2-S_1|\le 15\tau:

  6. Return S_2+(S_2-S_1)/15

  7. Else:

  8. Return AdaptiveSimpson(f,a,m,\tau/2) + AdaptiveSimpson(f,m,b,\tau/2)

Theorem: Adaptive Simpson error estimator

If Simpson’s rule has an asymptotic error Ch^4 at the composite level, then \frac{S_2-S_1}{15} is an estimator for the error of the refined approximation S_2.

Proof

Let the exact integral be I. Suppose I-S_1=Ch^4+O(h^6), and halving the step gives I-S_2=C\left(\frac{h}{2}\right)^4+O(h^6) = \frac{C}{16}h^4+O(h^6). Subtracting, S_2-S_1 = (I-\frac{C}{16}h^4)-(I-Ch^4)+O(h^6) = \frac{15}{16}Ch^4+O(h^6). The refined error is I-S_2=\frac{1}{16}Ch^4+O(h^6). Therefore I-S_2\approx\frac{S_2-S_1}{15}.

Gauss–Kronrod Rules

Gauss–Kronrod formulas extend an n-point Gauss rule by adding nodes to obtain a higher-order rule. The difference between the Gauss and Kronrod approximations gives an error estimate. This is a standard mechanism in robust adaptive quadrature codes.

Endpoint Singularities and Transformations

If an integrand has an endpoint singularity, direct polynomial quadrature may converge slowly. For example, \int_0^1 \frac{g(x)}{\sqrt{x}}\,\dd x can be transformed by x=t^2: \int_0^1 \frac{g(x)}{\sqrt{x}}\,\dd x = 2\int_0^1 g(t^2)\,\dd t. Other useful transformations include logarithmic transformations, double-exponential transformations, and variable maps that cluster points near singular endpoints.

Infinite Intervals

Infinite intervals can be treated by transformations. For example, \int_0^\infty f(x)\,\dd x may be transformed using x=\frac{t}{1-t}, \qquad 0<t<1, giving \int_0^\infty f(x)\,\dd x = \int_0^1 f\left(\frac{t}{1-t}\right) \frac{1}{(1-t)^2}\,\dd t. Specialized Gaussian rules are also available: \text{Gauss--Laguerre for }[0,\infty), \qquad \text{Gauss--Hermite for }(-\infty,\infty).

Oscillatory Integrals

Oscillatory integrals such as \int_a^b f(x)e^{i\omega x}\,\dd x are difficult when \omega is large. Standard quadrature may waste many nodes tracking oscillations. Specialized strategies include: \text{Filon-type methods}, \qquad \text{Levin methods}, \qquad \text{stationary phase methods}, \qquad \text{steepest descent transformations}.

Multidimensional Integration

For d-dimensional integration, \int_{\Omega} f(x)\,\dd x, \qquad \Omega\subset\mathbb R^d, tensor-product quadrature uses products of one-dimensional rules. If n nodes are used in each dimension, the total number of nodes is n^d. This exponential growth is the curse of dimensionality.

Alternatives include: \text{sparse grids}, \qquad \text{Monte Carlo}, \qquad \text{quasi-Monte Carlo}, \qquad \text{adaptive cubature}.

Monte Carlo and Quasi-Monte Carlo Integration

Monte Carlo integration estimates I=\int_{\Omega} f(x)\,\dd x by random sampling. If \Omega has volume |\Omega|, then I_N= \frac{|\Omega|}{N}\sum_{j=1}^{N}f(X_j), ] where \(X_j\) are uniformly distributed in \(\Omega\). The typical error is \[ O(N^{-1/2}), independent of dimension in the probabilistic rate, though the variance may depend strongly on dimension.

Quasi-Monte Carlo uses deterministic low-discrepancy points and may achieve better rates for functions of bounded variation.

Figure 9.3 Gaussian nodes and weights Special nodes and weights maximize polynomial exactness.
Open visual gallery

Practical Comparison of Quadrature Methods

Chapter summary: Choosing a quadrature method
Composite trapezoidal.

Simple, robust, second order. Extremely accurate for smooth periodic integrands.

Composite Simpson.

Fourth order and easy to implement. Requires an even number of panels.

Romberg.

Efficient when the trapezoidal error expansion is smooth and even-powered.

Gaussian quadrature.

Very high accuracy for smooth functions and weighted integrals. Excellent when nodes and weights are available.

Clenshaw–Curtis.

Competitive with Gaussian quadrature for smooth functions, nested under refinement, and natural with Chebyshev approximation.

Adaptive Simpson.

Good general-purpose method for one-dimensional integrals with localized difficulty.

Gauss–Kronrod adaptive rules.

A robust standard for production-quality one-dimensional quadrature.

Special transformations.

Essential for singular, infinite-interval, or endpoint-layer integrals.

Monte Carlo.

Useful in high dimension or when deterministic grids are impossible.

Quasi-Monte Carlo.

Often better than Monte Carlo for moderately high-dimensional smooth integrands.

Sparse grids.

Useful compromise between tensor grids and Monte Carlo for moderately high dimension and sufficient smoothness.

Exercises

The following exercise bank is intentionally large. Basic problems test definitions, computations, and essential formulas. Starred exercises require proofs, careful error analysis, or advanced approximation arguments. Problems marked \star, \star\star, and \star\star\star are progressively harder.

Basic problems

Exercise 9.1 Basic Quadrature rule

Define a quadrature rule and identify its nodes and weights.

Exercise 9.2 Basic Interpolatory weights

Derive the formula w_j=\int_a^b\ell_j(x)\,\dd x for interpolatory quadrature.

Exercise 9.3 Basic Midpoint rule

Derive the midpoint rule on [a,b].

Exercise 9.4 Basic Trapezoidal rule

Derive the trapezoidal rule by integrating the linear interpolant through (a,f(a)) and (b,f(b)).

Exercise 9.5 Basic Simpson rule

Derive Simpson’s rule by integrating the quadratic interpolant through a, (a+b)/2, and b.

Exercise 9.6 Basic Degree of exactness

Determine the degree of exactness of the midpoint, trapezoidal, and Simpson rules.

Exercise 9.7 Basic Composite trapezoidal

Write the composite trapezoidal rule for N subintervals.

Exercise 9.8 Basic Composite Simpson

Write the composite Simpson rule for an even number of subintervals.

Exercise 9.9 Basic One numerical computation

Approximate \int_0^1 e^x\,\dd x using the trapezoidal rule with N=4.

Exercise 9.10 Basic Simpson computation

Approximate \int_0^1 \frac{1}{1+x^2}\,\dd x using composite Simpson with N=4.

Exercise 9.11 Basic Trapezoidal error

State the error formula for the single-panel trapezoidal rule.

Exercise 9.12 Basic Simpson error

State the error formula for Simpson’s rule.

Exercise 9.13 Basic Composite order

Explain why the composite trapezoidal rule is second order but the composite Simpson rule is fourth order.

Exercise 9.14 Basic Romberg first extrapolation

Given T(h) and T(h/2), write the first Romberg extrapolation.

Exercise 9.15 Basic Gaussian exactness

What is the degree of exactness of an n-point Gaussian quadrature rule?

Exercise 9.16 Basic Gauss–Legendre mapping

Map a Gauss–Legendre rule from [-1,1] to [a,b].

Exercise 9.17 Basic Adaptive quadrature

Explain the basic idea of adaptive quadrature.

Exercise 9.18 Basic Endpoint singularity

Suggest a change of variables for \int_0^1 \frac{g(x)}{\sqrt{x}}\,\dd x.

Exercise 9.19 Basic Infinite interval

Transform \int_0^\infty f(x)\,\dd x to an integral over [0,1].

Exercise 9.20 Basic Monte Carlo rate

State the standard Monte Carlo convergence rate.

Intermediate problems \star

Exercise 9.21 Intermediate Interpolatory exactness

Prove the referenced result.

Exercise 9.22 Intermediate Trapezoidal error

Prove the referenced result.

Exercise 9.23 Intermediate Simpson error

Prove the referenced result.

Exercise 9.24 Intermediate Composite trapezoidal error

Prove the referenced result.

Exercise 9.25 Intermediate Composite Simpson error

Prove the referenced result.

Exercise 9.26 Intermediate Simpson exactness

Show that Simpson’s rule is exact for all polynomials of degree at most three.

Exercise 9.27 Intermediate Simpson 3/8 rule

Derive Simpson’s 3/8 rule and determine its degree of exactness.

Exercise 9.28 Intermediate Boole rule

Derive Boole’s rule on five equally spaced closed Newton–Cotes nodes.

Exercise 9.29 Intermediate Open Newton–Cotes

Derive the two-point open Newton–Cotes rule on [a,b].

Exercise 9.30 Intermediate Romberg formula

Prove the referenced result.

Exercise 9.31 Intermediate Romberg table

Construct a Romberg table up to level 3 for a smooth test integral.

Exercise 9.32 Intermediate Euler–Maclaurin

State the Euler–Maclaurin formula and explain its connection with trapezoidal-rule errors.

Exercise 9.33 Intermediate Periodic trapezoidal

Explain why the trapezoidal rule is highly accurate for periodic smooth functions.

Exercise 9.34 Intermediate Gaussian degree

Prove the referenced result.

Exercise 9.35 Intermediate Positive Gaussian weights

Prove the referenced result.

Exercise 9.36 Intermediate Two-point Gauss rule

Derive the two-point Gauss–Legendre rule on [-1,1].

Exercise 9.37 Intermediate Three-point Gauss rule

Derive or verify the three-point Gauss–Legendre rule on [-1,1].

Exercise 9.38 Intermediate Clenshaw–Curtis nodes

Write the Clenshaw–Curtis nodes for N=4 and compare them with equally spaced nodes.

Exercise 9.39 Intermediate Adaptive Simpson estimator

Prove the referenced result.

Exercise 9.40 Intermediate Error tolerance splitting

Explain why adaptive algorithms often split the tolerance between subintervals.

Exercise 9.41 Intermediate Singularity-removing substitution

Use x=t^2 to remove the singularity in \int_0^1 \frac{e^x}{\sqrt{x}}\,\dd x.

Exercise 9.42 Intermediate Infinite interval transform

Derive the transformation x=\frac{t}{1-t} for [0,\infty).

Exercise 9.43 Intermediate Monte Carlo unbiasedness

Prove that the basic Monte Carlo estimator is unbiased.

Exercise 9.44 Intermediate Monte Carlo variance

Derive the variance of the standard Monte Carlo estimator.

Exercise 9.45 Intermediate Tensor-product quadrature

Construct a tensor-product quadrature rule on a rectangle.

Advanced problems \star\star

Exercise 9.46 Advanced Peano kernel theorem

State and prove the Peano kernel theorem for quadrature errors.

Exercise 9.47 Advanced Error constants

Derive exact error constants for midpoint, trapezoidal, and Simpson rules.

Exercise 9.48 Advanced Stability of quadrature weights

Analyze the stability of high-order closed Newton–Cotes weights.

Exercise 9.49 Advanced Negative weights

Show that sufficiently high-degree closed Newton–Cotes formulas contain negative weights and discuss why this matters.

Exercise 9.50 Advanced Gaussian quadrature from moments

Derive Gaussian quadrature nodes and weights from moment equations.

Exercise 9.51 Advanced Orthogonal polynomial recurrence

Use the three-term recurrence of orthogonal polynomials to explain the Golub–Welsch algorithm.

Exercise 9.52 Advanced Golub–Welsch algorithm

Derive the Golub–Welsch algorithm for computing Gaussian quadrature rules.

Exercise 9.53 Advanced Gauss–Jacobi quadrature

Study Gaussian quadrature for the weight (1-x)^\alpha(1+x)^\beta on [-1,1].

Exercise 9.54 Advanced Gauss–Laguerre

Derive the role of Gauss–Laguerre quadrature for integrals on [0,\infty) with weight e^{-x}.

Exercise 9.55 Advanced Gauss–Hermite

Explain Gauss–Hermite quadrature for integrals with weight e^{-x^2}.

Exercise 9.56 Advanced Gauss–Kronrod construction

Study the construction of Gauss–Kronrod extensions and their use in adaptive quadrature.

Exercise 9.57 Advanced Clenshaw–Curtis weights

Derive Clenshaw–Curtis weights using Chebyshev expansions.

Exercise 9.58 Advanced Fejer quadrature

Compare Fejer quadrature rules with Clenshaw–Curtis quadrature.

Exercise 9.59 Advanced Exponential convergence

Prove exponential convergence of Gaussian or Clenshaw–Curtis quadrature for analytic functions under suitable assumptions.

Exercise 9.60 Advanced Double-exponential quadrature

Study the tanh–sinh double-exponential rule for endpoint singular integrals.

Exercise 9.61 Advanced Oscillatory Filon method

Derive a Filon-type method for \int_a^b f(x)e^{i\omega x}\,\dd x.

Exercise 9.62 Advanced Stationary phase

Use the stationary phase idea to estimate highly oscillatory integrals.

Exercise 9.63 Advanced Principal value integral

Design a quadrature method for a Cauchy principal value integral.

Exercise 9.64 Advanced Sparse grids

Explain the Smolyak sparse-grid construction.

Exercise 9.65 Advanced Curse of dimensionality

Quantify the curse of dimensionality for tensor-product quadrature.

Exercise 9.66 Advanced Quasi-Monte Carlo

State the Koksma–Hlawka inequality and explain its meaning.

Exercise 9.67 Advanced Importance sampling

Derive the importance sampling estimator and its variance.

Exercise 9.68 Advanced Control variates

Derive the optimal coefficient for a control-variate Monte Carlo estimator.

Exercise 9.69 Advanced Stratified sampling

Analyze variance reduction by stratified sampling.

Exercise 9.70 Advanced Adaptive cubature

Design an adaptive cubature method for a two-dimensional integral.

Research-level problems \star\star\star

Exercise 9.71 Research-level Rigorous adaptive quadrature

Develop a rigorous adaptive quadrature algorithm with certified error bounds for a restricted class of functions.

Exercise 9.72 Research-level Validated integration

Study interval-arithmetic methods for validated numerical integration.

Exercise 9.73 Research-level Arbitrary precision quadrature

Analyze how quadrature strategies change when arbitrary precision arithmetic is available.

Exercise 9.74 Research-level Spectral quadrature for PDEs

Design quadrature rules for spectral element methods and analyze aliasing error.

Exercise 9.75 Research-level Quadrature on manifolds

Study numerical integration on curved surfaces or manifolds.

Exercise 9.76 Research-level Boundary integral singular quadrature

Develop specialized quadrature for weakly singular boundary integral kernels.

Exercise 9.77 Research-level Product integration

Study product integration methods for kernels with known singular factors.

Exercise 9.78 Research-level Fractional integral kernels

Design quadrature for weakly singular fractional kernels such as \int_0^t (t-s)^{-\alpha}f(s)\,\dd s.

Exercise 9.79 Research-level Oscillatory steepest descent

Study numerical steepest descent methods for highly oscillatory integrals.

Exercise 9.80 Research-level Levin collocation

Derive Levin collocation methods for oscillatory integrals.

Exercise 9.81 Research-level Randomized quasi-Monte Carlo

Analyze randomized quasi-Monte Carlo methods and their error estimation.

Exercise 9.82 Research-level High-dimensional Bayesian integration

Study Bayesian cubature and Gaussian-process numerical integration.

Exercise 9.83 Research-level Multilevel Monte Carlo

Derive the multilevel Monte Carlo estimator and its complexity.

Exercise 9.84 Research-level Markov chain Monte Carlo integration

Explain how integration is performed using samples from a Markov chain and analyze autocorrelation effects.

Exercise 9.85 Research-level Sparse-grid error estimates

Prove sparse-grid error estimates for functions with mixed smoothness.

Exercise 9.86 Research-level Adaptive anisotropic sparse grids

Design an adaptive anisotropic sparse-grid method for high-dimensional integration.

Exercise 9.87 Research-level GPU quadrature

Discuss parallel quadrature on GPUs and the difficulty of adaptive load balancing.

Exercise 9.88 Research-level Reproducible quadrature experiments

Design reproducible experiments comparing Newton–Cotes, Gaussian, Clenshaw–Curtis, adaptive, Monte Carlo, and quasi-Monte Carlo methods.

Exercise 9.89 Research-level Integration in machine learning

Study numerical integration methods used in probabilistic machine learning and Bayesian inference.

Exercise 9.90 Research-level Automatic quadrature selection

Design a decision system that selects a quadrature method based on smoothness, dimension, singularities, and oscillations.

Exercise solutions

The solutions below are converted from the uploaded LaTeX solution file. Open an accordion to view the full solution.

This chapter gives detailed worked solutions for the exercises in Chapter 9. Each solution includes the problem formulation, the method, the mathematical derivation, the conclusion, and a diagnostic comment.

Exercise 9.1

Problem formulation.

Define a quadrature rule and identify its nodes and weights.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.2

Problem formulation.

Derive the formula w_j=\int_a^b\ell_j(x)\,\dd x for interpolatory quadrature.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.3

Problem formulation.

Derive the midpoint rule on [a,b].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.4

Problem formulation.

Derive the trapezoidal rule by integrating the linear interpolant through (a,f(a)) and (b,f(b)).

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.5

Problem formulation.

Derive Simpson’s rule by integrating the quadratic interpolant through a, (a+b)/2, and b.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.6

Problem formulation.

Determine the degree of exactness of the midpoint, trapezoidal, and Simpson rules.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.7

Problem formulation.

Write the composite trapezoidal rule for N subintervals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.8

Problem formulation.

Write the composite Simpson rule for an even number of subintervals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.9

Problem formulation.

Approximate \int_0^1 e^x\,\dd x using the trapezoidal rule with N=4.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.10

Problem formulation.

Approximate \int_0^1 \frac{1}{1+x^2}\,\dd x using composite Simpson with N=4.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.11

Problem formulation.

State the error formula for the single-panel trapezoidal rule.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.12

Problem formulation.

State the error formula for Simpson’s rule.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.13

Problem formulation.

Explain why the composite trapezoidal rule is second order but the composite Simpson rule is fourth order.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.14

Problem formulation.

Given T(h) and T(h/2), write the first Romberg extrapolation.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

The composite trapezoidal rule has an even-power expansion T(h)=I+C_2h^2+C_4h^4+\cdots. Using T(h) and T(h/2), eliminate the h^2 term: R_{1,1} = T(h/2)+\frac{T(h/2)-T(h)}{4-1}. In general, R_{k,j} = R_{k,j-1}+ \frac{R_{k,j-1}-R_{k-1,j-1}}{4^j-1}.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.15

Problem formulation.

What is the degree of exactness of an n-point Gaussian quadrature rule?

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.16

Problem formulation.

Map a Gauss–Legendre rule from [-1,1] to [a,b].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.17

Problem formulation.

Explain the basic idea of adaptive quadrature.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.18

Problem formulation.

Suggest a change of variables for \int_0^1 \frac{g(x)}{\sqrt{x}}\,\dd x.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.19

Problem formulation.

Transform \int_0^\infty f(x)\,\dd x to an integral over [0,1].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.20

Problem formulation.

State the standard Monte Carlo convergence rate.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.21

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.22

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.23

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.24

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.25

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.26

Problem formulation.

Show that Simpson’s rule is exact for all polynomials of degree at most three.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.27

Problem formulation.

Derive Simpson’s 3/8 rule and determine its degree of exactness.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.28

Problem formulation.

Derive Boole’s rule on five equally spaced closed Newton–Cotes nodes.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Verify the stationarity residual, feasibility residual, and descent or curvature condition, not only the final numerical value.

Exercise 9.29

Problem formulation.

Derive the two-point open Newton–Cotes rule on [a,b].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Verify the stationarity residual, feasibility residual, and descent or curvature condition, not only the final numerical value.

Exercise 9.30

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

The composite trapezoidal rule has an even-power expansion T(h)=I+C_2h^2+C_4h^4+\cdots. Using T(h) and T(h/2), eliminate the h^2 term: R_{1,1} = T(h/2)+\frac{T(h/2)-T(h)}{4-1}. In general, R_{k,j} = R_{k,j-1}+ \frac{R_{k,j-1}-R_{k-1,j-1}}{4^j-1}.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.31

Problem formulation.

Construct a Romberg table up to level 3 for a smooth test integral.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

The composite trapezoidal rule has an even-power expansion T(h)=I+C_2h^2+C_4h^4+\cdots. Using T(h) and T(h/2), eliminate the h^2 term: R_{1,1} = T(h/2)+\frac{T(h/2)-T(h)}{4-1}. In general, R_{k,j} = R_{k,j-1}+ \frac{R_{k,j-1}-R_{k-1,j-1}}{4^j-1}.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.32

Problem formulation.

State the Euler–Maclaurin formula and explain its connection with trapezoidal-rule errors.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.33

Problem formulation.

Explain why the trapezoidal rule is highly accurate for periodic smooth functions.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.34

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.35

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.36

Problem formulation.

Derive the two-point Gauss–Legendre rule on [-1,1].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.37

Problem formulation.

Derive or verify the three-point Gauss–Legendre rule on [-1,1].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.38

Problem formulation.

Write the Clenshaw–Curtis nodes for N=4 and compare them with equally spaced nodes.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.39

Problem formulation.

Prove the referenced result.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Simpson’s rule integrates the quadratic interpolant through a,\quad m=\frac{a+b}{2},\quad b. The result is \int_a^b f(x)\,\dd x \approx \frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right]. On a uniform composite grid with even n, \int_a^b f(x)\,\dd x \approx \frac{h}{3}\left[ f_0+4\sum_{\text{odd }j}f_j +2\sum_{\substack{\text{even }j\\0<j<n}}f_j+f_n \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.40

Problem formulation.

Explain why adaptive algorithms often split the tolerance between subintervals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.41

Problem formulation.

Use x=t^2 to remove the singularity in \int_0^1 \frac{e^x}{\sqrt{x}}\,\dd x.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.42

Problem formulation.

Derive the transformation x=\frac{t}{1-t} for [0,\infty).

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.43

Problem formulation.

Prove that the basic Monte Carlo estimator is unbiased.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.44

Problem formulation.

Derive the variance of the standard Monte Carlo estimator.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.45

Problem formulation.

Construct a tensor-product quadrature rule on a rectangle.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.46

Problem formulation.

State and prove the Peano kernel theorem for quadrature errors.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.47

Problem formulation.

Derive exact error constants for midpoint, trapezoidal, and Simpson rules.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

On one panel [a,b], interpolate f linearly: p_1(x)=f(a)\frac{b-x}{b-a}+f(b)\frac{x-a}{b-a}. Integrating, \int_a^b p_1(x)\,\dd x = \frac{b-a}{2}\left[f(a)+f(b)\right]. For a composite mesh x_j=a+jh, \int_a^b f(x)\,\dd x \approx h\left[ \frac12 f(x_0)+\sum_{j=1}^{n-1}f(x_j)+\frac12 f(x_n) \right].

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.48

Problem formulation.

Analyze the stability of high-order closed Newton–Cotes weights.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Always test the result on the scalar model equation or Fourier mode and verify the amplification factor satisfies the stated stability bound.

Exercise 9.49

Problem formulation.

Show that sufficiently high-degree closed Newton–Cotes formulas contain negative weights and discuss why this matters.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Verify the stationarity residual, feasibility residual, and descent or curvature condition, not only the final numerical value.

Exercise 9.50

Problem formulation.

Derive Gaussian quadrature nodes and weights from moment equations.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.51

Problem formulation.

Use the three-term recurrence of orthogonal polynomials to explain the Golub–Welsch algorithm.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.52

Problem formulation.

Derive the Golub–Welsch algorithm for computing Gaussian quadrature rules.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.53

Problem formulation.

Study Gaussian quadrature for the weight (1-x)^\alpha(1+x)^\beta on [-1,1].

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.54

Problem formulation.

Derive the role of Gauss–Laguerre quadrature for integrals on [0,\infty) with weight e^{-x}.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.55

Problem formulation.

Explain Gauss–Hermite quadrature for integrals with weight e^{-x^2}.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.56

Problem formulation.

Study the construction of Gauss–Kronrod extensions and their use in adaptive quadrature.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.57

Problem formulation.

Derive Clenshaw–Curtis weights using Chebyshev expansions.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.58

Problem formulation.

Compare Fejer quadrature rules with Clenshaw–Curtis quadrature.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.59

Problem formulation.

Prove exponential convergence of Gaussian or Clenshaw–Curtis quadrature for analytic functions under suitable assumptions.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.60

Problem formulation.

Study the tanh–sinh double-exponential rule for endpoint singular integrals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.61

Problem formulation.

Derive a Filon-type method for \int_a^b f(x)e^{i\omega x}\,\dd x.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.62

Problem formulation.

Use the stationary phase idea to estimate highly oscillatory integrals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.63

Problem formulation.

Design a quadrature method for a Cauchy principal value integral.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.64

Problem formulation.

Explain the Smolyak sparse-grid construction.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.65

Problem formulation.

Quantify the curse of dimensionality for tensor-product quadrature.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.66

Problem formulation.

State the Koksma–Hlawka inequality and explain its meaning.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.67

Problem formulation.

Derive the importance sampling estimator and its variance.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.68

Problem formulation.

Derive the optimal coefficient for a control-variate Monte Carlo estimator.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.69

Problem formulation.

Analyze variance reduction by stratified sampling.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.70

Problem formulation.

Design an adaptive cubature method for a two-dimensional integral.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.71

Problem formulation.

Develop a rigorous adaptive quadrature algorithm with certified error bounds for a restricted class of functions.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.72

Problem formulation.

Study interval-arithmetic methods for validated numerical integration.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.73

Problem formulation.

Analyze how quadrature strategies change when arbitrary precision arithmetic is available.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.74

Problem formulation.

Design quadrature rules for spectral element methods and analyze aliasing error.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.75

Problem formulation.

Study numerical integration on curved surfaces or manifolds.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.76

Problem formulation.

Develop specialized quadrature for weakly singular boundary integral kernels.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.77

Problem formulation.

Study product integration methods for kernels with known singular factors.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.78

Problem formulation.

Design quadrature for weakly singular fractional kernels such as \int_0^t (t-s)^{-\alpha}f(s)\,\dd s.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Check both the singular kernel evaluation and the long-history summation; fractional errors often come from the memory term rather than the algebraic solver.

Exercise 9.79

Problem formulation.

Study numerical steepest descent methods for highly oscillatory integrals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.80

Problem formulation.

Derive Levin collocation methods for oscillatory integrals.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.81

Problem formulation.

Analyze randomized quasi-Monte Carlo methods and their error estimation.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.82

Problem formulation.

Study Bayesian cubature and Gaussian-process numerical integration.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.83

Problem formulation.

Derive the multilevel Monte Carlo estimator and its complexity.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.84

Problem formulation.

Explain how integration is performed using samples from a Markov chain and analyze autocorrelation effects.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.85

Problem formulation.

Prove sparse-grid error estimates for functions with mixed smoothness.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The order claim should be confirmed by a Taylor expansion or a log-log refinement table using a problem with a known exact solution.

Exercise 9.86

Problem formulation.

Design an adaptive anisotropic sparse-grid method for high-dimensional integration.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.87

Problem formulation.

Discuss parallel quadrature on GPUs and the difficulty of adaptive load balancing.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.88

Problem formulation.

Design reproducible experiments comparing Newton–Cotes, Gaussian, Clenshaw–Curtis, adaptive, Monte Carlo, and quasi-Monte Carlo methods.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

An m-point Gauss rule has the form Q_m(f)=\sum_{j=1}^{m}w_jf(x_j). The nodes are chosen as the roots of the orthogonal polynomial of degree m with respect to the weight. This gives exactness for all polynomials of degree \le 2m-1. On [a,b], map reference nodes \xi_j\in[-1,1] by x_j=\frac{b-a}{2}\xi_j+\frac{a+b}{2}, and scale weights by W_j=\frac{b-a}{2}w_j.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

Verify the stationarity residual, feasibility residual, and descent or curvature condition, not only the final numerical value.

Exercise 9.89

Problem formulation.

Study numerical integration methods used in probabilistic machine learning and Bayesian inference.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Exercise 9.90

Problem formulation.

Design a decision system that selects a quadrature method based on smoothness, dimension, singularities, and oscillations.

Method.

Use interpolatory quadrature, exactness degree, Peano/Taylor error terms, extrapolation, Gaussian rules, and adaptive estimates.

Detailed solution and justification.

Quadrature formulas are obtained by integrating an interpolant: \int_a^b f(x)\,\dd x \approx \int_a^b p(x)\,\dd x = \sum_j w_j f(x_j). The degree of exactness is determined by checking monomials 1,x,x^2,\ldots. For smooth functions, the error follows from the interpolation remainder or from Euler–Maclaurin expansion. Adaptive rules compare two approximations of different orders and use their difference as an error estimate.

Conclusion.

The displayed derivation gives the requested formula, proof, or computation. The final expression should be checked against the assumptions and notation of the corresponding chapter.

Diagnostic comment.

The formula should be verified by substitution into the defining equation and, when possible, by a small numerical test.

Interactive tools

The theory and solutions come first. These tools are for review, laboratories, games, memory cards, and randomized assessment.

Professional visualsAnimated diagrams and conceptual graphics. Programming practiceDebug JavaScript/PHP method snippets with corrected code.

Interactive PHP laboratories for this chapter

These experiments run inside the same web page. The student changes the input data and presses Run PHP. Results are returned by the PHP server and displayed immediately.