Mathematics / Lagrange Polynomial Interpolation
FREE TO EXPLORE
LABORATORY 21 · MATHEMATICS

Lagrange Polynomial Interpolation lab report

A worked lagrange polynomial interpolation lab report with iteration data tables, logarithmic graphs, calculations, uncertainty and conclusions.

WORKED EXAMPLE · BENCHMARK OBSERVATIONS

A complete example laboratory report.

Simulated demonstration data.

This report illustrates formal numerical analysis, iteration tracking, and convergence rate extraction. Replace its observations with your own computational telemetry when preparing a practical submission.

Student: __________________Student ID: __________________Course: __________________Date: __________________Partner: __________________Instructor: __________________

1. Title and aim

Lagrange Polynomial Interpolation & Uniform Error Bound Convergence. Construct the degree-n Lagrange interpolating polynomial across equidistant nodal abscissas, analyze the nodal basis functions, and quantitatively evaluate uniform error convergence as grid spacing h decreases.

2. Abstract

Six computational trials were executed across standardized inputs Step = 1.0 to Step = 6.0 for Lagrange Polynomial Interpolation & Uniform Error Bound Convergence. An ordinary least-squares regression yielded an empirical Convergence Order (α) of 4.000 order (difference from theoretical reference = 0.0000%). The empirical telemetry conclusively validates the theoretical model and complexity scaling with R² = 1.000000.

3. Apparatus and fixed settings

4. Theory and graph choice

Polynomial interpolation is a bedrock discipline of numerical analysis and scientific computing, forming the mathematical foundation for finite element shape functions, numerical quadrature rules, and predictor-corrector differential equation solvers. Given n + 1 distinct points (x_0, y_0), ..., (x_n, y_n), the Weierstrass approximation theorem guarantees that continuous functions can be approximated arbitrarily well by polynomials, but polynomial interpolation places the stronger demand of exact nodal colocation P_n(x_j) = y_j. In this laboratory, we study the construction of Lagrange interpolating polynomials, analyze the cardinal basis functions, and rigorously track the attenuation of the supremum norm error as the mesh spacing h is systematically halved, validating the theoretical O(h^{n+1}) error asymptotic rate.

ln(E_max) = α · ln(h) + ln(C)

The mathematical regression linearizes the relationship into the form y = mx + b. Here, the independent variable x represents Logarithmic Mesh Spacing ln(h), and the dependent variable y represents Logarithmic Max Error ln(E_max). The slope m directly extracts Convergence Order (α), while the intercept b accounts for residual baseline offsets.

5. Method

  1. Select the analytic test function f(x) = sin(πx) on the normalized interval [0, 1] and configure IEEE 754 double precision registers.
  2. Specify the discretization level k from 1 to 6, setting node count n = 2k + 1 and mesh spacing h = 1.0 / n.
  3. Compute the nodal points x_j = a + j·h and evaluate the cardinal polynomials L_{n,j}(x) ensuring strict unity at x_j and zero at all other nodes.
  4. Construct P_n(x) = ∑_{j=0}^n f(x_j)·L_{n,j}(x) using the numerically robust barycentric formulation to prevent catastrophic cancellation.
  5. Evaluate the interpolation residual |f(x) - P_n(x)| over 1000 interior test points, capturing the maximum error E_max = ||f - P_n||_∞.
  6. Transform mesh spacing and maximum error into logarithmic coordinates (ln(h), ln(E_max)), append to the notebook, and fit the convergence slope α.

6. Observations and calculation table

All iterative observations use strictly controlled 64-bit IEEE 754 precision buffers. Residuals are computed relative to the ordinary least-squares regression line.

Table 1. Six simulated observations; x and y represent transformed mathematical metrics.
No.Mesh Refinement Level (k) (step)Maximum Interpolation Error ||f - P_n||_∞ (error norm)Logarithmic Mesh Spacing ln(h)Logarithmic Max Error ln(E_max)Fitted yResidual
11.00.000357-1.6094-7.9376-7.93760.0000
22.02.2e-05-2.3026-10.7104-10.71040.0000
33.01e-06-2.9957-13.4828-13.48280.0000
44.00.0-3.6889-16.2556-16.25560.0000
55.00.0-4.3820-19.0280-19.02800.0000
66.00.0-5.0752-21.8008-21.80080.0000

Download the sample observations (CSV) ↓

7. Worked calculation for one observation

For step k = 1.0: Logarithmic mesh coordinate x = ln(h) = -1.6094. Logarithmic error y = ln(E) = α · ln(h) + ln(C) = -7.9376. Empirical error: 0.000357.

8. Graph, gradient and final calculation

-23.88-5.49-19.37-4.42-14.87-3.34-10.36-2.27-5.86-1.19Logarithmic Mesh Spacing ln(h)Logarithmic Max Error ln(E_max)

Circular markers represent empirical computational observations. The solid line represents the ordinary least-squares linear fit.

x̄ = -3.34230; ȳ = -14.86920
Σ(x − x̄)² = 8.40810
Σ(x − x̄)(y − ȳ) = 33.63240
m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)² = 4.00000000
b = ȳ − mx̄ = -1.50000000
ln(E) = 4.0000 · ln(h) + -1.5000 ⟹ α = 4.000 (theoretical α = 4.0)

9. Uncertainty and comparison

Percentage difference = |estimate − theoretical value| / |theoretical value| × 100 = 0.0000%.

For n = 6 observations, Σresidual² = 0.00000; s² = Σresidual²/(n − 2). Gradient standard error = √[s²/Σ(x − x̄)²] = 0.00000. Intercept standard error = √[s²(1/n + x̄²/Σ(x − x̄)²)] = 0.00000.

Propagating the fit parameters yields a fit standard error of 1.0000e-04 order, with an ideal coefficient of determination R² = 1.000000.

In computational mathematics and numerical analysis, errors arise from algorithmic discretization, finite precision IEEE 754 floating-point arithmetic (machine epsilon ε_mach ≈ 2.22 × 10⁻¹⁶ for 64-bit double precision), and condition number propagation. The ordinary least-squares fit across n = 6 standardized observations provides standard errors for the gradient and intercept. Because the mathematical recurrence is evaluated with high numerical precision, the residual sum of squares is vanishingly small, yielding a coefficient of determination R² ≥ 0.999999 and confirming the theoretical mathematical model.

10. Result and discussion

Convergence Order (α) = 4.000 order
Theoretical reference value: 4.000 order

The empirical benchmark observations provide rigorous quantitative verification of Lagrange Polynomial Interpolation & Uniform Error Bound Convergence. In numerical analysis, scientific computing, and computational mathematics, algorithms are characterized by their asymptotic operational scaling, stability, and convergence rates. Across all six observations, the empirical slope m = 4.0000 confirms the theoretical model with near-zero residual variance. Furthermore, comparison with alternative algorithmic paradigms underscores critical trade-offs between memory footprint, condition number sensitivity, and operational throughput. The algorithm's behavior confirms the mathematical predictions established by numerical analysis literature.

11. Precautions and limitations

Equidistant high-degree polynomial interpolation suffers from Runge's phenomenon, restricting uniform mesh interpolation to low polynomial degrees. The simulation evaluates the degree-3 Lagrange interpolant on refined sub-elements of width h = 0.20 / 2^{k-1}. The maximum error ||f - P_3||_∞ is measured against the true function across a dense test lattice. The logarithmic fit ln(E) = α·ln(h) + ln(C) extracts the asymptotic order α = 4.000 with R² = 1.000000.

12. Conclusion

This computational laboratory investigation quantitatively verified the mathematical formulation and asymptotic scaling of Lagrange Polynomial Interpolation & Uniform Error Bound Convergence. Through rigorous tracking across six observation points, we confirmed an empirical Convergence Order (α) of 4.000 order matching the theoretical reference 4.000 order within 0.0000% error. The investigation demonstrates why this method serves as an indispensable tool in modern computational science.