maths.freeCalculus › 8. Taylor Polynomials and Taylor Series › Finding and using Taylor series

Finding and using Taylor series

So far, we have focused our attention on a collection of five basic functions functions \frac{1}{1-x}, \ln(1+x), \sin(x), \cos(x), and e^x and their Taylor series centered at a = 0.

Introduction

So far, we have focused our attention on a collection of five basic functions functions \(\frac{1}{1-x}\), \(\ln(1+x)\), \(\sin(x)\), \(\cos(x)\), and \(e^x\) and their Taylor series centered at \(a = 0\). One of the reasons we were able to find these Taylor series is the patterns that arise in the derivatives of each of these functions. While we can always use Definition to find the first few terms of the Taylor series, for most functions it is much more challenging to find a pattern among the various derivatives that allows us to state the general \(n^{\text{th}}\) term of the series.

In Preview Activity, we explore this issue and investigate a different approach to finding the Taylor series of a given function.

Exploration
Exploration

Using substitution and algebra to find new Taylor series expressions

The substitution technique we used in Preview Activity can be used to find the Taylor series for any function whose structure is similar to that of a Taylor series we already know.

Example

Find the Taylor series expansion for \(g(x) = x^4 \cos(x^3)\) and determine the set of all \(x\)-values for which the series converges.

Solution

Because \(\cos(x^3)\) is part of the function whose Taylor series we seek, we start with the familiar series for \(\cos(x)\). We know that \[\begin{aligned}\end{aligned}\] for all real numbers \(u\).

By letting \(u = x^3\) in Equation, it follows that \[\begin{aligned}\end{aligned}\], so \[\begin{aligned}\end{aligned}\]. Then, multiplying both sides of Equation by \(x^4\), we find that \[\begin{aligned}\end{aligned}\]. Since Equation is valid for every real number \(u\), letting \(u = x^3\) tells us that Equation is valid for every real number \(x\). The Ratio Test can be used to show that multiplying every term of a Taylor series by the same power of \(x\) does not change the set of \(x\)-values for which the series converges, so the Taylor series for \(g(x)\) also converges for every value of \(x\).

Because the approaches in Preview Activity and Example each require us to use a known Taylor series, we restate the Taylor series we've established so far for \(5\) important functions in Table. These \(5\) Taylor series will also be valuable when we soon learn another approach for finding series representations of other more complicated functions.

\(f(x)\)Taylor series, \(T_f\), centered at \(0\)\(f(x) = T_f(x)\)
\(\frac{1}{1-x}\)\(\sum_{k=0}^{\infty} x^k = 1 + x + x^2 + x^3 + \cdots\)if \(|x| \lt 1\)
\(\ln(1+x)\)\(\sum_{k=1}^{\infty} (-1)^{k-1} \frac{x^k}{k} = x - \frac{1}{2}x^2 + \frac{1}{3}x^3 - \cdots\)if \(|x| \lt 1\)
\(\sin(x)\)\(\sum_{k=0}^{\infty} (-1)^{k} \frac{x^{2k+1}}{(2k+1)!} = x - \frac{1}{3!}x^3 + \frac{1}{5!}x^5 - \cdots\)for all real \(x\)
\(\cos(x)\)\(\sum_{k=0}^{\infty} (-1)^{k} \frac{x^{2k}}{(2k)!} = 1 - \frac{1}{2!}x^2 + \frac{1}{4!}x^4 - \cdots\)for all real \(x\)
\(e^x\)\(\sum_{k=0}^{\infty} \frac{x^k}{k!} = 1 + x + \frac{1}{2!}x^2 + \frac{1}{3!}x^3 + \cdots\)for all real \(x\)

In Activity, we find several Taylor series using substitution and algebraic techniques.

Differentiating and integrating Taylor series

In Chapter, we discussed the challenge posed by definite integrals such as \[\begin{aligned}\end{aligned}\]. Because we are unable to find a simple algebraic antiderivative for the function \(\sin(x^2)\), we cannot use the First Fundamental Theorem of Calculus to evaluate the integral exactly. We learned in Section that the Second Fundamental Theorem of Calculus provides us with an antiderivative of a given function by using an integral function: one antiderivative of \(f(x) = \sin(x^2)\) is \[\begin{aligned}\end{aligned}\].

Our recent work with Taylor series now suggests another way to find an antiderivative \(F(x)\) for \(f(x) = \sin(x^2)\), and this approach also provides new options for finding additional Taylor series. In Activity, as part of our work in finding a Taylor series for \(x^3 \sin(x^2)\) we found that \[\begin{aligned}\end{aligned}\] and that this representation of \(\sin(x^2)\) is valid for every value of \(x\). This infinite series representation suggests that we could find an antiderivative \(F(x)\) of \(\sin(x^2)\) by using Equation to actually evaluate the integral \(\int_0^x \sin(u^2) \, du\). Doing so, we see \[\begin{aligned}F(x) \amp= \int_0^x \sin(u^2) \, du \\ \amp= \int_0^x \left( u^2 - \frac{1}{3!}u^6 + \frac{1}{5!}u^{10} + \cdots + (-1)^{n+1} \frac{1}{(2n-1)!} u^{4n-2} + \cdots \right) \, du \\ \amp= \left. \frac{1}{3}u^3 - \frac{1}{7 \cdot 3!} u^7 + \frac{1}{11 \cdot 5!}u^{11} + \cdots + \frac{(-1)^{n+1}}{(4n-1)(2n-1)!} u^{4n-1} + \cdots \right|_0^x \\ \amp= \left( \frac{1}{3}x^3 - \frac{1}{7 \cdot 3!} x^7 + \frac{1}{11 \cdot 5!}x^{11} + \cdots + \frac{(-1)^{n+1}}{(4n-1)(2n-1)!} x^{4n-1} + \cdots \right) - 0 \\ \amp= \frac{1}{3}x^3 - \frac{1}{7 \cdot 3!} x^7 + \frac{1}{11 \cdot 5!}x^{11} + \cdots + \frac{(-1)^{n+1}}{(4n-1)(2n-1)!} x^{4n-1} + \cdots\end{aligned}\]

Hence we have found that \[\begin{aligned}\end{aligned}\] is an antiderivative of \(f(x) = \sin(x^2)\).

It turns out that integrating a Taylor series has no effect on the openIt is possible for the convergence status at the endpoints of the interval to change, but we are normally not concerned with those specific \(x\)-values. interval of convergence of a Taylor series, nor does differentiating such a series. This fact is stated formally in a result called The Power Series Differentiation and Integration Theorem. A power series is any series of the form \[\begin{aligned}\end{aligned}\]. Every Taylor series is a power series, and a famous result called Borel's Theorem tells us that every power series is in fact the Taylor series of a related function.

Condensed — the full section is in Boelkins, Active Calculus.

Summary

  • Through substitution, we can use any known Taylor series to find the Taylor series of a related function. For example, we know that if \(|u| \lt 1\), \[\begin{aligned}\end{aligned}\] Letting \(u = 4x^2\), it follows that \[\begin{aligned}\end{aligned}\] and that this representation converges if \(|4x^2| \lt 1\), so for \(x\) such that \(|x| \lt \frac{1}{2}\).

  • The Power Series Differentation and Integration Theorem tells us that we can differentiate or integrate a Taylor series in the natural way and that doing so has essentially no impact on the set of \(x\)-values for which the series converges. For instance, we might note that if we first found the Taylor series for \(\sin(x)\), which is \[\begin{aligned}\end{aligned}\] and converges for every value of \(x\), it follows by differentating that \[\begin{aligned}\cos(x) \amp= \frac{d}{dx}[\sin(x)] \\ \amp= \frac{d}{dx}[x - \frac{1}{3!}x^3 + \frac{1}{5!}x^5 - \frac{1}{7!}x^7 + \cdots] \\ \amp= 1 - \frac{1}{3!} \cdot 3x^2 + \frac{1}{5!} \cdot 5x^4 - \frac{1}{7!} \cdot 7x^6 + \cdots \\ \amp= 1 - \frac{1}{2!}x^2 + \frac{1}{4!} x^4 - \frac{1}{6!} x^6 + \cdots\end{aligned}\] which is precisely the Taylor series for \(\cos(x)\) that we found by taking derivatives and applying Definition.

Practice (6)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. In this exercise we find the Taylor series representation for two famous functions, the Fresnel integral functions \[\begin{aligned}\end{aligned}\] and \[\begin{aligned}\end{aligned}\]. The Fresnel integral functions are important in optics and are used in the design of Fresnel lenses such as those found in lighthouses along the Lake Michigan shore.

    1. Use the Taylor series for \(\cos(x)\) to find the Taylor series for \(\cos(t^2)\) and hence write \(C(x)\) as a Taylor series.

    2. For what interval of \(x\)-values will the Taylor series for \(C(x)\) converge? Why?

    3. Apply your result from (a) to estimate \(C(0.5)\) to within \(0.001\).

    4. Similarly, use the Taylor series for \(\sin(x)\) to find the Taylor series for \(\sin(t^2)\) and hence write \(S(x)\) as a Taylor series.

    5. For what interval of \(x\)-values will the Taylor series for \(S(x)\) converge? Why?

    6. Apply your result from (d) to estimate \(S(0.8)\) to within \(0.001\).

    መልሱን አሳይ

    In this exercise we find the Taylor series representation for two famous functions, the Fresnel integral functions \[\begin{aligned}\end{aligned}\] and \[\begin{aligned}\end{aligned}\]. The Fresnel integral functions are important in optics and are used in the design of Fresnel lenses such as those found in lighthouses along the Lake Michigan shore.

    1. Using \(\cos(x) = 1 - \frac{1}{2!}x^2 + \frac{1}{4!}x^4 - \frac{1}{6!}x^6 + \cdots\), \[\begin{aligned}C(x) =\mathstrut \amp \int_0^x \cos(t^2) \, dt \\ =\mathstrut \amp \int_0^x \left( 1 - \frac{1}{2!}t^4 + \frac{1}{4!}t^8 - \frac{1}{6!}t^{12} + \cdots \right) \, dt \\ =\mathstrut \amp \left. \left( t - \frac{1}{5 \cdot 2!}t^5 + \frac{1}{9 \cdot 4!}t^9 - \frac{1}{13 \cdot 6!}t^{13} + \cdots \right) \right|_0^x \\ =\mathstrut \amp x - \frac{1}{5 \cdot 2!}x^5 + \frac{1}{9 \cdot 4!}x^9 - \frac{1}{13 \cdot 6!}t^{13} + \cdots\end{aligned}\]

    2. Because the Taylor series for \(\cos(x)\) converges for all real numbers \(x\), the Taylor series for \(C(x)\) will also converge for all real numbers \(x\).

    3. Using the Taylor series for \(C(x)\), \[\begin{aligned}\end{aligned}\], which is accurate to within \(\frac{1}{9 \cdot 4! \cdot 2^9} = \frac{1}{110592} = 0.00000904 \ldots\).

    4. Reasoning similarly with the Taylor series for \(\sin(x)\), we find \[\begin{aligned}\end{aligned}\].

    5. Because the Taylor series for \(\sin(x)\) converges for all real numbers \(x\), the Taylor series for \(S(x)\) will also converge for all real numbers \(x\).

    6. Using the Taylor series for \(C(x)\), \[\begin{aligned}\end{aligned}\], which is accurate to within \(\frac{1}{11 \cdot 5!} \left( \frac{4}{5} \right)^{11} = 0.00006507 \ldots\).

  2. The fact that we can differentiate or integrate a Taylor series reveals other important ways we can think about functions such as \(e^x\).

    1. Perhaps the most important property of the function \(h(x) = e^x\) is that \(h'(x) = e^x\); that is, the function \(e^x\) is its own derivative. Suppose that we didn't yet know the coefficients of the Taylor series expansion for \(e^x\), so we just said \[\begin{aligned}\end{aligned}\]. Let \(x = 0\) in Equation; what does this tell us about the value of \(a_0\)?

    2. Take the derivative of both sides of Equation and call your resulting equation for \(e^x\) Equation 2. Why do Equation and Equation 2 together tell us that \(a_1 = a_0\)? Combine this observation with your conclusion in (b) and note that you now know the numerical value of both \(a_0\) and \(a_1\).

    3. Why do Equation and Equation 2 together tell us that \(a_2 = \frac{1}{2}a_1\)?

    4. Continue reasoning similarly to find the value of \(a_3\), \(a_4\), and \(a_5\). What do you observe?

    መልሱን አሳይ
    1. Letting \(x = 0\) in \[\begin{aligned}\end{aligned}\] shows that \(e^0 = a_0\), so \(a_0 = 1\).

    2. Differentiating both sides of Equation, since \(\frac{d}{dx}[e^x] = e^x\) we find \[\begin{aligned}\end{aligned}\]. By equating the constant terms in Equation and in our most recent equation (Equation 2), we see that \[\begin{aligned}\end{aligned}\]. Having earlier established that \(a_0 = 1\), we now also know \(a_1 = 1\).

    3. If we equate the coefficients of the linear terms \(a_1 x\) and \(2a_2 x\) in Equation and Equation 2, we see that \(a_1 = 2a_2\), so \(a_2 = \frac{1}{2}a_1 = \frac{1}{2}\).

    4. Equating coefficients of like terms in Equation and Equation 2, we find that \(3a_3 = a_2\), \(4a_4 = a_3\), and \(5a_5 = a_4\). This implies that \(a_3 = \frac{1}{3}a_2 = \frac{1}{3 \cdot 2} = \frac{1}{3!}\), \(a_4 = \frac{1}{4}a_3 = \frac{1}{4 \cdot 3!} = \frac{1}{4!}\), and \(a_5 = \frac{1}{5}a_4 = \frac{1}{5 \cdot 4!} = \frac{1}{5!}\). Thus we observe that \(a_k = \frac{1}{k!}\), which is exactly what we'd expect for the Taylor series of \(e^x\).

  3. Taylor series also provide an alternate way to evaluate indeterminate limits.

    1. Find the Taylor series for \(\sin(2t)\) and use it to evaluate the indeterminate limit given by \[\begin{aligned}\end{aligned}\]. Compare your result to what follows from L'Hôpital's Rule (see Section as needed).

    2. Consider the indeterminate limit given by \[\begin{aligned}\end{aligned}\]. Find the Taylor series representations for \(f(x) = e^x - 1 - x\) and \(g(x) = \cos(2x)-1\) and use them to evaluate the given limit. How does your result compare to using L'Hôpital's Rule?

    መልሱን አሳይ

  4. In this exercise we find the Taylor series representation for two famous functions, the Fresnel integral functions \[\begin{aligned}\end{aligned}\] and \[\begin{aligned}\end{aligned}\]. The Fresnel integral functions are important in optics and are used in the design of Fresnel lenses such as those found in lighthouses along the Lake Michigan shore.

    1. Use the Taylor series for \(\cos(x)\) to find the Taylor series for \(\cos(t^2)\) and hence write \(C(x)\) as a Taylor series.

    2. For what interval of \(x\)-values will the Taylor series for \(C(x)\) converge? Why?

    3. Apply your result from (a) to estimate \(C(0.5)\) to within \(0.001\).

    4. Similarly, use the Taylor series for \(\sin(x)\) to find the Taylor series for \(\sin(t^2)\) and hence write \(S(x)\) as a Taylor series.

    5. For what interval of \(x\)-values will the Taylor series for \(S(x)\) converge? Why?

    6. Apply your result from (d) to estimate \(S(0.8)\) to within \(0.001\).

    መልሱን አሳይ

    In this exercise we find the Taylor series representation for two famous functions, the Fresnel integral functions \[\begin{aligned}\end{aligned}\] and \[\begin{aligned}\end{aligned}\]. The Fresnel integral functions are important in optics and are used in the design of Fresnel lenses such as those found in lighthouses along the Lake Michigan shore.

    1. Using \(\cos(x) = 1 - \frac{1}{2!}x^2 + \frac{1}{4!}x^4 - \frac{1}{6!}x^6 + \cdots\), \[\begin{aligned}C(x) =\mathstrut \amp \int_0^x \cos(t^2) \, dt \\ =\mathstrut \amp \int_0^x \left( 1 - \frac{1}{2!}t^4 + \frac{1}{4!}t^8 - \frac{1}{6!}t^{12} + \cdots \right) \, dt \\ =\mathstrut \amp \left. \left( t - \frac{1}{5 \cdot 2!}t^5 + \frac{1}{9 \cdot 4!}t^9 - \frac{1}{13 \cdot 6!}t^{13} + \cdots \right) \right|_0^x \\ =\mathstrut \amp x - \frac{1}{5 \cdot 2!}x^5 + \frac{1}{9 \cdot 4!}x^9 - \frac{1}{13 \cdot 6!}t^{13} + \cdots\end{aligned}\]

    2. Because the Taylor series for \(\cos(x)\) converges for all real numbers \(x\), the Taylor series for \(C(x)\) will also converge for all real numbers \(x\).

    3. Using the Taylor series for \(C(x)\), \[\begin{aligned}\end{aligned}\], which is accurate to within \(\frac{1}{9 \cdot 4! \cdot 2^9} = \frac{1}{110592} = 0.00000904 \ldots\).

    4. Reasoning similarly with the Taylor series for \(\sin(x)\), we find \[\begin{aligned}\end{aligned}\].

    5. Because the Taylor series for \(\sin(x)\) converges for all real numbers \(x\), the Taylor series for \(S(x)\) will also converge for all real numbers \(x\).

    6. Using the Taylor series for \(C(x)\), \[\begin{aligned}\end{aligned}\], which is accurate to within \(\frac{1}{11 \cdot 5!} \left( \frac{4}{5} \right)^{11} = 0.00006507 \ldots\).

  5. The fact that we can differentiate or integrate a Taylor series reveals other important ways we can think about functions such as \(e^x\).

    1. Perhaps the most important property of the function \(h(x) = e^x\) is that \(h'(x) = e^x\); that is, the function \(e^x\) is its own derivative. Suppose that we didn't yet know the coefficients of the Taylor series expansion for \(e^x\), so we just said \[\begin{aligned}\end{aligned}\]. Let \(x = 0\) in Equation; what does this tell us about the value of \(a_0\)?

    2. Take the derivative of both sides of Equation and call your resulting equation for \(e^x\) Equation 2. Why do Equation and Equation 2 together tell us that \(a_1 = a_0\)? Combine this observation with your conclusion in (b) and note that you now know the numerical value of both \(a_0\) and \(a_1\).

    3. Why do Equation and Equation 2 together tell us that \(a_2 = \frac{1}{2}a_1\)?

    4. Continue reasoning similarly to find the value of \(a_3\), \(a_4\), and \(a_5\). What do you observe?

    መልሱን አሳይ
    1. Letting \(x = 0\) in \[\begin{aligned}\end{aligned}\] shows that \(e^0 = a_0\), so \(a_0 = 1\).

    2. Differentiating both sides of Equation, since \(\frac{d}{dx}[e^x] = e^x\) we find \[\begin{aligned}\end{aligned}\]. By equating the constant terms in Equation and in our most recent equation (Equation 2), we see that \[\begin{aligned}\end{aligned}\]. Having earlier established that \(a_0 = 1\), we now also know \(a_1 = 1\).

    3. If we equate the coefficients of the linear terms \(a_1 x\) and \(2a_2 x\) in Equation and Equation 2, we see that \(a_1 = 2a_2\), so \(a_2 = \frac{1}{2}a_1 = \frac{1}{2}\).

    4. Equating coefficients of like terms in Equation and Equation 2, we find that \(3a_3 = a_2\), \(4a_4 = a_3\), and \(5a_5 = a_4\). This implies that \(a_3 = \frac{1}{3}a_2 = \frac{1}{3 \cdot 2} = \frac{1}{3!}\), \(a_4 = \frac{1}{4}a_3 = \frac{1}{4 \cdot 3!} = \frac{1}{4!}\), and \(a_5 = \frac{1}{5}a_4 = \frac{1}{5 \cdot 4!} = \frac{1}{5!}\). Thus we observe that \(a_k = \frac{1}{k!}\), which is exactly what we'd expect for the Taylor series of \(e^x\).

  6. Taylor series also provide an alternate way to evaluate indeterminate limits.

    1. Find the Taylor series for \(\sin(2t)\) and use it to evaluate the indeterminate limit given by \[\begin{aligned}\end{aligned}\]. Compare your result to what follows from L'Hôpital's Rule (see Section as needed).

    2. Consider the indeterminate limit given by \[\begin{aligned}\end{aligned}\]. Find the Taylor series representations for \(f(x) = e^x - 1 - x\) and \(g(x) = \cos(2x)-1\) and use them to evaluate the given limit. How does your result compare to using L'Hôpital's Rule?

    መልሱን አሳይ

Symbols used here

\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\int f(x)\,dx,\ \int_a^b
integral
Antiderivative (indefinite) or signed area from a to b (definite).
n!
factorial
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
\infty
infinity
Not a number: "grows without bound" in limits and intervals.
\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\sin,\ \cos,\ \tan
sine, cosine, tangent
Ratios of sides in a right triangle; coordinates on the unit circle.
f'(x),\ \frac{dy}{dx}
derivative
Instantaneous rate of change; slope of the graph.
e
Euler's number
2.71828…, the base whose exponential is its own derivative.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\sup,\ \inf
supremum, infimum
Least upper bound, greatest lower bound.
\pi
pi
Ratio of a circle's circumference to its diameter, 3.14159…
\lim_{x \to a} f(x)
limit
The value f(x) approaches as x approaches a.
y',\ y''
first and second derivative of y
Prime notation for derivatives with respect to x (or t).
C,\ C_1,\ C_2
arbitrary constants
Constants of integration fixed by initial conditions.

How to: Finding and using Taylor series

  1. Is it possible to find the Taylor series expansion for a given function f without computing and evaluating various derivatives of f?
  2. Can we differentiate or integrate a Taylor series in the same way that we differentiate or integrate a polynomial? If so, how does doing so affect the values of x for which the Taylor series converges?

Questions people ask

What is a derivative in one sentence?

The slope of the graph at a point — the rate at which the output is changing there. Speed is the derivative of position.

What is an integral in one sentence?

The accumulated total of a rate — the area under the curve. Distance travelled is the integral of speed.

Why are derivatives and integrals opposites?

That is the fundamental theorem of calculus: accumulating a rate and then measuring how fast the accumulation grows gets you back the rate. Integration undoes differentiation up to a constant.

When do I use substitution and when integration by parts?

Substitution when part of the integrand is the derivative of another part (u and du both present). Parts when the integrand is a product of two unrelated kinds of function — a polynomial times an exponential, log or trig function.

የራስዎን ይሞክሩ

Parts of this page are adapted from Boelkins, Active Calculus (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.

በ Calculus