
Three nodes sampling a Gaussian ensemble
A dimensionless variable has probability density exp(−x²)/√π. Estimate its mean response to cos(ωx) by a three-node Hermite rule, then compare with the exact Gaussian Fourier transform. Vary the carrier and see whether exact low moments protect every observable.
Open editable notebook · Download .ipynb · Chapter 5 · Gaussian quadrature and exactness

Integrating an infinite endpoint with a finite table of samples
A density rises without bound near the edge of a specimen, yet the total inferred amount can be finite. Choose nodes that measure the edge contribution accurately. Derive the tanh–sinh transformation, split two different quadrature errors and detect when refining a grid can no longer answer the physical question.

How many neighbouring samples belong in a slope estimate?
A wider local fit suppresses measurement noise, yet it can smooth away real changes in slope. Derive the competing errors, then use noisy synthetic data to find which differentiator wins at a chosen spacing.
Open editable notebook · Download .ipynb · Function approximation and numerical integration
Fundamentals / Numerical mathematics / Approximation and quadrature
Approximation and quadrature · Computational notebooks
Change an input, run the Python cells and compare the result with the derivation. You can also download each notebook for Jupyter.