Pick a function, an x, and how many terms to sum. Plots the partial sum against the real curve so you can watch the polynomial hug it near zero and peel away outside the radius of convergence , with the error at each term count alongside.
Function
sin(x) = x - x³/3! + x⁵/5! - x⁷/7! + ...
3 terms at x = 1
0.8416666667
exact 0.8414709848 · off by 1.957e-4
Partial Sum vs The Real Curve (x from -6.28 to 6.28)
Error by Term Count
| Terms | Approximation | Abs Error | Digits Correct |
|---|---|---|---|
| 1 | 1 | 1.585e-1 | 0 |
| 2 | 0.8333333333 | 8.138e-3 | 2 |
| 3 ← | 0.8416666667 | 1.957e-4 | 3 |
| 5 | 0.8414710097 | 2.489e-8 | 7 |
| 10 | 0.8414709848 | 0 | 16 |
| 20 | 0.8414709848 | 0 | 16 |
Term by Term (what each term adds at x = 1)
marduc812
© 202620260824_1c411cc