Illustration for Polynomial Detection System
Numerical Analysis & Algorithm Design

Polynomial Detection System

Exact Polynomial Reconstruction

Aug 2025
O(n²)Construction
O(n)Evaluation
ExactCoefficient precision

Look Inside

Overview

I developed a mathematical interpolation system that reconstructs the unique polynomial of degree at most n − 1 through n points with distinct x-values, then determines the lowest degree consistent with those observations. Exact rational arithmetic preserves coefficient precision without floating-point rounding.

What It Delivers

  • Exact interpolation for distinct x-values, with degree detection rather than assuming degree n − 1.
  • Rational coefficients and symbolic expressions suitable for further mathematical analysis.
  • Explicit reporting when no lower-degree polynomial is established by the data.

What I Did

  • Implemented Newton divided differences for incremental polynomial construction and degree identification.
  • Used higher-order zero differences to detect when a lower-degree polynomial explains all supplied points.
  • Represented decimal inputs as rational fractions, performing coefficient calculations exactly.
  • Converted Newton-form polynomials into conventional coefficient form using nested multiplication.
  • Applied Lagrange interpolation and barycentric evaluation for an alternative mathematical representation and efficient plotting.
  • Avoided constructing ill-conditioned Vandermonde systems, using O(n²) construction and O(n) barycentric evaluation after weight preparation.
  • Added symbolic analysis covering factorisation, roots, derivatives and integrals.
  • Accounted for interpolation limitations, including high-degree oscillation and node placement, with Chebyshev sampling guidance.

Outcomes

  • N points in, exact coefficients out, with O(n²) construction.

Proven Impact

  • Exact rational coefficients with no floating-point rounding.
  • Lowest consistent degree detected from the data rather than assumed.

Why It Matters

  • Combined numerical analysis, exact algebra and algorithm design into an interpretable mathematical reconstruction system.
Floating point is an approximation. Fractions are a promise.