How it’s calculated
The Taylor polynomial of order n matches f and its first n derivatives at the centre a. With a = 0 it is called a Maclaurin polynomial. Close to a it approximates f well, and the remainder Rₙ(x) = f(x) − Pₙ(x) measures the error.
| f(x) | Maclaurin series | Converges for |
|---|---|---|
| eˣ | 1 + x + x²/2! + x³/3! + … | all x |
| sin x | x − x³/3! + x⁵/5! − … | all x |
| cos x | 1 − x²/2! + x⁴/4! − … | all x |
| ln(1 + x) | x − x²/2 + x³/3 − … | −1 < x ≤ 1 |
| 1/(1 − x) | 1 + x + x² + x³ + … | −1 < x < 1 |
About another centre a, ln(1 + x) converges for |x − a| < 1 + a and 1/(1 − x) for |x − a| < |1 − a|: the distance to the point where the function blows up. Outside that interval the calculator warns you, because more terms then make things worse.
Example: eˣ about a = 0 with n = 4 at x = 0.5. P₄(0.5) = 1 + 0.5 + 0.125 + 0.0208333 + 0.0026042 = 1.6484375. The true value e^0.5 = 1.6487213, so the error is about 0.000284, within the Lagrange bound e^0.5 × 0.5⁵/5! ≈ 0.000429.
Frequently asked questions
What is the difference between a Taylor and a Maclaurin series?
A Maclaurin series is simply a Taylor series centred at a = 0. Other centres give powers of (x − a) instead of x.
Why does the approximation get worse for ln(1 + x) at x = 2?
Its Maclaurin series only converges for −1 < x ≤ 1. At x = 2 the terms grow instead of shrinking, so each extra term moves the answer further away. Choose a centre closer to x, such as a = 1.5.
Should sin and cos use degrees or radians?
Radians. The series x − x³/6 + … only works with x in radians; 30° is π/6 ≈ 0.5236.
What is the Lagrange error bound?
A guaranteed ceiling on the error: M|x − a|ⁿ⁺¹/(n + 1)!, where M bounds the next derivative between a and x. The true error is always at or below it.
Embed this calculator
Add this free calculator to your own website. Copy the code below into your page’s HTML:
Need this calculator branded, changed or built around your own prices?See custom business solutions →
Sources
- Calculus Volume 2, §6.3 Taylor and Maclaurin Series (Taylor polynomials and the remainder) — OpenStax
- Calculus Volume 2, §6.1 Power Series and Functions (1/(1 − x) for |x| < 1) — OpenStax
- NIST Digital Library of Mathematical Functions, §4.6 Power Series (ln(1 + z)) — NIST
Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.
Added · Last updated · How we check our calculators
Spotted a mistake or missing option? Report a problem· Suggest a calculator