How this calculation works
Chebyshev approximation describes a function over an interval using basis polynomials adapted to the standard range [−1,1]. This page estimates projection coefficients from a cosine-node sample set and retains only the requested basis degrees. It uses more sample nodes than retained coefficients, so it is not simply ordinary interpolation through a degree-sized point list. Clenshaw recurrence evaluates the resulting truncated series, and a separate grid compares it with the original function.
u = [x−(a+b)/2]/[(b−a)/2]; p(x) = Σ(k=0..d) cₖTₖ(u), with projection coefficients estimated at cosine nodes.A worked example
For f(x) = x² on [−1,1], retain degree two. Since T0(u) = 1 and T2(u) = 2u² − 1, the exact series is x² = (1/2)T0(x) + (1/2)T2(x). At x = 1/2 the approximation is 1/4. Numerical coefficient estimates and validation errors may contain tiny roundoff terms even in this polynomial example.
Good to know
Degree is 0–30 and interval bounds must increase within ±1,000,000. The query stays inside that interval; sampled function values must be finite within ±10¹². Coefficients are numerical estimates and the maximum error shown is only over 257 validation points. This is not a certified uniform-error bound, an exact symbolic expansion or a guaranteed minimax approximation.
Reference: NIST DLMF — Chebyshev-series expansions (opens in a new tab) ↗
The interval mapping belongs to the approximation
Chebyshev basis polynomials are defined on a normalized coordinate u. A function on [a,b] must be evaluated through the affine mapping between x and u. The same coefficient list used with a different interval generally describes a different function of x. The calculator therefore keeps both bounds and the query visible rather than returning coefficients without their coordinate convention.
Cosine nodes cluster near interval endpoints, and the projection estimate uses at least 64 samples or eight times the number of retained coefficients, whichever is larger. High-frequency information outside the retained degree is discarded. This differs from asking for the unique polynomial through a small arbitrary set of observations. The coefficient table makes the retained basis terms explicit, including the full constant coefficient convention used here.
The Padé approximant calculator from a power series fits a rational local series model rather than this interval-wide truncated polynomial expansion.
A sampled error can miss an unsampled peak
After estimating coefficients, the page checks 257 equally spaced points including both interval ends. It reports the largest absolute discrepancy found there. A narrow feature between those points can be missed, and the original cosine samples can also alias rapid oscillation. A displayed small error therefore supports agreement on those tested points, not an assurance about every point in the interval.
Truncated Chebyshev series often provide useful global approximations, but a true minimax polynomial is defined by minimizing the maximum interval error and requires a different verification problem. The Taylor calculator instead expands locally around a center. The ordinary interpolation calculator accepts data nodes that must be matched exactly. Naming these distinctions avoids publishing the same calculation under several approximation-related keyword titles.
A few questions, answered
Does coefficient c0 include a hidden factor of one half?
No. This page reports the coefficient as it appears in p = c0 + c1T1 + …. Some references write the constant term as a0/2 instead.
Can I use the polynomial outside the interval?
The calculator restricts its query to the fitted interval. Chebyshev basis polynomials can grow rapidly outside [−1,1], making extrapolation especially sensitive.