Tutorials › AP Calculus › Composing Series for Nested Functions

Power Series and Taylor Polynomials · Tutorial 869 of 999

Composing Series for Nested Functions

Use known Maclaurin series to construct polynomial approximations for nested functions, while checking the regularity and degree conditions that make the method valid.

Advanced 9 min read

What You'll Learn

  • Substitute an inner function into a known Maclaurin series when the required regularity conditions hold
  • Choose how many outer-series terms can contribute to a requested polynomial degree
  • Expand powers of the inner expression and discard terms above the target degree
  • Construct Maclaurin polynomials for functions such as e^(x²), sin(2x), and e^(x+x²)
  • Recognize why continuity alone does not guarantee a Maclaurin polynomial

Building a Polynomial for a Nested Function

A function such as \(e^{x^2}\) or \(\sin(2x)\) is built by applying one function to the output of another. When the outer function has a known Maclaurin series, substitution can turn that series into a polynomial approximation for the nested function.

The main task is to keep track of degree. A term that is low degree in the outer variable can become higher degree after substitution; for example, \(u^3\) becomes \(x^6\) when \(u=x^2\). The requested polynomial degree is always measured in \(x\), not in the temporary variable \(u\).

There is also an important condition: the inner function must be sufficiently regular near zero. Knowing only that its value at zero is zero is not enough to guarantee a Maclaurin polynomial.

Definition and Conditions

Definition: The Maclaurin polynomial of degree \(N\) for a function \(f\) is its Taylor polynomial centered at zero through degree \(N\): $$ P_N(x)=\sum_{k=0}^{N}\frac{f^{(k)}(0)}{k!}x^k. $$ Terms whose coefficients are zero may be absent, so the polynomial can have degree less than \(N\).

For the substitution method in this tutorial, suppose the outer function \(F\) is represented by a convergent Maclaurin power series near \(u=0\), and suppose the inner function \(g\) is analytic near \(x=0\) with \(g(0)=0\). Here, analytic means locally representable by a convergent power series. These conditions ensure that \(F(g(x))\) has a Maclaurin expansion near zero.

Key condition: The inner function must have the needed Taylor expansion near zero; in this tutorial, we assume it is analytic there. Continuity and \(g(0)=0\) by themselves ensure that \(g(x)\) approaches zero, but do not ensure that \(F(g(x))\) has a Maclaurin polynomial.

The condition \(g(0)=0\) matters because it makes small \(x\) produce small \(g(x)\), so the known series for \(F\) can be used close to its center. It also means that successive powers of \(g(x)\) begin at successively higher powers of \(x\).

A Truncation Rule

Suppose the known series is \(F(u)=\sum_{k=0}^{\infty}c_k u^k\), and the goal is the Maclaurin polynomial of \(F(g(x))\) through degree \(N\). Since \(g\) is analytic and \(g(0)=0\), it satisfies \(g(x)=O(x)\) near zero: its size is bounded by a constant times \(|x|\) for sufficiently small \(x\). Consequently, \(g(x)^k=O(x^k)\). Outer-series terms with \(k>N\) cannot contribute any power of \(x\) of degree at most \(N\).

Truncation rule: Substitute \(u=g(x)\) into the known series, expand the resulting powers in \(x\), and retain only terms of degree at most \(N\). It is always safe to begin with the outer terms through \(u^N\). If \(g(x)\) begins with a higher power, fewer outer terms may be needed.

For example, if \(g(x)\) begins with a nonzero multiple of \(x^m\), then \(g(x)^k\) begins at degree \(mk\). Only outer terms with \(mk\leq N\) can contribute through degree \(N\). After substitution, expand each needed power of \(g(x)\); stopping before this expansion can miss terms of the requested degree.

Why the Method Works

Here is a justification for the truncation rule. The argument also explains the role of the regularity condition.

1
Use the outer series near zero.
Because \(g\) is continuous and \(g(0)=0\), \(g(x)\) lies in the interval where the series for \(F\) converges whenever \(x\) is sufficiently close to zero. Thus \(F(g(x))=\sum_{k=0}^{\infty}c_k g(x)^k\) there.
2
Count the lowest possible degrees.
Analyticity of \(g\) and \(g(0)=0\) give a local expansion beginning with a term of degree at least one, unless \(g\) is identically zero near zero. Therefore \(g(x)=O(x)\), and \(g(x)^k=O(x^k)\). Terms with \(k>N\) are \(O(x^{N+1})\) or smaller in size near zero and do not affect coefficients through degree \(N\).
3
Expand the remaining powers.
For \(k\leq N\), use the Taylor expansion of \(g\) to multiply out \(g(x)^k\), then collect coefficients of like powers. Discarding powers above \(N\) leaves precisely the terms that can contribute to the Maclaurin polynomial through degree \(N\).

More formally, Taylor expansions of analytic functions converge locally, and products and sums of convergent power series can be collected by powers of \(x\) near zero. Since terms beyond the indicated degree cannot contribute to coefficients of lower degree, this finite calculation gives the Taylor polynomial of the composition. If \(g\) is identically zero near zero, the composition is the constant \(F(0)\), which is immediate.

Worked Example: A Degree-Six Polynomial for \(e^{x^2}\)

Worked Example: A Degree-Six Polynomial for \(e^{x^2}\)

Find the Maclaurin polynomial of degree six for \(f(x)=e^{x^2}\).

The known series is \(e^u=1+u+\frac{u^2}{2!}+\frac{u^3}{3!}+\cdots\). Set \(u=x^2\). Because \(u^k=x^{2k}\), terms through degree six require \(2k\leq 6\), or \(k\leq 3\). Thus

$$ e^{x^2} =1+x^2+\frac{(x^2)^2}{2!}+\frac{(x^2)^3}{3!}+\cdots =1+x^2+\frac{x^4}{2}+\frac{x^6}{6}+\cdots. $$

The terms displayed are all the terms of degree at most six, so the answer is

$$ P_6(x)=1+x^2+\frac{x^4}{2}+\frac{x^6}{6}. $$

To check the truncation, the next outer term is \(u^4/4!=x^8/24\), which has degree eight and cannot change \(P_6\). The remaining series is \(O(x^8)\) near zero, confirming that the displayed polynomial includes every term through degree six.

Worked Example: A Degree-Five Polynomial for \(\sin(2x)\)

Worked Example: A Degree-Five Polynomial for \(\sin(2x)\)

Find the Maclaurin polynomial of degree five for \(f(x)=\sin(2x)\).

Use \(\sin u=u-\frac{u^3}{3!}+\frac{u^5}{5!}-\cdots\), and substitute \(u=2x\). The displayed outer terms become

$$ \sin(2x) =2x-\frac{(2x)^3}{6}+\frac{(2x)^5}{120}+\cdots. $$

Compute each coefficient and power:

$$ (2x)^3=8x^3,\qquad \frac{8x^3}{6}=\frac{4}{3}x^3, $$ $$ (2x)^5=32x^5,\qquad \frac{32x^5}{120}=\frac{4}{15}x^5. $$

Therefore the polynomial is

$$ P_5(x)=2x-\frac{4}{3}x^3+\frac{4}{15}x^5. $$

The next term in the sine series has power \((2x)^7\), of degree seven, so it does not affect the polynomial through degree five. Substitution back into the known series verifies each displayed term and its sign.

Worked Example: Expanding Powers of a More Complicated Inner Function

Worked Example: Expanding Powers of a More Complicated Inner Function

Find the Maclaurin polynomial of degree four for \(f(x)=e^{x+x^2}\).

Let \(g(x)=x+x^2\), and use \(e^u=1+u+\frac{u^2}{2!}+\frac{u^3}{3!}+\frac{u^4}{4!}+\cdots\). Since \(g(x)\) begins with \(x\), terms beyond \(u^4\) have degree at least five. Expand the needed powers:

$$ g(x)^2=(x+x^2)^2=x^2+2x^3+x^4, $$ $$ g(x)^3=(x+x^2)^3=x^3+3x^4+3x^5+x^6, $$ $$ g(x)^4=(x+x^2)^4=x^4+4x^5+6x^6+4x^7+x^8. $$

Substitute these into the exponential series and keep powers through degree four:

$$ e^{x+x^2} =1+(x+x^2)+\frac{x^2+2x^3+x^4}{2} +\frac{x^3+3x^4}{6}+\frac{x^4}{24}+O(x^5). $$

Collect the coefficients. The coefficient of \(x\) is \(1\). The coefficient of \(x^2\) is \(1+\frac12=\frac32\). The coefficient of \(x^3\) is \(1+\frac16=\frac76\). The coefficient of \(x^4\) is \(\frac12+\frac12+\frac1{24}=\frac{25}{24}\). Thus

$$ P_4(x)=1+x+\frac{3}{2}x^2+\frac{7}{6}x^3+\frac{25}{24}x^4. $$

As a check, if \(f(x)=\sum_{n=0}^{\infty}a_nx^n\), then \(f'=(1+2x)f\). Equating coefficients gives \((n+1)a_{n+1}=a_n+2a_{n-1}\), with \(a_0=1\) and \(a_{-1}=0\). This yields \(a_1=1\), \(a_2=\frac32\), \(a_3=\frac76\), and \(a_4=\frac{25}{24}\), matching the polynomial found by substitution.

A Common Pitfall: Assuming Continuity Is Enough

The substitution-and-truncation process is valid only when the composition has the required Taylor expansion. In particular, \(g(0)=0\) and continuity of \(g\) do not suffice.

Worked Example: Why \(g(0)=0\) Does Not Guarantee a Maclaurin Polynomial

Take \(F(u)=u\) and \(g(x)=|x|\). The outer function has the Maclaurin series \(F(u)=u\), and \(g\) is continuous with \(g(0)=0\). Substitution gives \(F(g(x))=|x|\).

A mistaken argument would say that this substitution automatically supplies a Maclaurin polynomial. But \(|x|\) is not differentiable at zero: its left-hand derivative is \(-1\), while its right-hand derivative is \(1\). Therefore it has no Maclaurin polynomial even of degree one. The correction is to check regularity of the inner function (or directly of the composition) before applying the method. The function \(|x|\) is not analytic near zero, so it does not meet the hypothesis used here.

Another frequent error is to choose the number of outer terms by the requested degree without considering the substitution. For \(e^{x^2}\) through degree six, using outer terms through \(u^6\) is unnecessary; terms \(u^4,u^5,u^6\) become powers of \(x\) of degrees eight, ten, and twelve. Conversely, stopping after \(u^2\) would omit the degree-six term. Count degrees after substitution.

Why Composition Is Useful

Many functions encountered in applications are nested: an exponential may have a polynomial in its exponent, or a trigonometric function may have a scaled input. Substitution lets you reuse a known Maclaurin series rather than calculate many derivatives of the entire composite function from scratch.

The method also makes the requested accuracy in degree explicit. First identify the target degree in \(x\); then determine which outer terms can contribute; finally expand and collect. Keeping these steps separate helps prevent both unnecessary algebra and missing terms.

Takeaway: For analytic \(g\) with \(g(0)=0\), substitute \(g(x)\) into a known Maclaurin series for \(F\), expand the necessary powers, and discard terms above the requested degree in \(x\). The regularity hypothesis is essential, not optional.

Check Your Understanding

For each question, identify which powers can affect the requested polynomial before doing any unnecessary expansion.

  1. Which terms of the series for \(e^u\) are needed to find the degree-eight Maclaurin polynomial for \(e^{x^2}\)?
  2. Use the series for cosine to find the degree-four Maclaurin polynomial for \(\cos(3x)\).
  3. For \(e^{x+x^2}\), why can outer-series terms \(u^5\) and above be omitted when finding the degree-four polynomial?
  4. What regularity assumption on the inner function is used in the substitution method here?
  5. Why does \(g(0)=0\) together with continuity fail to guarantee a Maclaurin polynomial for \(F(g(x))\)? Give an example.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon