Using series to evaluate limits and integrals
The integral \int_0^{0.6} e^{-x^3}\,dx has no antiderivative to plug into, and the limit of \displaystyle \frac{e^{x^2} - 1 - x^2}{x^4} at 0 takes four rounds of L’Hopital’s rule. Can a series settle both in a few lines, and say how accurate the answer is?
Where you are 5 in Taylor and Maclaurin series
When you reach for it
Two kinds of problem call for this move.
A definite integral with no usable antiderivative. The Fundamental Theorem of Calculus needs an antiderivative written with the familiar functions, and many integrands have none: e^{-x^3}, \cos(x^2), \displaystyle \frac{1 - e^{-x}}{x} (Choosing an integration technique states such results). If the integrand has a power series, Representing functions as power series turns the integral into a numerical series. Its partial sums approximate the integral, and the error of a partial sum can be bounded, so the answer comes with a guaranteed accuracy.
A limit of an indeterminate form at the center of a series. L’Hopital’s rule differentiates top and bottom until one of them stops vanishing. Writing each function as its series does the same work at once: the lowest power that survives decides the limit, and the next power says how the expression approaches it.
Both rest on the series of The common Maclaurin series: e^x, \sin x, \cos x for every x, and \ln(1+x), \arctan x near 0, with substitutions such as x \to -x^3.
The procedure
Integrals. Suppose f(x) = \sum c_n x^n for \lvert x \rvert < R and [0, b] lies inside (-R, R). Term by term integration gives
a series of numbers with sum exactly the integral. An integrand such as \displaystyle \frac{1 - e^{-x}}{x}, undefined at 0, is given its limit there; its series then holds on the whole interval, and the integral is an ordinary one.
The error of a partial sum. Stopping after some term leaves a tail, and the tail is the error. Two tools bound it.
- When the series alternates and the sizes b_n of its terms decrease to 0 from the stopping point on, the Alternating series and their error bound gives \lvert \text{error} \rvert \le the first omitted term, and the error has that term’s sign. So the true value lies between the partial sum and the partial sum plus the first omitted term.
- When the terms are all positive, every omitted term adds, and the first omitted term alone is too small a bound. If \displaystyle \frac{a_{n+1}}{a_n} \le r < 1 for every n past the stopping point, each omitted term is at most the first one, a_{N+1}, times a power of r, so by the geometric series
The The Taylor remainder and the Lagrange error bound is another route: bound the integrand’s own remainder and integrate the bound.
How many terms. To reach an accuracy \varepsilon, list the terms until the bound falls below \varepsilon. Work with two or three more digits than the answer needs, so that rounding along the way does not eat into the bound.
Limits. Near x = 0 write numerator and denominator as series and factor out the lowest power in each. If the numerator is a\,x^k + (\text{higher powers}) and the denominator is c\,x^k + (\text{higher powers}) with c \ne 0, then dividing by x^k leaves \displaystyle \frac{a + (\text{terms with } x)}{c + (\text{terms with } x)}, and every term with x tends to 0 because a power series is continuous inside its interval. The limit is \displaystyle \frac{a}{c} (Exercise 18). If the numerator starts at a higher power, the limit is 0; if at a lower power, the expression is unbounded near 0.
Each round of L’Hopital’s rule lowers the power of each leading term by one, so a limit decided at x^k takes k rounds, each on a longer expression. The series route keeps the bookkeeping in one line and gives more: the expression equals \displaystyle \frac{a}{c} plus a correction whose size the next power shows (Example 5).
Worked examples
An integral to within one hundred thousandth
Radmila’s calibration model for a thermocouple needs \int_0^{0.6} e^{-x^3}\,dx to within 10^{-5}.
SolutionSubstituting u = -x^3 in \displaystyle e^u = \sum \frac{u^n}{n!}, valid for every u, gives \displaystyle e^{-x^3} = \sum_{n=0}^{\infty} \frac{(-1)^n x^{3n}}{n!} for every x. Integrating term by term from 0 to 0.6,
The signs alternate. The sizes are \displaystyle b_n = \frac{(0.6)^{3n+1}}{(3n+1)\,n!}, and from b_n to b_{n+1} the numerator is multiplied by 0.216 while the denominator grows, so the sizes decrease to 0. List them:
| n | b_n |
|---|---|
| 0 | 0.6 |
| 1 | 0.0324 |
| 2 | 0.0019995 |
| 3 | 0.0001008 |
| 4 | 0.0000042 |
The first size below 10^{-5} is b_4 \approx 4.19 \times 10^{-6}, so four terms suffice. Carrying eight decimal places, as advised above,
The first omitted term, +b_4, is positive, so the integral lies between 0.5694988 and 0.5694988 + 0.0000042 = 0.5695030. Both ends round to 0.56950, so \int_0^{0.6} e^{-x^3}\,dx \approx 0.56950, correct to five decimal places. Figure 1 shows the area.
An integrand undefined at zero, and which side
Vukasin needs \displaystyle \int_0^{0.8} \frac{1 - e^{-x}}{x}\,dx to within 10^{-6}, and wants to know whether the estimate is high or low.
SolutionFrom \displaystyle e^{-x} = 1 - x + \frac{x^2}{2!} - \frac{x^3}{3!} + \cdots, for x \ne 0
At x = 0 the series gives 1, which is also the limit of the integrand, so with that value the integrand is continuous on [0, 0.8] and equal to the series there. Integrating term by term,
The sizes \displaystyle b_n = \frac{(0.8)^n}{n \cdot n!} have ratio \displaystyle \frac{b_{n+1}}{b_n} = \frac{0.8\,n}{(n+1)^2} < 1, so they decrease, and the alternating bound applies. They are 0.8, 0.16, 0.0284444, 0.0042667, 0.0005461, 0.0000607, 0.0000059 for n = 1 to 7, and then \displaystyle b_8 = \frac{0.8^8}{8 \cdot 40320} \approx 5.20 \times 10^{-7}, the first below 10^{-6}. Seven terms give
The first omitted term is -b_8, negative, so S_7 is too high: the integral lies between S_7 - b_8 \approx 0.6646687 and 0.6646692. To six places, \displaystyle \int_0^{0.8} \frac{1 - e^{-x}}{x}\,dx \approx 0.664669, and the seven term sum overestimates it by less than 5.2 \times 10^{-7}.
Positive terms and a geometric tail
Andrej needs \displaystyle \int_0^{0.5} \frac{e^x - 1}{x}\,dx to within 10^{-5}.
SolutionAs in Example 2, \displaystyle \frac{e^x - 1}{x} = \sum_{n=1}^{\infty} \frac{x^{n-1}}{n!}, with value 1 at 0, and
Every term is positive, so the alternating bound does not apply. The terms are a_1 = 0.5, a_2 = 0.0625, a_3 = 0.0069444, a_4 = 0.0006510, a_5 = 0.0000521, a_6 = 0.0000036. Try stopping after a_5. For n \ge 6,
so the tail is at most \displaystyle \frac{a_6}{1 - 1/14} = \frac{14}{13}\,a_6 \approx 3.9 \times 10^{-6}, below 10^{-5}. (Stopping after a_4 fails: the tail is at least a_5 > 10^{-5}.) Five terms give
and since the tail is positive, the integral lies between 0.5701476 and 0.5701515. To five places it is 0.57015.
A limit L’Hopital’s rule takes three rounds for
Radmila finds \displaystyle \displaystyle\lim_{x \to 0} \frac{\sin(2x) - 2x}{x^3} both ways.
SolutionBy series, \displaystyle \sin(2x) = 2x - \frac{(2x)^3}{3!} + \frac{(2x)^5}{5!} - \cdots, which is \displaystyle 2x - \frac{4x^3}{3} + \frac{4x^5}{15} - \cdots, so
By L’Hopital’s rule, the form is \displaystyle \frac00 three times in a row:
The answers agree, as they must. The series also shows that for small x \ne 0 the expression is slightly above \displaystyle -\frac43, by about \displaystyle \frac{4x^2}{15}.
The limit and the next term
Find \displaystyle \displaystyle\lim_{x \to 0} \frac{e^{x^2} - 1 - x^2}{x^4}, and estimate the expression at x = 0.1.
SolutionSubstituting x^2 into the series for e^u,
Dividing by x^4 gives \displaystyle \frac12 + \frac{x^2}{6} + \frac{x^4}{24} + \cdots, so the limit is \displaystyle \frac12. L’Hopital’s rule would need four rounds, and each derivative of e^{x^2} brings a longer polynomial factor by the chain rule.
At x = 0.1 the series gives \displaystyle 0.5 + \frac{0.01}{6} + \frac{0.0001}{24} + \cdots \approx 0.501671. Computing \displaystyle \frac{e^{0.01} - 1.01}{0.0001} directly needs e^{0.01} to ten decimal places for six correct digits, because the subtraction cancels the leading digits; the series avoids that loss.
Two series in a quotient
Vukasin finds \displaystyle \displaystyle\lim_{x \to 0} \frac{\arctan x - x}{\ln(1 + x^3)}.
SolutionFor \lvert x \rvert < 1, \displaystyle \arctan x = x - \frac{x^3}{3} + \frac{x^5}{5} - \cdots, and substituting u = x^3 in \displaystyle \ln(1 + u) = u - \frac{u^2}{2} + \cdots gives \displaystyle \ln(1 + x^3) = x^3 - \frac{x^6}{2} + \cdots. Both start at x^3:
L’Hopital’s rule also needs three rounds here, now with quotient rule derivatives of \displaystyle \frac{1}{1 + x^2} and \displaystyle \frac{3x^2}{1 + x^3}.
A limit built from an integral with no formula
Andrej finds \displaystyle \displaystyle\lim_{x \to 0} \frac{1}{x^5}\left(\int_0^x \cos(t^2)\,dt - x\right).
SolutionThe integral has no formula, but its series does. From \displaystyle \cos(t^2) = 1 - \frac{t^4}{2} + \frac{t^8}{24} - \cdots, valid for every t,
Subtracting x and dividing by x^5 gives \displaystyle -\frac{1}{10} + \frac{x^4}{216} - \cdots, so the limit is \displaystyle -\frac{1}{10}. L’Hopital’s rule, using the derivative of an integral, turns the first round into \displaystyle \frac{\cos(x^2) - 1}{5x^4}, which still needs either four more rounds or this same series.
Boundaries
- Inside the interval of convergence. The interval of integration, and the point of a limit, must lie where the series equals the function. The series of \ln(1 + x^3) holds only for -1 < x \le 1, so it cannot estimate \int_0^{1.5} of anything built on it.
- The alternating bound needs decreasing terms from the stopping point on. For \int_0^2 e^{-x^3}\,dx the sizes rise for a while before they fall (Exercise 17).
- Positive terms need a tail bound. The first omitted term is not a bound on the error of a series with positive terms (Exercise 16); use a geometric tail or the Lagrange bound.
- Close to the center, or not at all in practice. Far from the center the series still converges, but the terms first grow large and cancel, so many terms and many digits are needed.
- A limit needs a series centered at its point. For x \to a use powers of x - a (Exercise 13); for x \to \infty substitute \displaystyle u = \frac1x and let u \to 0^+ (Exercise 12).
- The function must have a power series there. \displaystyle \sqrt{x} has none centered at 0, since its derivative is unbounded near 0, and the method says nothing about a limit involving it at 0.
Where this goes next
The Taylor remainder and the Lagrange error bound bounds the remainder of a Taylor polynomial directly, which handles series with positive terms and also integrals of polynomial approximations. The binomial series adds (1+x)^k to the list of series, so integrands such as \displaystyle \sqrt{1 + x^4} can be estimated the same way. Numerical rules such as Simpson’s rule, used in Choosing an integration technique, estimate the same integrals from values of the integrand; a series is the better tool near the center and gives a formula for the whole function \int_0^x f(t)\,dt, as in Representing functions as power series. The general theory sits in Taylor and Maclaurin series.
Exercises
Integrals with alternating series
- Estimate \int_0^{0.7} \cos(x^2)\,dx to within 10^{-5}.
- Estimate \displaystyle \int_0^{1} \frac{\sin(x/2)}{x}\,dx to within 10^{-6}, taking the integrand to be \displaystyle \frac12 at 0.
- How many terms of the series for \int_0^{0.4} \arctan(x^2)\,dx are needed for an error below 10^{-6}? Give the estimate.
- How many terms of the series for \int_0^{1} e^{-x^3}\,dx are needed for an error below 10^{-4}? Give the estimate and say whether it is high or low.
Integrals with positive terms
- Estimate \int_0^{0.4} e^{x^3}\,dx to within 10^{-5}, bounding the tail by a geometric series.
- The integrand \displaystyle -\frac{\ln(1 - x)}{x}, given the value 1 at 0, equals \displaystyle \sum_{n=1}^{\infty} \frac{x^{n-1}}{n} for \lvert x \rvert < 1. Estimate \displaystyle \int_0^{0.4} -\frac{\ln(1 - x)}{x}\,dx to within 10^{-4}.
Limits
Find each limit with series.
- \displaystyle \displaystyle\lim_{x \to 0} \frac{e^{3x} - 1 - 3x}{x^2}
- \displaystyle \displaystyle\lim_{x \to 0} \frac{\cos(2x) - 1 + 2x^2}{x^4}
- \displaystyle \displaystyle\lim_{x \to 0} \frac{\arctan(2x) - 2x}{x^3}
- \displaystyle \displaystyle\lim_{x \to 0} \frac{\ln(1 + x^2) - x^2}{x^2 \sin^2 x}
- \displaystyle \displaystyle\lim_{x \to 0} \frac{x\cos x - \sin x}{x^2 \sin x}, both with series and with L’Hopital’s rule. How many rounds does the rule take?
- \displaystyle \displaystyle\lim_{x \to \infty} x^2\left(e^{2/x} - 1 - \frac{2}{x}\right)
- \displaystyle \displaystyle\lim_{x \to 1} \frac{\ln x - (x - 1)}{(x - 1)^2}
- Find the number c for which \displaystyle \displaystyle\lim_{x \to 0} \frac{\sin(3x) - 3x + c\,x^3}{x^5} is a finite number, and find that limit.
- \displaystyle \displaystyle\lim_{x \to 0} \frac{1}{x^3}\left(x - \int_0^x e^{-t^2}\,dt\right)
Reasoning
- Vukasin stops the series of Exercise 6 after six terms and says the error is less than the first omitted term, \displaystyle \frac{0.4^7}{49}. Explain why the alternating series bound gives no such guarantee, and show that his claim is false.
- For \displaystyle \int_0^2 e^{-x^3}\,dx = \sum_{n=0}^{\infty} \frac{(-1)^n 2^{3n+1}}{(3n+1)\,n!}, find the first n from which the sizes of the terms decrease, and explain what this means for using the alternating series bound.
- Suppose f(x) = a x^k + (\text{higher powers}) and g(x) = c x^k + (\text{higher powers}) as power series with positive radius, c \ne 0. Prove that \displaystyle \lim_{x \to 0} \frac{f(x)}{g(x)} = \frac{a}{c}.
Answers
- \approx 0.68338. The series is \displaystyle \sum \frac{(-1)^n (0.7)^{4n+1}}{(4n+1)(2n)!}: 0.7 - 0.016807 + 0.0001868 = 0.6833798. The next size is \displaystyle \frac{0.7^{13}}{13 \cdot 720} \approx 1.04 \times 10^{-6}.
- \approx 0.4931076. The series is \displaystyle \sum \frac{(-1)^n}{2^{2n+1}(2n+1)(2n+1)!}: \displaystyle \frac12 - \frac{1}{144} + \frac{1}{19200} \approx 0.4931076. The next size is \displaystyle \frac{1}{4515840} \approx 2.2 \times 10^{-7}.
- Two terms, \approx 0.0212553. \displaystyle \arctan(x^2) = x^2 - \frac{x^6}{3} + \frac{x^{10}}{5} - \cdots integrates to \displaystyle \frac{0.4^3}{3} - \frac{0.4^7}{21} + \frac{0.4^{11}}{55} - \cdots. The third size, \displaystyle \frac{0.4^{11}}{55} \approx 7.6 \times 10^{-7}, is below 10^{-6}; the second, 7.8 \times 10^{-5}, is not.
- Six terms (n = 0 to 5), \approx 0.80745, low. The sizes are \displaystyle \frac{1}{(3n+1)\,n!}: \displaystyle b_5 = \frac{1}{1920} \approx 5.2 \times 10^{-4} and \displaystyle b_6 = \frac{1}{13680} \approx 7.3 \times 10^{-5}. \displaystyle S = 1 - \frac14 + \frac{1}{14} - \frac{1}{60} \displaystyle + \frac{1}{312} - \frac{1}{1920}, about 0.8074462; the first omitted term +b_6 is positive, so the estimate is low.
- \approx 0.40652. The series is \displaystyle \sum \frac{(0.4)^{3n+1}}{(3n+1)\,n!}: 0.4 + 0.0064 + 0.0001170 = 0.4065170. For n \ge 3 the ratio of consecutive terms is \displaystyle \frac{0.064(3n+1)}{(3n+4)(n+1)} < \frac{0.064}{n+1} \le 0.016, so the tail is at most \displaystyle \frac{a_3}{0.984} \approx 1.8 \times 10^{-6}, with \displaystyle a_3 = \frac{0.4^{10}}{60}.
- \approx 0.4492345 with six terms. Integrating gives \displaystyle \sum \frac{(0.4)^n}{n^2}, with ratio \displaystyle \frac{0.4\,n^2}{(n+1)^2} < 0.4. After six terms the tail is at most \displaystyle \frac{a_7}{0.6} = \frac{0.4^7}{49 \cdot 0.6} \approx 5.6 \times 10^{-5}; after five it is at least a_6 \approx 1.1 \times 10^{-4}. S_6 = 0.4 + 0.04 + 0.0071111 + 0.0016 + 0.0004096 + 0.0001138, which is 0.4492345. The tail is positive, so the integral lies between 0.4492345 and 0.4492345 + 0.0000557 = 0.4492902: the estimate is within 10^{-4}, though this interval does not settle the fourth decimal place.
- \displaystyle \frac92. \displaystyle e^{3x} - 1 - 3x = \frac{9x^2}{2} + \frac{9x^3}{2} + \cdots.
- \displaystyle \frac23. \displaystyle \cos(2x) = 1 - 2x^2 + \frac{2x^4}{3} - \cdots.
- \displaystyle -\frac83. \displaystyle \arctan(2x) = 2x - \frac{8x^3}{3} + \cdots.
- \displaystyle -\frac12. The numerator is \displaystyle -\frac{x^4}{2} + \frac{x^6}{3} - \cdots and the denominator \displaystyle x^2\left(x - \frac{x^3}{6} + \cdots\right)^2 = x^4 - \frac{x^6}{3} + \cdots.
- \displaystyle -\frac13, two rounds. Series: numerator \displaystyle x - \frac{x^3}{2} - x + \frac{x^3}{6} + \cdots = -\frac{x^3}{3} + \cdots, denominator x^3 + \cdots. L’Hopital: the first round gives \displaystyle \frac{-x\sin x}{2x\sin x + x^2\cos x} = \frac{-\sin x}{2\sin x + x\cos x} after cancelling x, still \displaystyle \frac00; the second gives \displaystyle \frac{-\cos x}{3\cos x - x\sin x} \to -\frac13.
- 2. With \displaystyle u = \frac1x \to 0^+, \displaystyle \frac{e^{2u} - 1 - 2u}{u^2} = 2 + \frac{4u}{3} + \cdots.
- \displaystyle -\frac12. With u = x - 1, \displaystyle \ln(1 + u) - u = -\frac{u^2}{2} + \frac{u^3}{3} - \cdots, which is a series centered at x = 1.
- \displaystyle c = \frac92, limit \displaystyle \frac{81}{40}. \displaystyle \sin(3x) - 3x = -\frac{9x^3}{2} + \frac{81x^5}{40} - \cdots; the x^3 term must cancel, else the expression is unbounded near 0.
- \displaystyle \frac13. \displaystyle \int_0^x e^{-t^2}\,dt = x - \frac{x^3}{3} + \frac{x^5}{10} - \cdots, so the expression is \displaystyle \frac13 - \frac{x^2}{10} + \cdots.
- All the terms are positive, so the alternating bound does not apply: every omitted term adds to the error instead of partly cancelling. The error is \displaystyle \sum_{n \ge 7} \frac{0.4^n}{n^2} \approx 4.85 \times 10^{-5}, larger than \displaystyle \frac{0.4^7}{49} \approx 3.34 \times 10^{-5}.
- From n = 6. The ratio is \displaystyle \frac{b_{n+1}}{b_n} = \frac{8(3n+1)}{(3n+4)(n+1)}, below 1 exactly when 3n^2 - 17n - 4 > 0, that is n \ge 6; the sizes run 2, 4, 9.14, \ldots, 34.13, 38.33, then 37.83. The bound holds only when stopping after n = 5 or later. The terms reach about 38 in size, while the integral is less than 2 because the integrand is at most 1 on an interval of length 2, so the estimate rests on heavy cancellation.
- Write f(x) = x^k F(x) and g(x) = x^k G(x), where F(x) = a + (\text{terms with } x) and G(x) = c + (\text{terms with } x) are power series with the same radius. A power series is continuous inside its interval, so F(x) \to a and G(x) \to c \ne 0. For x \ne 0 near 0, \displaystyle \frac{f(x)}{g(x)} = \frac{F(x)}{G(x)}, and the quotient rule for limits gives \displaystyle \frac{a}{c}.