liveBook · Manning

Maclaurin series

As explained in Geometry for Programmers

A Maclaurin series is a power series representing a function using its derivatives evaluated at zero.

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

Figure 6.10 With more members coming, the approximation gets closer to the original function.
06-10

Visualizes how adding more terms brings a polynomial approximation closer to the original function. section 6.2.1

How Geometry for Programmers covers it

How deep it goes
Explains local accuracy, term-count trade-offs, shifted centers, and SymPy computation, but does not develop convergence theory.
Examples
Uses exponential, sine, and shifted logarithm expansions plus graphical comparisons of linear, quadratic, and longer approximations.
What it assumes
Requires recognizing whether a function is defined and differentiable at zero, while distinguishing Maclaurin from Taylor expansion.
What you can do after
Apply it via SymPy's series function to generate finite polynomial approximations around zero or another expansion point.
How it connects
Connects Maclaurin series with power series, Taylor series, polynomial approximation, interpolation, least-squares methods, and rational functions.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Geometry for Programmers. The section links point to the parts of the book it draws on.