Why logarithm error bounds need attention
The Taylor series for the natural logarithm is especially useful when its input is close to the center of expansion. But a polynomial approximation is only useful when its error can be controlled. For logarithms, the best bound depends on the sign of the input: positive inputs give an alternating series, while negative inputs do not.
This tutorial studies the Taylor polynomial of \(f(x)=\ln(1+x)\) centered at \(0\). For positive \(x\), the alternating-series estimate and the Lagrange remainder estimate are both available. Comparing them reveals an instructive feature: with the standard derivative bound, they give the same numerical error limit, although the alternating-series estimate also gives the error's sign. For negative \(x\), the alternating-series estimate does not apply, but a Lagrange bound remains available as long as \(x>-1\).
The logarithm series and its Taylor polynomial
The function \(f(x)=\ln(1+x)\) is defined for \(x>-1\). Its Taylor polynomial of degree \(n\) centered at \(0\), where \(n\) is a nonnegative integer, is
For \(n=0\), the sum is empty and \(T_0(x)=0\). For positive \(n\), its terms are \(x-x^2/2+x^3/3-\cdots\), truncated after the \(x^n\) term. Write the error as \(R_n(x)=\ln(1+x)-T_n(x)\). Its magnitude is the absolute error, \(|R_n(x)|\).
The conditions matter. For \(0<x\leq1\), the term magnitudes \(a_k=x^k/k\) decrease to zero: indeed,
So the alternating-series estimate applies, including at \(x=1\). When \(-1<x<0\), however, every nonzero term in the series for \(\ln(1+x)\) is negative; the terms do not alternate. The alternating-series estimate cannot be used there.
Why the first omitted term bounds the error
A short derivation shows both the sign and the size of the error for positive inputs. For \(t>-1\), the finite geometric-sum identity gives
Integrate from \(0\) to \(x\), where \(0<x\leq1\). The integral of \(1/(1+t)\) is \(\ln(1+x)\), and integrating each finite-sum term gives
Consequently, \(R_n(x)=(-1)^n\int_0^x t^n/(1+t)\,dt\). The integrand is positive, so the error has sign \((-1)^n\), which is also the sign of the first omitted term \((-1)^{n+2}x^{n+1}/(n+1)\). Moreover, \(1+t\geq1\) throughout the interval, so
This proves the stated bound directly. It also explains why the first omitted term matters: its magnitude is exactly the upper bound produced by replacing the denominator \(1+t\) with its lower bound \(1\).
Comparison with the Lagrange remainder
The Lagrange remainder theorem says that if \(f\) has \(n+1\) continuous derivatives on the interval between \(0\) and \(x\), then for some point \(\xi\) strictly between the endpoints,
For \(f(x)=\ln(1+x)\), differentiation gives, for every integer \(m\geq1\),
In particular, \(|f^{(n+1)}(t)|=n!/(1+t)^{n+1}\). The Lagrange bound uses an upper bound \(M\) for this derivative's magnitude over the interval:
For \(0\leq x\leq1\), the derivative magnitude is largest at \(t=0\), so \(M=n!\). Substitution gives \(x^{n+1}/(n+1)\), exactly the alternating-series bound. The alternating estimate additionally tells us the error's sign. For \(-1<x<0\), the largest derivative magnitude occurs at \(t=x\), where \(1+t=1+x\). Therefore the Lagrange bound becomes
This bound is valid because the interval from \(x\) to \(0\) lies inside the domain \(t>-1\). As \(x\) approaches \(-1\), its denominator becomes small, so the bound can grow substantially. That is a feature of the estimate, not a guarantee that the actual error is equally large.
Worked Example: Bound the error at a positive input
Worked Example: Approximate \(\ln(3/2)\)
Use the degree-three Taylor polynomial at \(x=1/2\), and compare the alternating-series and Lagrange bounds. The polynomial is
The first omitted term is negative:
Since \(0<1/2\leq1\), the alternating-series conditions hold. Thus the approximation overestimates \(\ln(3/2)\), and its error satisfies
For the Lagrange method, the fourth derivative has magnitude \(6/(1+t)^4\), which is at most \(6\) on \([0,1/2]\). Hence
The two bounds agree. As a further check, the next alternating term is \(1/160\), so the alternating-series bracketing gives \(-1/64\leq R_3(1/2)\leq-1/64+1/160=-3/320\). This interval is consistent with the error being negative and smaller in magnitude than \(1/64\).
Worked Example: Certify a closer approximation
Worked Example: Approximate \(\ln(1.1)\)
Take \(x=0.1=1/10\) and use the degree-two polynomial:
The first omitted term is positive, with magnitude
The alternating-series conditions hold because \(0<1/10\leq1\). Therefore \(T_2(1/10)\) is a lower bound, and
For Lagrange's theorem, the third derivative magnitude is \(2/(1+t)^3\), at most \(2\) on \([0,1/10]\). It gives the same bound:
As a check on the direction and size, the next omitted term is \(-1/40000\). Alternating-series bracketing therefore places the remainder between \(1/3000-1/40000=37/120000\) and \(1/3000\), both positive and no larger than the claimed bound.
Worked Example: Use Lagrange's bound for a negative input
Worked Example: Approximate \(\ln(3/4)\)
Here \(x=-1/4\), so the terms in the Taylor series are all negative. The alternating-series estimate is not applicable. Use the degree-three polynomial:
On \([-1/4,0]\), the fourth derivative magnitude \(6/(1+t)^4\) is largest at \(t=-1/4\). Thus \(M=6/(3/4)^4\), and the Lagrange estimate is
The fourth derivative is negative on this interval. The Lagrange remainder formula consequently shows that \(R_3(-1/4)<0\), so the polynomial is an upper bound for \(\ln(3/4)\). The calculated error limit is approximately \(0.00308642\), rounded to eight decimal places. The bound does not claim that the actual error equals this amount; it certifies that the error's magnitude is no greater than \(1/324\).
Choosing and interpreting the bound
For positive inputs, both methods require the input to lie in \(0<x\leq1\) for the alternating-series argument, while the Lagrange theorem requires the derivatives to exist throughout the interval from \(0\) to \(x\). On this positive interval, the usual derivative maximum gives the same magnitude limit as the first omitted term. The practical difference is that the alternating-series result also identifies whether the polynomial is above or below the logarithm.
For negative inputs, the logarithm and all its derivatives remain defined on the interval from \(x\) to \(0\) provided \(x>-1\). Lagrange's theorem then gives a valid bound, but the alternating-series result cannot be used because the Taylor terms have one sign. A useful habit is to check the input's sign and the method's conditions before substituting into an error formula.
These estimates turn a polynomial into a certified approximation rather than a guess. The error sign can tell you which side of the true logarithm the polynomial lies on, while the error magnitude tells you how far away it can be. Together, those facts support reliable numerical use of the logarithm series near its center.
Check Your Understanding
For each question, identify the method's conditions before computing an error estimate.
- For \(x=1/3\), what is the degree-two Taylor polynomial for \(\ln(1+x)\), and what is the alternating-series error bound?
- For \(x=1/2\), does a degree-four polynomial overestimate or underestimate \(\ln(1+x)\)? How can you determine the answer?
- Why does the alternating-series remainder bound not apply at \(x=-1/5\)?
- For \(x=-1/2\), which point in the interval \([-1/2,0]\) gives the maximum magnitude of the third derivative?
- When \(0<x\leq1\), what information does the alternating-series bound provide that the usual Lagrange magnitude bound does not?