Tutorials › Calculus II › Taylor Polynomials of Compositions

Taylor Polynomials · Tutorial 819 of 998

Taylor Polynomials of Compositions

Build a local polynomial model for a composite function by carefully substituting and truncating Taylor polynomials.

Beginner 11 min read

What You'll Learn

  • Identify the centers needed for the inner and outer Taylor polynomials.
  • Substitute the inner centered polynomial into the outer polynomial.
  • Truncate the result at the requested degree without losing relevant terms.
  • Understand why the composition rule works for positive degrees.
  • Handle degree-zero Taylor polynomials using continuity.
  • Recognize and correct a common error in composition calculations.

Why Composition Requires Care

A composite function \(F(g(x))\) is built by applying \(g\) first and then \(F\). Near a point \(x=a\), the inner function may move away from \(b=g(a)\) in a way that affects the outer function’s Taylor polynomial. To approximate the composition accurately, we must use the outer polynomial about \(b\), substitute an approximation to \(g(x)-b\), and retain every resulting term through the desired degree.

The key is not simply to substitute the inner function into the outer polynomial and stop. Powers of the inner expression can create several terms of different degrees, and terms above the requested degree must be removed only after the substitution is expanded.

Definition: Let \(f\) have a Taylor expansion of degree \(n\) at \(c\) if, as \(t\to 0\), \(f(c+t)=\sum_{k=0}^{n}\frac{f^{(k)}(c)}{k!}t^k+o(t^n)\). The polynomial \(\sum_{k=0}^{n}\frac{f^{(k)}(c)}{k!}t^k\), expressed in the variable \(x=c+t\), is its degree-\(n\) Taylor polynomial at \(c\). A sufficient condition for this expansion is that \(f\) have continuous derivatives through order \(n\) near \(c\).

Here \(o(t^n)\) denotes a remainder whose ratio to \(t^n\) tends to zero as \(t\to0\). We use \(h=x-a\) to express the inner expansion near \(a\). If \(b=g(a)\), then the outer expansion must be centered at \(b\), while the inner expansion is centered at \(a\).

The Substitution Rule

Suppose \(g\) has a Taylor expansion of degree \(n\) at \(a\), and \(F\) has one of degree \(n\) at \(b=g(a)\). Write their centered polynomials as

$$ g(a+h)-b=Q_n(h)+o(h^n), \qquad F(b+u)=A_n(u)+o(u^n), $$

where \(Q_n(0)=0\), and \(A_n\) is the outer Taylor polynomial expressed in the displacement \(u\) from \(b\). The composite polynomial is obtained by substituting \(Q_n(h)\) into \(A_n\) and discarding all powers of \(h\) greater than \(n\).

Rule: For \(n\ge 1\), the degree-\(n\) Taylor polynomial of \(F(g(x))\) at \(a\) is the terms of degree at most \(n\) in \(A_n(Q_n(h))\), with \(h=x-a\). This rule applies when the stated Taylor expansions hold for \(g\) at \(a\) and \(F\) at \(g(a)\).

“Terms of degree at most \(n\)” means that after expanding the finite polynomial expression, every term involving \(h^k\) for \(k>n\) is removed. A result may have degree less than \(n\), because some coefficients can vanish.

Worked Example: The Exponential of Sine

Find the degree-3 Taylor polynomial of \(e^{\sin x}\) at \(a=0\). Here \(g(x)=\sin x\), so \(b=g(0)=0\). The degree-3 inner polynomial is \(Q_3(x)=x-\frac{x^3}{6}\), and the degree-3 outer polynomial for \(e^u\) at \(u=0\) is \(A_3(u)=1+u+\frac{u^2}{2}+\frac{u^3}{6}\).

Substitute \(Q_3(x)\) into \(A_3(u)\). To retain terms through degree 3, first calculate the needed powers:

$$ Q_3(x)^2=\left(x-\frac{x^3}{6}\right)^2 =x^2-\frac{x^4}{3}+\frac{x^6}{36}, $$

so only \(x^2\) contributes through degree 3. Also, \(Q_3(x)^3\) has \(x^3\) as its only term through degree 3. Therefore,

$$ \begin{aligned} A_3(Q_3(x)) &=1+\left(x-\frac{x^3}{6}\right) +\frac{1}{2}\left(x^2-\frac{x^4}{3}+\frac{x^6}{36}\right) +\frac{x^3}{6}+\text{terms of degree greater than 3}\\ &=1+x+\frac{x^2}{2} +\left(-\frac{1}{6}+\frac{1}{6}\right)x^3 +\text{terms of degree greater than 3}\\ &=1+x+\frac{x^2}{2}+\text{terms of degree greater than 3}. \end{aligned} $$

The degree-3 Taylor polynomial is \(1+x+\frac{x^2}{2}\); its cubic coefficient is zero. As a check, the cubic contribution from the linear outer term is \(-x^3/6\), while the cubic contribution from the outer cubic term is \(x^3/6\). They cancel, as the substitution calculation shows.

Why the Rule Works

The rule follows by controlling the remainders in the two Taylor expansions. The positive-degree condition matters: it ensures the inner displacement is at most proportional to \(h\) near zero. The degree-zero case is handled separately below.

1
Start with the inner expansion.
For \(n\ge1\), write \(u=g(a+h)-b=Q_n(h)+o(h^n)\). Since \(Q_n(0)=0\), its polynomial terms have degree at least 1, so \(Q_n(h)=O(h)\). Also \(o(h^n)=O(h^n)=O(h)\) near zero. Consequently \(u=O(h)\), and \(u\to0\).
2
Apply the outer expansion.
Write \(F(b+u)=A_n(u)+r(u)\), where \(r(u)=o(u^n)\). Since \(u=O(h)\), the remainder satisfies \(r(u)=o(h^n)\). Indeed, for any \(\varepsilon>0\), sufficiently small nonzero \(u\) gives \(|r(u)|\le\varepsilon |u|^n\); if \(|u|\le C|h|\), then \(|r(u)|\le\varepsilon C^n|h|^n\). At \(u=0\), the remainder is zero.
3
Replace the inner displacement by its polynomial.
Set \(q=Q_n(h)\). Since \(u-q=o(h^n)\) and both \(u\) and \(q\) tend to zero, the polynomial difference \(A_n(u)-A_n(q)\) is \(o(h^n)\). To see this, factor each difference \(u^k-q^k=(u-q)(u^{k-1}+u^{k-2}q+\cdots+q^{k-1})\); the second factor stays bounded near zero.
4
Discard only higher-degree terms.
Every term of \(A_n(Q_n(h))\) is a finite polynomial term. Since \(Q_n(h)=O(h)\) and has no constant term, terms whose degree in \(h\) is greater than \(n\) are \(O(h^{n+1})\), hence \(o(h^n)\). Removing them leaves the degree-\(n\) Taylor polynomial, with total remainder \(o(h^n)\).

This proves the substitution rule for \(n\ge1\): the composite equals the truncated polynomial plus \(o(h^n)\), which is precisely the required Taylor expansion.

For \(n=0\), do not use the \(O(h)\) argument above. A degree-zero Taylor expansion at a point states continuity there: \(g(a+h)=g(a)+o(1)\) and \(F(b+u)=F(b)+o(1)\). Thus \(g\) is continuous at \(a\), \(F\) is continuous at \(b=g(a)\), and \(F(g(a+h))\to F(b)\). The degree-zero Taylor polynomial of the composition is therefore the constant \(F(b)\).

Two More Substitutions

Worked Example: A Logarithm of a Polynomial

Find the degree-3 Taylor polynomial of \(\ln(1+x+x^2)\) at zero. Take \(g(x)=x+x^2\), so \(g(0)=0\). The degree-3 outer polynomial for \(\ln(1+u)\) at \(u=0\) is \(u-\frac{u^2}{2}+\frac{u^3}{3}\). The inner polynomial is \(Q_3(x)=x+x^2\).

Calculate the powers needed for the substitution:

$$ Q_3(x)^2=x^2+2x^3+x^4, \qquad Q_3(x)^3=x^3+3x^4+3x^5+x^6. $$

Keep terms through degree 3 in each expression:

$$ \begin{aligned} Q_3(x)-\frac{Q_3(x)^2}{2}+\frac{Q_3(x)^3}{3} &=(x+x^2)-\frac{x^2+2x^3}{2}+\frac{x^3}{3} +\text{terms of degree greater than 3}\\ &=x+\left(1-\frac12\right)x^2 +\left(-1+\frac13\right)x^3 +\text{terms of degree greater than 3}\\ &=x+\frac{x^2}{2}-\frac{2x^3}{3} +\text{terms of degree greater than 3}. \end{aligned} $$

The answer is \(P_3(x)=x+\frac{x^2}{2}-\frac{2x^3}{3}\). Check the coefficients by differentiating the function: its derivative is \(\frac{1+2x}{1+x+x^2}\). Since \(\frac{1}{1+x+x^2}=1-x+0x^2+O(x^3)\), multiplication gives \(1+x-2x^2+O(x^3)\). This agrees through degree 2 with \(P_3'(x)=1+x-2x^2\).

Worked Example: A Square Root of a Polynomial

Find the degree-3 Taylor polynomial of \(\sqrt{1+x+x^2}\) at zero. Set \(g(x)=x+x^2\) and use the degree-3 outer polynomial \(\sqrt{1+u}=1+\frac{u}{2}-\frac{u^2}{8}+\frac{u^3}{16}+o(u^3)\), valid near \(u=0\).

The inner powers are \(Q_3(x)=x+x^2\), \(Q_3(x)^2=x^2+2x^3+x^4\), and \(Q_3(x)^3=x^3+3x^4+3x^5+x^6\). Substitution and truncation give

$$ \begin{aligned} 1+\frac{Q_3(x)}{2}-\frac{Q_3(x)^2}{8}+\frac{Q_3(x)^3}{16} &=1+\frac{x+x^2}{2}-\frac{x^2+2x^3}{8}+\frac{x^3}{16} +\text{terms of degree greater than 3}\\ &=1+\frac{x}{2}+\left(\frac12-\frac18\right)x^2 +\left(-\frac14+\frac1{16}\right)x^3 +\text{terms of degree greater than 3}\\ &=1+\frac{x}{2}+\frac{3x^2}{8}-\frac{3x^3}{16} +\text{terms of degree greater than 3}. \end{aligned} $$

For a check, let \(P_3(x)=1+\frac{x}{2}+\frac{3x^2}{8}-\frac{3x^3}{16}\). Squaring, the coefficients through degree 3 are: constant \(1\); linear \(2(1)(1/2)=1\); quadratic \((1/2)^2+2(1)(3/8)=1\); cubic \(2(1)(-3/16)+2(1/2)(3/8)=0\). Hence \(P_3(x)^2=1+x+x^2+O(x^4)\). Since both \(P_3(x)\) and \(\sqrt{1+x+x^2}\) are positive near zero, this confirms the stated approximation to the requested degree.

A Common Mistake: Truncating Too Early

A tempting shortcut is to replace the inner function by only its linear term, even when a higher-degree term can affect the answer. For \(e^{\sin x}\), using \(\sin x\approx x\) and then the degree-3 exponential polynomial gives \(1+x+\frac{x^2}{2}+\frac{x^3}{6}\). That misses the cubic contribution \(-x^3/6\) from the actual inner polynomial \(x-x^3/6\).

Correction: Keep the inner Taylor polynomial through the requested degree, substitute it into the outer polynomial, expand the powers, and only then discard terms above that degree. Here the two cubic contributions cancel, so the correct answer is \(1+x+\frac{x^2}{2}\), not \(1+x+\frac{x^2}{2}+\frac{x^3}{6}\).

This method is useful whenever a local model is needed for a function defined through nested operations. The order of substitution and truncation matters: an inner term of degree \(k\) can contribute to the final coefficient of degree \(k\), and powers of lower-degree terms can also contribute to higher coefficients. Keeping the centered expressions organized makes those contributions visible.

Check Your Understanding

For each question, identify the appropriate centers and keep track of the requested degree.

  1. For a composition \(F(g(x))\) expanded at \(x=a\), what point must be the center of the Taylor polynomial for \(F\)?
  2. Why can a term of degree 3 in the inner polynomial affect a degree-3 term in the composition?
  3. Use substitution to find the degree-2 Taylor polynomial of \(e^{x+x^2}\) at zero.
  4. What continuity argument gives the degree-zero polynomial for \(F(g(x))\) at \(a\)?
  5. In what order should you expand and discard terms when constructing a composition polynomial?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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