A Taylor series builds a polynomial approximation from a function’s derivatives at a chosen center. Centering at zero produces the special case called a Maclaurin series. The resulting polynomial is cheaper to store and compute, while remaining useful over a limited range. section 6.2.1 section 6.2.4
Changing the center makes the method practical when derivatives at zero are unavailable or inconvenient. For example, ln(x) can be expanded around x = 1, while sin(x) around zero produces only odd-degree terms. section 6.2.1 section 6.2.1
Use the polynomial degree to balance computational cost and approximation quality:
- Lower degrees provide cheaper evaluation but may fit the original function poorly. section 6.2.1
- Adding more terms generally brings the approximation closer to the original function in the useful range. section 6.2.1
- Do not confuse Taylor approximation with data fitting: Taylor and Maclaurin use derivatives, whereas least squares approximates supplied data points. section 6.2.4 section 6.7
Generating finite series with SymPy
SymPy’s series function accepts the function, its variable, the center, and a degree limit. For example, series(E**x, x, x0 = 0, n = 6) returns 1 + x + x**2/2 + x**3/6 + x**4/24 + x**5/120 + O(x**6). Similar calls expand ln(x) around 1 or sin(x) around zero.


