How this calculation works
Build the finite polynomial around the chosen center and compare its value with the supported function at the target. A center of zero is a Maclaurin expansion. The analytic Lagrange bound measures truncation in exact arithmetic; it does not include floating-point evaluation error.
Tₙ(x) = Σ from k=0 to n of f⁽ᵏ⁾(a)(x−a)ᵏ/k!A worked example
For exp(x) around zero through degree four at x=1, 1+1+1/2+1/6+1/24 = 65/24 ≈ 2.7083333333. The function value is about 2.7182818285.
Good to know
Four supported real functions only, degree 0–30. Trig inputs are radians. log(1+x) requires center and target above −1, and its infinite series need not converge at a distant target even though the finite polynomial is defined. Near-domain-boundary overflow is rejected; no symbolic arbitrary-function expansion.
Reference: OpenStax Calculus: Taylor and Maclaurin series (opens in a new tab) ↗
A center and a degree define the approximation
A Taylor polynomial matches a function’s derivatives at one chosen center. Moving the center changes the polynomial, even when the target x and degree stay the same. Setting the center to zero gives the familiar Maclaurin case.
Degree is the highest included power, rather than the number of nonzero terms. A degree-four sine expansion at zero still has only x−x³/6 because its even-power coefficients vanish. The coefficient table keeps those zero entries visible.
The polynomial tangent calculator isolates the first-order local prediction. A Taylor approximation calculator adds higher-order terms for its stated supported functions.
Compare approximation error with truncation theory
For exp(x) at x=1 around zero, degree four gives 65/24, about 2.7083333333. Subtracting exp(1) gives about −0.0099484951. A negative signed difference means the polynomial is below the function at this particular target.
The analytic truncation bound uses a bound on the next derivative along the real interval from center to target. It is a theoretical exact-arithmetic bound, not a guarantee about a floating-point implementation. Severe cancellation can add numerical error that the displayed bound does not include.
The logarithm needs an extra convergence distinction
A finite log(1+x) Taylor polynomial can be evaluated at a real target greater than −1 even when that target lies beyond the infinite series’ convergence disk around the center. A large degree does not automatically fix an unsuitable expansion center.
The polynomial tangent calculator shows the degree-one local idea through slope and a finite-offset comparison. This page adds higher derivatives for four supported functions; it does not accept arbitrary symbolic expressions or claim that a sampled overlay proves convergence.
A few questions, answered
Do sine and cosine use degrees?
No. Their arguments, centers and targets are in radians.
Why did degree four add no new sine term?
At center zero, the even-order sine derivatives vanish. Degree four includes that zero coefficient; it does not mean four nonzero terms.
Is the truncation bound the measured error?
No. The signed difference compares two floating-point evaluations; the analytic bound concerns the omitted Taylor remainder in exact arithmetic.