Calculus with series · Mathematics Class 11–12 | StemPy Lab
Course 15.3·Lesson 3 of 3
Calculus with series
Inside its interval of convergence a power series can be differentiated and integrated term by term, and the radius does not change, though an endpoint may be gained or lost. Starting from the geometric series this gives the series of ln(1+x) and arctanx
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
differentiate and integrate a power series term by term and say what happens to the radius and the endpoints;
build new series from known ones by substitution, multiplication, differentiation and integration;
use a series to find a limit, to estimate an integral with an error bound, and to sum a numerical series.
Calculus one term at a time
A polynomial is easy to differentiate and integrate: you handle one term at a time. A power series is a polynomial that never ends, and the same rule still works.
Theorem. Let f(x)=∑cn(x−a)n have radius of convergence R>0. Then, for ∣x−a∣<R,
Both new series have the same radius R. What can change is the behaviour at the endpoints. Differentiating can lose an endpoint, because the factor n makes the terms larger. Integrating can gain one, because the factor n+11 makes the terms smaller.
Differentiating the geometric series
Start with 1−x1=n=0∑∞xn for ∣x∣<1. Differentiate both sides:
(1−x)21=n=1∑∞nxn−1=1+2x+3x2+4x3+⋯,∣x∣<1.
At x=±1 the terms n(±1)n−1 do not tend to 0, so the new series diverges at both ends. The interval is still (−1,1).
Integrating: the series of ln(1+x) and arctanx
Put −x in place of x in the geometric series: 1+x1=1−x+x2−x3+⋯ for ∣x∣<1. Integrate from 0 to x:
ln(1+x)=x−2x2+3x3−4x4+⋯,−1<x≤1.
The radius is still 1. But look at x=1. The geometric series 1−1+1−⋯ diverges there, while the new series is the alternating harmonic series, which converges. A standard theorem says that the sum is then ln2. So
ln2=1−21+31−41+⋯
The same idea with 1+x21=1−x2+x4−⋯ gives
arctanx=x−3x3+5x5−⋯,−1≤x≤1.
Again the endpoints were gained. At x=1 we get arctan1=4π=1−31+51−71+⋯. This series converges very slowly: twenty thousand terms give only four correct digits.
More new series from old ones
Substitute. From ex=∑n!xn, put −x2 in place of x: e−x2=1−x2+2!x4−3!x6+⋯, for every real x.
Multiply by a power of x.xcosx=x−2!x3+4!x5−⋯.
Add.coshx=2ex+e−x=1+2!x2+4!x4+⋯.
A substitution changes the radius only if the new expression limits x. For e−x2 nothing limits x, so the radius stays ∞. For 1+x21 the condition ∣x2∣<1 gives ∣x∣<1.
Integrals that have no formula
The function e−x2 has no antiderivative in terms of the functions you know. But its series can be integrated term by term:
The series alternates and its terms shrink to zero, so the error after any term is at most the next term. With the first four terms the sum is 0.742857 and the error is at most 2161≈0.0046. With five terms the sum is 0.747487 and the error is at most 13201≈0.00076. The true value is 0.746824.
The graph of y = e^(-x squared) for x from 0 to 1.5 in blue, with the polynomial 1 - x squared + x^4/2 in red, which is close to the blue curve for x up to 1 and rises above it later. The area under the blue curve from 0 to 1 is shaded pale orange and labelled 0.7468.
This integral matters in statistics, where it leads to the normal distribution. Another example is ∫01xsinxdx. Since xsinx=1−3!x2+5!x4−⋯, the integral is 1−181+6001−⋯≈0.94608.
Limits from series
In the Limits and Derivatives chapter you used a few terms of a series to find a limit, in the lesson on expansions and L'Hôpital's rule. Now you know where those terms come from. The method is: write each function as its series, cancel, then let x→0.
Example 1.x→0limx3x−sinx. Since x−sinx=6x3−120x5+⋯, dividing by x3 gives 61−120x2+⋯→61.
Example 2.x→0limx3sinx−xcosx. The series are sinx=x−6x3+⋯ and xcosx=x−2x3+⋯. The difference is (−61+21)x3+⋯=3x3+⋯. The limit is 31.
Example 3.x→0limx4ex2−1−x2. Since ex2=1+x2+2x4+⋯, the top is 2x4+⋯. The limit is 21.
Sums of numerical series
A known series evaluated at a good point gives an exact sum.
n=0∑∞n!(−1)n=e−1, from the series of ex at x=−1.
n=1∑∞n2n1=ln2. Indeed −ln(1−x)=∑nxn for ∣x∣<1, and at x=21 we get −ln21=ln2.
n=1∑∞2nn=2. Multiply the series of (1−x)21 by x to get ∑nxn=(1−x)2x, then put x=21.
Practise with new numbers
Try it in Python
The program adds the series for ∫01e−x2dx one term at a time. For each partial sum it prints the largest possible error, which is the next term. It then compares the result with the value from the error function.
Common mistakes
Expecting the same endpoints. The radius does not change under calculus, but the endpoints can. Test them again.
Forgetting the constant of integration. Integrate from 0 to x so that the constant is fixed by the value at 0.
Losing the shift in the power. Differentiating xn gives nxn−1, and the sum then starts at n=1.
Stopping the series too early in a limit. If the top still cancels after the terms you kept, you need more terms.
Using the series outside its interval. Term-by-term calculus is valid only for ∣x−a∣<R, plus any endpoint you have checked.
Remember these
Inside the radius, differentiate and integrate a power series term by term. The radius is the same.
The endpoints may change: differentiating can lose one and integrating can gain one.
ln(1+x)=∑n(−1)n+1xn on (−1,1] and arctanx=∑2n+1(−1)nx2n+1 on [−1,1].
A series can give a limit, an integral with an error bound, and the exact sum of a numerical series.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Differentiate n=0∑∞n!xn term by term. What do you get?
Differentiate 1+x1=∑(−1)nxn to find a series for (1+x)21.
Write the first four terms of the Maclaurin series of x2ex.
Find x→0limx21−cos2x with a series.
Estimate ∫01xsinxdx with the first three terms of its series and give an error bound.
References
OpenStax, Calculus Volume 2, Chapter 6, section 6.2 on properties of power series and section 6.4 on working with Taylor series.
College Board, AP Calculus AB and BC Course and Exam Description, Unit 10, on integrating and differentiating power series.
Enroll free in Power Series and Taylor Series
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.