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.
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
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\).
“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:
so only \(x^2\) contributes through degree 3. Also, \(Q_3(x)^3\) has \(x^3\) as its only term through degree 3. Therefore,
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.
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\).
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.
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.
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:
Keep terms through degree 3 in each expression:
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
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\).
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.
- For a composition \(F(g(x))\) expanded at \(x=a\), what point must be the center of the Taylor polynomial for \(F\)?
- Why can a term of degree 3 in the inner polynomial affect a degree-3 term in the composition?
- Use substitution to find the degree-2 Taylor polynomial of \(e^{x+x^2}\) at zero.
- What continuity argument gives the degree-zero polynomial for \(F(g(x))\) at \(a\)?
- In what order should you expand and discard terms when constructing a composition polynomial?