Topic 10.15 · BC

Use the resulting series

Builds on rechecking the convergence interval. 8 minutes.

An integral with no formula

The area under \(\cos(x^2)\) from 0 to 1 has no formula, because no elementary function has \(\cos(x^2)\) as its derivative. But \(\cos(x^2)\) has a series.

Substitute \(x^2\) into the series of the cosine to find \(1-\frac{x^4}{2}+\frac{x^8}{24}-\cdots\). Integrate each term from 0 to 1, and the area is the sum \(1-\frac1{10}+\frac1{216}-\cdots\).

Each teal dot is a partial sum, the sum of the first few terms, and the dashed line is the area. Drag the slider to keep more terms.

The terms alternate in sign, so the dots step down (red) and up (green) in turn and move closer to the line. The error of a partial sum is its distance from the line. Because the line lies between each dot and the next one, the error is less than the next term.

Any alternating series

The dots are now the partial sums \(S_n\) of any series whose terms alternate in sign, shrink in size and approach 0.

Drag the slider. The orange bracket is the next term, the step to the next dot, and the faint strip covers the same step.

The dashed line, the sum \(S\), stays inside the strip for every \(n\), so the error is less than the next term.

Notation

  1. To find a derivative at the center \(a\), use a coefficient. The coefficient \(c_n\) of \((x-a)^n\) is \(\frac{f^{(n)}(a)}{n!}\), where \(f^{(n)}\) is the \(n\)th derivative, so the derivative is \(n!\) times the coefficient.

    \[f^{(n)}(a)=\cy{n!\,c_n}\]
  2. To find a value, substitute \(x\) into the series and add the first few terms. The number \(x\) must lie inside the interval of convergence, because only there does the series equal the function.

    \[f(x)\approx c_0+c_1x+\cdots+c_Nx^N\]
  3. To find a definite integral, integrate the series term by term and evaluate between the limits. The constant cancels, so use \(C=0\).

    \[\int_0^b f(x)\,dx=\cb{\sum_{n=0}^{\infty}\dfrac{c_nb^{n+1}}{n+1}}\]
  4. If the terms alternate in sign, shrink and approach 0, the error is less than the first term that you leave out. The red bracket is the error, and the orange bracket is that term.

    \[\cr{\left|S-S_N\right|}<\cy{|a_{N+1}|}\]

When it fails

Make all signs positive, which gives \(\frac12+\frac14+\frac18+\frac1{16}+\cdots\), which adds to 1. After four terms, the partial sum is \(\frac{15}{16}\), so the error is \(\frac1{16}\).

The next term is only \(\frac1{32}\), so the red bracket is longer than the orange one. The dots climb without crossing the dashed line, so the line no longer lies between a dot and the next one.

Example 1: a function value

The series of \(\ln(1+x)\) is \(x-\dfrac{x^2}{2}+\dfrac{x^3}{3}-\cdots\) for \(-1\lt x\le1\). Estimate \(\ln1.2\) with an error less than 0.001.

  1. Write 1.2 as \(1+0.2\), so \(x=0.2\). This value lies inside the interval, so the series applies.

    \[\begin{aligned} \ln1.2&=0.2-\dfrac{0.2^2}{2}+\dfrac{0.2^3}{3} \\ &\quad-\dfrac{0.2^4}{4}+\cdots \end{aligned}\]
  2. Find the sizes of the first four terms.

    \[0.2,\quad 0.02,\quad 0.00267,\quad 0.0004\]
  3. The terms alternate, shrink and approach 0, so the error is less than the first term that you leave out. The third term, 0.00267, is more than 0.001, but the fourth term, 0.0004, is less, so stop before the fourth term.

  4. Add the first three terms. The error is less than 0.0004.

    \[0.2-0.02+0.00267\approx0.1827\]
  5. As a check, \(\ln1.2\approx0.18232\), and the estimate is within 0.0004 of it.

Example 2: a derivative at the center

Find \(f^{(5)}(0)\) for \(f(x)=xe^{3x}\).

  1. Substitute \(3x\) into the series of \(e^u\). Then multiply by \(x\). The first row of the table lists the coefficients, and the second row lists derivatives at 0 found by differentiating \(f\).

    \[\begin{aligned} xe^{3x}&=x+3x^2+\dfrac92x^3 \\ &\quad+\dfrac92x^4+\dfrac{27}{8}x^5+\cdots \end{aligned}\]
  2. A tempting wrong move: Read \(f^{(5)}(0)\) as the coefficient of \(x^5\).

    \[f^{(5)}(0)=\dfrac{27}{8}\]

    Test this rule on \(x^2\). The coefficient is 3, but the table shows \(f''(0)=6\), because the second derivative of \(3x^2\) is 6. A coefficient equals a derivative divided by a factorial.

  3. The coefficient of \(x^5\) is \(\frac{f^{(5)}(0)}{5!}\), so multiply it by \(5!=120\).

    \[f^{(5)}(0)=5!\cdot\dfrac{27}{8}=\cy{405}\]

Practice

Estimate \(\displaystyle\int_0^1\dfrac{1-e^{-x}}{x}\,dx\) with an error less than 0.001.

The graph shows the partial sums. Add terms until the orange bracket for the next term is shorter than 0.001.

Solution
  1. The series of \(1-e^{-x}\) is \(x-\frac{x^2}{2}+\frac{x^3}{6}-\cdots\). Divide each term by \(x\).

    \[\begin{aligned} \dfrac{1-e^{-x}}{x}&=1-\dfrac{x}{2}+\dfrac{x^2}{6} \\ &\quad-\dfrac{x^3}{24}+\dfrac{x^4}{120}-\cdots \end{aligned}\]
  2. Integrate each term from 0 to 1.

    \[\begin{aligned} &1-\dfrac14+\dfrac1{18}-\dfrac1{96} \\ &\quad+\dfrac1{600}-\dfrac1{4320}+\cdots \end{aligned}\]
  3. The terms alternate, shrink and approach 0, so the error is less than the first term left out. The sizes are 1, 0.25, 0.0556, 0.0104, 0.00167 and 0.00023, so stop before the sixth term, the first below 0.001.

  4. Add the first five terms.

    \[\begin{aligned} &1-\dfrac14+\dfrac1{18}-\dfrac1{96}+\dfrac1{600} \\ &\quad\approx0.7968 \end{aligned}\]

Questions

The graph shows the partial sums of the series for \(\int_0^1\dfrac{1-\cos x}{x^2}\,dx\). The terms are \(\frac12\), \(-\frac1{72}\), \(\frac1{3600}\), \(-\frac1{282240}\) and so on. They alternate, shrink and approach 0.

  1. After two terms, the partial sum is about 0.4861. What is the largest the error can be?

    • \(\dfrac1{3600}\)
    • \(\dfrac1{72}\)
    • \(\dfrac1{282240}\)
    Answer

    \(\dfrac1{3600}\)

  2. What is the smallest number of terms that guarantees an error less than 0.001?

    • 2
    • 1
    • 3
    Answer

    2

  3. The function \(f(x)=\dfrac{x^2}{1+2x}\) has the series \(x^2-2x^3+4x^4-8x^5+16x^6-\cdots\). What is \(f^{(6)}(0)\)?

    • 11520
    • 16
    • 384
    • 1920
    Answer

    11520

Summary

You read the answer from the series: a coefficient times \(n!\) gives a derivative, a substitution gives a value, and integration gives an integral.

This works because the series equals the function inside its interval, and an alternating series has an error less than its first omitted term.

You use it when a function has no convenient formula for its antiderivative, or when you need a number to a stated accuracy.

This is one of five skills in topic 10.15 of Which & Why: AP Calculus.