Differentiating and Integrating Power Series

You can differentiate or integrate a power series term by term, just like a polynomial. If f(x) = \sum c_n x^n, then f'(x) = \sum n c_n x^{n-1} and \int f(x)\,dx = C + \sum \frac{c_n x^{n+1}}{n + 1}. The radius of convergence stays the same, but the endpoints must be checked again.

Before this lesson: Power Series, Radius and Interval of Convergence, Maclaurin Series and Antiderivatives

Why term by term works

A polynomial is differentiated one term at a time with the power rule. Inside its interval of convergence, a power series behaves the same way: the derivative of the sum is the sum of the derivatives, and the same is true for integrals.

This gives new series without new derivative patterns. Start from a series you know, such as the geometric series, and differentiate or integrate it. It also lets you integrate functions like e^{-x^2} that have no antiderivative made of basic functions.

Graph of the bell-shaped curve y = e⁻ˣ² for −1.5 ≤ x ≤ 1.5, peaking at (0, 1). The region under the curve from x = 0 to x = 0.5 is shaded blue and labeled ≈ 0.46127, the value found by integrating the power series term by term.
No basic antiderivative of e⁻ˣ² exists, but integrating its power series term by term gives this area to five decimal places.

Differentiating and integrating power series

If f(x) = \sum_{n=0}^{\infty} c_n (x - a)^n has radius of convergence R > 0, then for |x − a| < R:

f'(x) = \sum_{n=1}^{\infty} n c_n (x - a)^{n-1}
\int f(x)\,dx = C + \sum_{n=0}^{\infty} \frac{c_n (x - a)^{n+1}}{n + 1}
  • Both new series have the same radius R.
  • The interval can gain or lose an endpoint, so test the endpoints again.
  • After differentiating, the n = 0 term (a constant) becomes 0, so the sum starts at n = 1.
  • After integrating, find C by putting in x = a.

Term-by-term examples

Example 1: Differentiate the geometric series

Find a power series for \dfrac{1}{(1 - x)^2}.

\dfrac{1}{1 - x} = \sum_{n=0}^{\infty} x^n, \quad |x| \lt 1

Start from the geometric series.

\dfrac{d}{dx}\left[\dfrac{1}{1 - x}\right] = \dfrac{1}{(1 - x)^2}

Differentiate the left side with the chain rule.

\dfrac{d}{dx}\sum_{n=0}^{\infty} x^n = \sum_{n=1}^{\infty} n x^{n-1}

Differentiate the right side term by term; the constant term 1 becomes 0.

\sum_{n=1}^{\infty} n x^{n-1} = \sum_{n=0}^{\infty} (n + 1)x^n

Shift the index: replace n with n + 1.

Answer: \frac{1}{(1 - x)^2} = 1 + 2x + 3x^2 + 4x^3 + \cdots for |x| < 1.

Example 2: Integrate to get ln(1 + x)

Integrate the series for \dfrac{1}{1 + x} to find a series for ln(1 + x).

\dfrac{1}{1 + x} = \sum_{n=0}^{\infty} (-1)^n x^n, \quad |x| \lt 1

Replace x with −x in the geometric series.

\ln(1 + x) = C + \sum_{n=0}^{\infty} \dfrac{(-1)^n x^{n+1}}{n + 1}

Integrate both sides term by term (see integrals that give natural logarithms).

\ln(1 + 0) = C + 0 \quad \Rightarrow \quad C = 0

Put in x = 0 to find C; ln 1 = 0.

\ln(1 + x) = \sum_{n=1}^{\infty} \dfrac{(-1)^{n-1} x^n}{n}

Shift the index so the power is n.

Answer: \ln(1 + x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \cdots. The radius is still 1, and the series now also converges at the endpoint x = 1, so it is valid for −1 < x ≤ 1.

Example 3: Integrate to get arctan x

Find a series for arctan x, and use it to write a series for π.

\dfrac{1}{1 + x^2} = \sum_{n=0}^{\infty} (-1)^n x^{2n}, \quad |x| \lt 1

Replace x with −x² in the geometric series.

\arctan x = C + \sum_{n=0}^{\infty} \dfrac{(-1)^n x^{2n+1}}{2n + 1}

Integrate both sides; the antiderivative of 1/(1 + x²) is arctan x.

\arctan 0 = 0 \quad \Rightarrow \quad C = 0

Put in x = 0.

\arctan 1 = \dfrac{\pi}{4} = 1 - \dfrac{1}{3} + \dfrac{1}{5} - \dfrac{1}{7} + \cdots

The series also converges at x = 1, so put in x = 1.

Answer: \arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots for −1 ≤ x ≤ 1, and \pi = 4\left(1 - \frac{1}{3} + \frac{1}{5} - \cdots\right).

Example 4: A definite integral with no basic antiderivative

Estimate \int_0^{0.5} e^{-x^2}\,dx with four terms of its series.

e^{-x^2} = \sum_{n=0}^{\infty} \dfrac{(-1)^n x^{2n}}{n!}

Replace x with −x² in the series for eˣ.

\int_0^{0.5} e^{-x^2}\,dx = \sum_{n=0}^{\infty} \dfrac{(-1)^n (0.5)^{2n+1}}{(2n + 1)\,n!}

Integrate term by term from 0 to 0.5.

0.5 - \dfrac{0.125}{3} + \dfrac{0.03125}{10} - \dfrac{0.0078125}{42}

Write the n = 0, 1, 2, 3 terms: 0.5³ = 0.125, 0.5⁵ = 0.03125, 0.5⁷ = 0.0078125.

0.5 - 0.0416667 + 0.003125 - 0.0001860 \approx 0.4612723

Divide, then combine.

\dfrac{(0.5)^9}{9 \cdot 4!} \approx 0.0000090

The series alternates, so the error is less than the next term (see alternating series error bound).

Answer: about 0.46127, with error less than 0.00001. (The true value is 0.461281.)

Example 5: Expected number of coin flips (word problem)

You flip a fair coin until it lands heads. The expected number of flips is \sum_{n=1}^{\infty} n\left(\frac{1}{2}\right)^n. Find this sum.

\sum_{n=1}^{\infty} n x^{n-1} = \dfrac{1}{(1 - x)^2}

Use the series from Example 1.

\sum_{n=1}^{\infty} n x^n = \dfrac{x}{(1 - x)^2}

Multiply both sides by x.

\sum_{n=1}^{\infty} n\left(\dfrac{1}{2}\right)^n = \dfrac{1/2}{(1/2)^2}

Put in x = 1/2, which is inside |x| < 1.

\dfrac{1/2}{1/4} = 2

Divide by multiplying by the reciprocal.

Answer: on average it takes 2 flips to get heads.

Common mistakes

MistakeExample of the errorFix
Forgetting the constant of integrationWriting \arctan x = \sum \frac{(-1)^n x^{2n+1}}{2n + 1} without checking CInclude C, then find it at the center. Here C = 0, but for other functions it is not.
Keeping the n = 0 term after differentiatingWriting \sum_{n=0}^{\infty} n x^{n-1}, which has an x⁻¹ termThe constant term differentiates to 0. Start at n = 1.
Dividing by the old exponentIntegrating x^{2n} to \frac{x^{2n+1}}{2n}Divide by the new exponent: \frac{x^{2n+1}}{2n + 1}.
Assuming the endpoints stay the sameSaying ln(1 + x) is valid only for |x| < 1Retest the endpoints: the integrated series also converges at x = 1.
Thinking the radius changesSaying the derivative of \sum \frac{x^n}{2^n} has R = 1Term-by-term work keeps R the same: R = 2.
Using a series outside its radiusPutting x = 2 into the series for \frac{1}{(1 - x)^2}It is valid only for |x| < 1.

Related methods

Checking with a known series

Differentiating the series for e^x gives back the same series, and differentiating the sine series gives the cosine series. These checks are a quick way to see that a series is right; see the Maclaurin series table.

Estimating the error

When an integrated series alternates, as in Example 4, the next term bounds the error. When it doesn’t, use the Lagrange error bound or compare the tail with a geometric series.

Practice problems

  1. Differentiate \sum_{n=0}^{\infty} \dfrac{x^n}{n!} term by term. What do you notice?
  2. Find a power series for \dfrac{1}{(1 + x)^2} by differentiating the series for \dfrac{1}{1 + x}.
  3. Find a power series for ln(1 − x) by integrating, and give its interval of convergence.
  4. Find a power series for \int_0^x \sin(t^2)\,dt.
  5. Use three terms to estimate \int_0^1 \sin(x^2)\,dx, and bound the error.
  6. Find the interval of convergence of \sum_{n=0}^{\infty} \dfrac{x^{n+1}}{n + 1}, the integral of the geometric series.
  7. Use the series for \frac{1}{(1 - x)^2} to find \sum_{n=0}^{\infty} \dfrac{n + 1}{3^n}.
  8. Differentiate f(x) = \sum_{n=1}^{\infty} \dfrac{x^n}{n^2} term by term, and give the radius of convergence of f′.
  9. Use three terms of the arctan series to estimate arctan 0.2.
  10. A sensor’s signal strength at time t is e^{-t^2}. Use three terms of a series to estimate the total signal \int_0^{0.2} e^{-t^2}\,dt.
Show answers

1.

\dfrac{d}{dx}\sum_{n=0}^{\infty} \dfrac{x^n}{n!} = \sum_{n=1}^{\infty} \dfrac{n x^{n-1}}{n!}

Differentiate each term with the power rule.

\sum_{n=1}^{\infty} \dfrac{n x^{n-1}}{n!} = \sum_{n=1}^{\infty} \dfrac{x^{n-1}}{(n - 1)!} = \sum_{n=0}^{\infty} \dfrac{x^n}{n!}

n/n! = 1/(n − 1)!; then shift the index.

Answer: the derivative is the same series, which fits (eˣ)′ = eˣ

2.

\dfrac{d}{dx}\sum_{n=0}^{\infty} (-1)^n x^n = \sum_{n=1}^{\infty} (-1)^n n x^{n-1}

Differentiate term by term.

\dfrac{d}{dx}\left[\dfrac{1}{1 + x}\right] = -\dfrac{1}{(1 + x)^2}

Differentiate the left side.

\dfrac{1}{(1 + x)^2} = \sum_{n=1}^{\infty} (-1)^{n+1} n x^{n-1} = \sum_{n=0}^{\infty} (-1)^n (n + 1)x^n

Multiply both sides by −1, then shift the index.

Answer: 1 - 2x + 3x^2 - 4x^3 + \cdots for |x| < 1

3.

\ln(1 - x) = -\int \dfrac{1}{1 - x}\,dx = C - \sum_{n=0}^{\infty} \dfrac{x^{n+1}}{n + 1}

Integrate the geometric series term by term.

\ln 1 = C - 0 \quad \Rightarrow \quad C = 0

Put in x = 0.

\text{At } x = -1: \; -\sum \dfrac{(-1)^{n+1}}{n + 1} \text{ converges}; \quad \text{at } x = 1: \; -\sum \dfrac{1}{n + 1} \text{ diverges}

Retest the endpoints.

Answer: \ln(1 - x) = -\sum_{n=1}^{\infty} \dfrac{x^n}{n} for −1 ≤ x < 1

4.

\sin(t^2) = \sum_{n=0}^{\infty} \dfrac{(-1)^n t^{4n+2}}{(2n + 1)!}

Replace x with t² in the sine series: (t²)²ⁿ⁺¹ = t⁴ⁿ⁺².

\int_0^x \sin(t^2)\,dt = \sum_{n=0}^{\infty} \dfrac{(-1)^n x^{4n+3}}{(4n + 3)(2n + 1)!}

Integrate term by term from 0 to x.

Answer: \dfrac{x^3}{3} - \dfrac{x^7}{42} + \dfrac{x^{11}}{1320} - \cdots for every x

5.

\dfrac{1}{3} - \dfrac{1}{42} + \dfrac{1}{1320}

Put x = 1 into the series from #4: 7 · 3! = 42 and 11 · 5! = 1320.

0.3333333 - 0.0238095 + 0.0007576 \approx 0.3102814

Divide, then combine.

\dfrac{1}{15 \cdot 7!} = \dfrac{1}{75{,}600} \approx 0.0000132

The series alternates, so the next term bounds the error.

Answer: about 0.31028, with error less than 0.0000132 (true value 0.310268)

6.

L = \lim_{n \to \infty} |x| \cdot \dfrac{n + 1}{n + 2} = |x|

Ratio test: R = 1.

\text{At } x = 1: \; \sum \dfrac{1}{n + 1} \text{ diverges}; \quad \text{at } x = -1: \; \sum \dfrac{(-1)^{n+1}}{n + 1} \text{ converges}

Harmonic series; alternating series test.

Answer: −1 ≤ x < 1 (the geometric series had neither endpoint; this one gained x = −1)

7.

\sum_{n=0}^{\infty} (n + 1)x^n = \dfrac{1}{(1 - x)^2}

The series from Example 1.

\sum_{n=0}^{\infty} \dfrac{n + 1}{3^n} = \dfrac{1}{(1 - \frac{1}{3})^2} = \dfrac{1}{4/9}

Put in x = 1/3.

\dfrac{1}{4/9} = \dfrac{9}{4}

Multiply by the reciprocal.

Answer: 9/4

8.

f'(x) = \sum_{n=1}^{\infty} \dfrac{n x^{n-1}}{n^2} = \sum_{n=1}^{\infty} \dfrac{x^{n-1}}{n}

Differentiate term by term and cancel one n.

L = \lim_{n \to \infty} |x| \cdot \dfrac{n}{n + 1} = |x|

Ratio test, the same as for f.

Answer: f'(x) = \sum \dfrac{x^{n-1}}{n} with R = 1

9.

\arctan 0.2 \approx 0.2 - \dfrac{0.008}{3} + \dfrac{0.00032}{5}

0.2³ = 0.008 and 0.2⁵ = 0.00032.

0.2 - 0.0026667 + 0.000064 \approx 0.1973973

Divide, then combine.

Answer: about 0.19740 (true value 0.197396)

10.

\int_0^{0.2} e^{-t^2}\,dt = 0.2 - \dfrac{(0.2)^3}{3} + \dfrac{(0.2)^5}{10} - \cdots

Use the series from Example 4 with upper limit 0.2.

0.2 - 0.0026667 + 0.000032 \approx 0.1973653

0.2³ = 0.008 and 0.2⁵ = 0.00032; divide, then combine.

Answer: about 0.197365 (the next term is only about 0.0000003)

Differentiating and integrating power series FAQ

Can you differentiate a power series term by term?

Yes. Inside its interval of convergence, a power series can be differentiated one term at a time, and the result has the same radius of convergence.

Does the radius of convergence change when you integrate a power series?

No, the radius stays the same. The endpoints can change, though: the integral of the geometric series converges at x = −1, but the geometric series does not.

How do you find the constant of integration?

Put the center (often x = 0) into both sides. Every term with a power of (x − a) becomes 0, so you can solve for C.

How do you integrate e^(−x²)?

There is no basic antiderivative, but you can integrate its series term by term: \int e^{-x^2}\,dx = C + \sum \frac{(-1)^n x^{2n+1}}{(2n + 1)\,n!}.

Summary

  • Differentiate or integrate a power series one term at a time, like a polynomial.
  • The radius of convergence stays the same; retest the endpoints.
  • After differentiating, start at n = 1. After integrating, find C at the center.
  • Integrating geometric series gives ln(1 + x) and arctan x.
  • Series let you estimate integrals like \int e^{-x^2}\,dx and find sums like \sum n/2^n.

Previous lesson: Maclaurin Series

Next lesson: Binomial Series

Back to the Calculus 2 Index