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
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.
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\).
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.
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.
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\).
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
The terms displayed are all the terms of degree at most six, so the answer is
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
Compute each coefficient and power:
Therefore the polynomial is
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:
Substitute these into the exponential series and keep powers through degree four:
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
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.
Check Your Understanding
For each question, identify which powers can affect the requested polynomial before doing any unnecessary expansion.
- Which terms of the series for \(e^u\) are needed to find the degree-eight Maclaurin polynomial for \(e^{x^2}\)?
- Use the series for cosine to find the degree-four Maclaurin polynomial for \(\cos(3x)\).
- For \(e^{x+x^2}\), why can outer-series terms \(u^5\) and above be omitted when finding the degree-four polynomial?
- What regularity assumption on the inner function is used in the substitution method here?
- Why does \(g(0)=0\) together with continuity fail to guarantee a Maclaurin polynomial for \(F(g(x))\)? Give an example.