How to use it
- Type f(x) and the centre a.
- Choose the degree n, from 0 to 10.
- Enter a point x to compare the polynomial with the real value.
How it works
The polynomial is P(x) = Σ f⁽ᵏ⁾(a) / k! · (x − a)ᵏ for k = 0 to n. Terms with a zero coefficient are left out of the printed text. P(x) is evaluated with Horner’s rule and compared with f(x) computed directly.
Worked example
f(x) = eˣ around 0, degree 4: P(x) = 1 + x + 0.5x² + 0.16666667x³ + 0.041666667x⁴. At x = 1, P(1) = 2.7083333 while e = 2.7182818, so the polynomial is 0.0099485 too small. The first term left out is 1/120 ≈ 0.0083333.
Tips
- Raise the degree or move the centre closer to x to improve accuracy.
- Even functions like cos(x) have only even powers; odd ones like sin(x) only odd powers.