A Maclaurin series approximates a differentiable function with a polynomial built from its derivatives at x = 0. Near zero, adding more terms usually brings the approximation closer to the original function, trading computation speed for precision. section 6.2.1 section 6.2.4
Use the idea with these practical distinctions:
- Treat Maclaurin series as the zero-centered special case of the Taylor series; expanding around another point produces a Taylor series. section 6.2.1 section 6.6
- Shift the input when the target is not defined or differentiable at zero: approximate ln(x + 1), then algebraically rewrite the result if needed. section 6.2.1 section 6.6
- Choose the number of terms according to the application: fewer terms compute quickly but remain less precise, while more terms cost more computation. section 6.2.1
Computing expansions with SymPy
SymPy computes finite series directly. For example, the exponential begins 1 + x + x²/2 + x³/6, while sin(x) begins x − x³/6 + x⁵/120. Expansions around x = 1 instead express terms using powers of (x − 1). section 6.2.1
Visualizes how adding more terms brings a polynomial approximation closer to the original function. section 6.2.1
