Tutorials › AP Calculus › Using Taylor Series to Evaluate Constants

Taylor Series and Error Bounds · Tutorial 898 of 999

Using Taylor Series to Evaluate Constants

Use convergent arctangent and logarithmic series to represent constants, estimate their errors, and determine how many terms guarantee a stated precision.

Advanced 11 min read

What You'll Learn

  • Write pi and logarithmic values as sums from convergent Taylor series.
  • State where the arctangent and logarithmic series converge.
  • Bound the error after a chosen number of terms.
  • Use a tangent identity to obtain an efficient series representation for pi.
  • Determine when a partial sum guarantees a requested decimal rounding.

Representing Constants with Taylor Series

A Taylor series is useful not only for approximating a function at a chosen input. When a function value is itself a familiar constant, its series can provide an infinite representation of that constant and a systematic way to estimate it. For example, \(\arctan(1)=\pi/4\), and a logarithmic series can represent \(\ln 2\).

The key is to keep two tasks distinct: first establish a series that equals the constant; then use a valid remainder bound to determine how accurately a finite partial sum represents it. A long-looking decimal approximation alone does not show that the digits are correct.

Definition: A series representation of a constant is an infinite sum that converges to that constant. A partial sum uses only finitely many terms, and its error is the difference between the constant and that partial sum.

Two Series That Produce Constants

For \(|x|<1\), integrating the geometric series for \(1/(1+x^2)\) gives the arctangent series. At \(x=1\), the series also converges, and it equals \(\pi/4\). To see this, write \(\frac1{1+t^2}=\sum_{k=0}^{n}(-1)^k t^{2k}+\frac{(-1)^{n+1}t^{2n+2}}{1+t^2}\) and integrate from \(0\) to \(1\); the integrated remainder has absolute value at most \(\int_0^1 t^{2n+2}\,dt=\frac1{2n+3}\), which tends to zero.

$$ \arctan x =x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\cdots =\sum_{k=0}^{\infty}\frac{(-1)^k x^{2k+1}}{2k+1}, \qquad |x|\leq 1. $$

At the endpoints \(x=1\) and \(x=-1\), this series converges conditionally; for \(|x|<1\), it converges absolutely. In particular, substituting \(x=1\) gives the alternating representation of \(\pi/4\). Its terms decrease in magnitude to zero, so the alternating-series remainder is no larger than the first omitted term.

A second useful series comes from the identity \(\ln\!\left(\frac{1+x}{1-x}\right)=2\int_0^x\frac{1}{1-t^2}\,dt\), valid for \(|x|<1\). Expanding the integrand as a geometric series and integrating gives:

$$ \ln\!\left(\frac{1+x}{1-x}\right) =2\left(x+\frac{x^3}{3}+\frac{x^5}{5}+\cdots\right) =2\sum_{k=0}^{\infty}\frac{x^{2k+1}}{2k+1}, \qquad |x|<1. $$

All terms on the right are positive when \(0<x<1\). Consequently, the partial sums increase toward the logarithm; unlike the alternating arctangent series, the error is not bounded by simply taking the first omitted term. A useful upper bound comes from replacing each denominator in the tail by the first omitted denominator and summing the resulting geometric series.

Theorem: If \(0<x<1\) and \(S_N=2\sum_{k=0}^{N-1}\frac{x^{2k+1}}{2k+1}\), then $$ 0<\ln\!\left(\frac{1+x}{1-x}\right)-S_N \leq \frac{2x^{2N+1}}{(2N+1)(1-x^2)}. $$

Indeed, for every omitted index \(k\geq N\), \(2k+1\geq 2N+1\). Therefore the positive remainder is at most \(2/(2N+1)\) times the geometric tail \(x^{2N+1}+x^{2N+3}+\cdots\), which sums to \(x^{2N+1}/(1-x^2)\).

Worked Example: Representing Pi Efficiently

The direct series \(\pi=4\arctan(1)\) converges, but its terms decrease slowly. A faster representation follows from the identity \(\pi=16\arctan(1/5)-4\arctan(1/239)\). We first justify the identity, then use a few terms to approximate \(\pi\).

Let \(t=\arctan(1/5)\) and \(v=\arctan(1/239)\). The double-angle formula for tangent gives:

$$ \tan(2t)=\frac{2/5}{1-1/25}=\frac{5}{12}, \qquad \tan(4t)=\frac{2(5/12)}{1-(5/12)^2}=\frac{120}{119}. $$

Using the tangent subtraction formula,

$$ \tan(4t-v) = \frac{120/119-1/239}{1+(120/119)(1/239)} = \frac{28561/28441}{28561/28441} =1. $$

Also, \(0<v<t\), and \(0<4t<4/5<\pi/2\), so \(0<4t-v<\pi/2\). Tangent is one at exactly \(\pi/4\) in that interval. Thus \(4t-v=\pi/4\), which proves the stated identity after multiplying by four.

Use three terms for \(\arctan(1/5)\) and one term for \(\arctan(1/239)\):

$$ \begin{aligned} \arctan(1/5)&\approx \frac15-\frac{1}{3\cdot 5^3}+\frac{1}{5\cdot 5^5}\\ &=0.2-0.0026666667+0.000064\\ &\approx 0.1973973333,\\[4pt] \arctan(1/239)&\approx \frac{1}{239}\approx 0.0041841004. \end{aligned} $$

The resulting estimate is:

$$ \pi\approx 16(0.1973973333)-4(0.0041841004) \approx 3.1583573333-0.0167364017 \approx 3.1416209317. $$

For the first arctangent, the first omitted term has magnitude \(1/(7\cdot5^7)=1/546875\), so its error is at most that amount. For the second, the first omitted term has magnitude \(1/(3\cdot239^3)\). After applying the coefficients in the identity, the total error is at most:

$$ \frac{16}{546875}+\frac{4}{3\cdot239^3} = \frac{16}{546875}+\frac{4}{40955757} <0.00002936. $$

Therefore \(\pi\) lies between \(3.1416209317-0.00002936=3.1415915717\) and \(3.1416209317+0.00002936=3.1416502917\). Both endpoints round to \(3.142\) to three decimal places, so this approximation guarantees that rounding. As a check on the identity, the exact tangent calculation above gives \(\tan(4t-v)=1\) in the interval \((0,\pi/2)\), confirming that the angle used is \(\pi/4\).

Worked Example: Estimating ln 2

In the logarithmic series, choose \(x=1/3\). Then \((1+x)/(1-x)=2\), so the series represents \(\ln 2\). The first seven terms give:

$$ \begin{aligned} S_7 &=2\left(\frac13+\frac{1}{81}+\frac{1}{1215} +\frac{1}{15309}+\frac{1}{177147} +\frac{1}{1948617}+\frac{1}{20726199}\right)\\ &\approx 0.6931471703. \end{aligned} $$

To bound the omitted positive tail, let \(a_k=2/((2k+1)3^{2k+1})\), the term with index \(k\). The ratio of consecutive terms is:

$$ \frac{a_{k+1}}{a_k} =\frac{2k+1}{9(2k+3)} <\frac19. $$

The first omitted term is \(a_7=2/(15\cdot3^{15})\). Every subsequent term is less than one ninth of its predecessor, so the tail is less than a geometric series with first term \(a_7\) and ratio \(1/9\):

$$ 0<\ln 2-S_7 < \frac{9}{8}a_7 = \frac{9}{8}\cdot\frac{2}{15\cdot14348907} \approx 0.00000001046. $$

Thus \(0.6931471703<\ln 2<0.6931471808\), using the displayed rounded endpoints. Both bounds round to \(0.693147\) to six decimal places, so the series certifies that value. The partial sum is a lower bound because every omitted term is positive.

Worked Example: Choosing Terms for ln(3/2)

Suppose an estimate of \(\ln(3/2)\) is required with error less than \(10^{-6}\). Solve \((1+x)/(1-x)=3/2\): \(2+2x=3-3x\), hence \(x=1/5\). The logarithmic series applies because \(|1/5|<1\).

With \(N=4\) terms,

$$ \begin{aligned} S_4 &=2\left(\frac15+\frac{1}{3\cdot5^3} +\frac{1}{5\cdot5^5}+\frac{1}{7\cdot5^7}\right)\\ &=2\left(0.2+0.0026666667+0.000064+0.0000018285714\right)\\ &\approx 0.4054649905. \end{aligned} $$

Apply the positive-tail bound with \(x=1/5\) and \(N=4\):

$$ 0<\ln(3/2)-S_4 \leq \frac{2(1/5)^9}{9(1-1/25)} = \frac{50}{421875000} \approx 0.00000011852 <10^{-6}. $$

Therefore four terms guarantee an error below the requested tolerance. They place the value between approximately \(0.4054648719\) and \(0.4054651090\); both endpoints round to \(0.405465\) to six decimal places. This establishes that six-decimal rounding, as well as the looser error tolerance, without requiring the exact value of the logarithm. The series and its tail bound are the checks on the approximation.

Precision, Rounding, and a Common Pitfall

A stated tolerance and a stated number of correct decimal places are related but not identical tasks. To guarantee rounding to \(d\) decimal places, an error bound must place the entire possible interval for the constant within one rounding interval. For instance, rounding to six decimal places requires an interval lying wholly between two consecutive rounding midpoints, which are \(0.000001\) apart. A bound smaller than \(0.000001\) is useful, but the estimate must also be positioned so that the interval does not cross a midpoint.

A common mistake is to apply the alternating-series “first omitted term” bound to a positive logarithmic series. For \(\ln 2\), that would claim:

$$ \ln2-S_7\leq \frac{2}{15\cdot3^{15}} \approx 0.00000000929. $$

This bound is not justified: the remainder includes the first omitted term and all the later positive terms. The correction is to bound the entire tail, for example by the geometric estimate \(\frac98a_7\), as shown above. Conversely, the alternating-series bound is appropriate for the arctangent examples because their terms alternate in sign, decrease in magnitude, and approach zero.

These representations matter because they turn constants into computable quantities with explicit accuracy guarantees. The series chosen affects efficiency: \(\pi=4\arctan(1)\) is valid, but its terms decrease far more slowly than those in the arctangent identity using \(1/5\) and \(1/239\). Good approximation therefore involves both a convergent representation and a remainder estimate suited to that representation.

Check Your Understanding

For each question, identify the series or remainder bound that justifies your conclusion.

  1. Why can the arctangent series be used at \(x=1\), even though its interval of absolute convergence is \(|x|<1\)?
  2. For the logarithmic series, what value of \(x\) represents \(\ln(5/3)\)?
  3. Why is the first omitted term not, by itself, an upper bound for the positive tail in the series for \(\ln 2\)?
  4. Write the first omitted term for the three-term approximation to \(\arctan(1/5)\).
  5. What must be checked in addition to an error tolerance when the goal is guaranteed rounding to a specified number of decimal places?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon