Tutorials › Calculus II › Logarithmic Integrals and Their Associated Sums

Representing Functions by Series · Tutorial 796 of 998

Logarithmic Integrals and Their Associated Sums

Learn to integrate logarithm and arctangent series safely, including at endpoints, and turn their definite integrals into infinite sums.

Advanced 9 min read

What You'll Learn

  • Integrate logarithm and arctangent power series term by term on valid intervals
  • Handle endpoint integrals by limits rather than assuming endpoint convergence is uniform
  • Derive series for integrals of the logarithm and arctangent divided by the variable
  • Express definite integrals as alternating reciprocal-power sums
  • Check integrated series by differentiation and endpoint evaluation

From Function Series to Integral Identities

A power series can represent a function, but it can also represent an integral of that function. Integrating the terms often changes the coefficients in a useful way: logarithm and arctangent series lead naturally to sums involving reciprocal squares and related powers.

The key requirement is that termwise integration must be justified on the interval being used. Inside a power series’ radius of convergence, uniform convergence on closed subintervals provides a direct justification. At an endpoint, a separate limiting argument may be needed.

Central idea: If a power series represents a function on an interval, then on closed subintervals strictly inside its radius of convergence it can be integrated term by term. Endpoint identities require additional care; they do not follow merely from convergence at the endpoint.

The Series We Will Integrate

The logarithm and arctangent series derived from the geometric series are

$$ \ln(1+x)=\sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^n}{n}, \qquad -1<x<1, $$

and

$$ \arctan x=\sum_{n=0}^{\infty}\frac{(-1)^n x^{2n+1}}{2n+1}, \qquad -1<x<1. $$

The logarithm series also converges at \(x=1\), where its sum is \(\ln 2\). The arctangent series converges at both \(x=1\) and \(x=-1\), where its sums are \(\pi/4\) and \(-\pi/4\), respectively. These endpoint facts are useful, but convergence at an endpoint alone does not permit termwise integration there.

For any \(r\) with \(0<r<1\), each series converges uniformly on \([-r,r]\). Thus the sum can be integrated term by term on that interval. In particular, for \(a\) satisfying \(|a|<1\), integration from \(0\) to \(a\) is justified directly.

Integrating the Logarithm Series

Integrating \(\ln(1+x)\) from zero to \(x\) gives a useful series for an ordinary logarithmic integral. For \(|x|<1\), termwise integration yields

$$ \int_0^x \ln(1+t)\,dt = \sum_{n=1}^{\infty} \frac{(-1)^{n+1}x^{n+1}}{n(n+1)}. $$

The extra factor \(n+1\) in the denominator comes from integrating \(t^n\), while the original coefficient already contains \(1/n\). The integral can also be evaluated directly: an antiderivative is \((1+t)\ln(1+t)-(1+t)\). Subtracting its value at zero gives

$$ \int_0^x \ln(1+t)\,dt = (1+x)\ln(1+x)-x. $$

Worked Example: Integrating the Logarithm Series to One Half

Evaluate \(\int_0^{1/2}\ln(1+x)\,dx\) both as a power series and as an elementary expression.

Since \(1/2\) lies strictly inside the radius of convergence, integrate the logarithm series term by term:

$$ \begin{aligned} \int_0^{1/2}\ln(1+x)\,dx &=\sum_{n=1}^{\infty} \frac{(-1)^{n+1}(1/2)^{n+1}}{n(n+1)}\\ &=\frac18-\frac1{48}+\frac1{192}-\frac1{640}+\cdots. \end{aligned} $$

For example, the first four terms come from \(n=1,2,3,4\): they are \(1/8\), \(-1/48\), \(1/192\), and \(-1/640\), respectively. Evaluating the integral directly gives

$$ \begin{aligned} \int_0^{1/2}\ln(1+x)\,dx &=\left[(1+x)\ln(1+x)-x\right]_0^{1/2}\\ &=\frac32\ln\left(\frac32\right)-\frac12. \end{aligned} $$

The series identity is checked by differentiating its sum for \(|x|<1\): its derivative is \(\ln(1+x)\), and its value at \(x=0\) is zero. Those two facts agree with the defining integral.

A Logarithmic Integral That Produces a Sum

Dividing the logarithm series by \(x\) gives, for \(0<|x|<1\),

$$ \frac{\ln(1+x)}{x} = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n-1}}{n}. $$

At \(x=0\), the quotient has a removable singularity: its limit is \(1\), which is also the value of the series there. Integrating from \(0\) to \(a\), with \(|a|<1\), gives

$$ \int_0^a\frac{\ln(1+x)}{x}\,dx = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}a^n}{n^2}. $$

Here the integration contributes a factor \(1/n\) in addition to the \(1/n\) already present in the logarithm series. At \(a=1\), this becomes an identity between an integral and an alternating reciprocal-square sum. The endpoint requires justification because \(x=1\) is on the boundary of the logarithm series’ interval of convergence.

Endpoint justification: First integrate from \(0\) to \(r\), where \(0<r<1\). Then let \(r\) increase to \(1\). The integral tends to \(\int_0^1\ln(1+x)/x\,dx\), since the integrand extends continuously to \(x=0\) and is continuous on \([0,1]\). On the series side, the terms are bounded in absolute value by \(1/n^2\), whose sum converges. Therefore the series tends to the sum of its endpoint terms.

Worked Example: A Logarithmic Integral and an Alternating Sum

Express \(\int_0^1\ln(1+x)/x\,dx\) as an infinite sum.

For \(0\le r<1\), the termwise integration formula gives

$$ \int_0^r\frac{\ln(1+x)}{x}\,dx = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}r^n}{n^2}. $$

Taking the limit as \(r\) increases to \(1\), using the endpoint justification above, yields

$$ \int_0^1\frac{\ln(1+x)}{x}\,dx = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n^2} = 1-\frac14+\frac19-\frac1{16}+\cdots. $$

The integral is finite: near zero the integrand tends to \(1\), and at \(x=1\) it equals \(\ln 2\). As a further check on the series identity, differentiating the power series for \(|x|<1\) gives

$$ \frac{d}{dx} \left( \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^n}{n^2} \right) = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n-1}}{n} = \frac{\ln(1+x)}{x}. $$

The series is zero at \(x=0\), so it agrees with the integral from zero to \(x\) throughout \(|x|<1\). The endpoint identity follows from the limit argument, not from differentiating at \(x=1\).

Integrating the Arctangent Series

The arctangent series produces a different reciprocal-square sum when divided by \(x\). For \(0<|x|<1\),

$$ \frac{\arctan x}{x} = \sum_{n=0}^{\infty}\frac{(-1)^n x^{2n}}{2n+1}. $$

The quotient extends continuously to \(x=0\), with value \(1\). Integrating term by term for \(|x|<1\) gives

$$ \int_0^x\frac{\arctan t}{t}\,dt = \sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)^2}. $$

The denominator is squared because integrating \(t^{2n}\) adds a factor \(1/(2n+1)\). At \(x=1\), the endpoint series is the alternating sum of the reciprocals of the odd squares. This sum is commonly called Catalan’s constant:

$$ G=\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)^2} =1-\frac19+\frac1{25}-\frac1{49}+\cdots. $$

Worked Example: The Arctangent Integral for Catalan’s Constant

Show that \(\int_0^1\arctan x/x\,dx=G\).

First integrate on \([0,r]\) for \(0<r<1\):

$$ \int_0^r\frac{\arctan x}{x}\,dx = \sum_{n=0}^{\infty}\frac{(-1)^n r^{2n+1}}{(2n+1)^2}. $$

The integrand extends continuously to zero with value \(1\), and it is continuous up to \(x=1\). As \(r\) increases to \(1\), the integral tends to the integral over \([0,1]\). Each series term at \(r\in[0,1]\) is bounded in absolute value by \(1/(2n+1)^2\), and the sum of these bounds converges. Passing to the limit therefore gives

$$ \int_0^1\frac{\arctan x}{x}\,dx = \sum_{n=0}^{\infty}\frac{(-1)^n}{(2n+1)^2} =G. $$

For a check inside the interval, differentiate the series on any closed subinterval of \((-1,1)\). Its derivative is \(\sum_{n=0}^{\infty}(-1)^n x^{2n}/(2n+1)=\arctan(x)/x\). The series vanishes at zero, matching the integral’s value there. The endpoint identity again follows by taking a limit.

Why Termwise Integration Works

A useful general fact explains the method. Suppose a series of continuous functions \(\sum_{n=0}^{\infty} f_n(x)\) converges uniformly on a closed interval \([a,b]\). Then its sum \(f\) is continuous there, and

$$ \int_a^b f(x)\,dx = \sum_{n=0}^{\infty}\int_a^b f_n(x)\,dx. $$

To see why, let \(S_N(x)=\sum_{n=0}^{N}f_n(x)\). Uniform convergence means that for every \(\varepsilon>0\), some \(N\) satisfies \(|f(x)-S_N(x)|<\varepsilon/(b-a)\) for every \(x\in[a,b]\). Consequently,

$$ \left|\int_a^b f(x)\,dx-\int_a^b S_N(x)\,dx\right| \le \int_a^b |f(x)-S_N(x)|\,dx <\varepsilon. $$

But the integral of the finite sum \(S_N\) is the sum of its integrals. As \(N\) increases, those finite sums of integrals therefore approach the integral of \(f\), which proves the stated fact. Power series converge uniformly on every closed interval strictly inside their radius of convergence, so this result applies directly there.

A Common Mistake: Losing the Factor of \(x\)

When integrating \(\ln(1+x)/x\), it is easy to integrate the logarithm series as though the integrand were simply \(\ln(1+x)\). That produces the wrong powers and denominators.

$$ \text{Incorrect:}\qquad \int_0^x\frac{\ln(1+t)}{t}\,dt \overset{\text{wrong}}{=} \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n+1}}{n(n+1)}. $$

The right-hand side is the series for \(\int_0^x\ln(1+t)\,dt\), not for the integral with the extra divisor \(t\). To correct the calculation, first divide each term of the logarithm series by \(t\), then integrate:

$$ \frac{\ln(1+t)}{t} = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}t^{n-1}}{n} \quad\Longrightarrow\quad \int_0^x\frac{\ln(1+t)}{t}\,dt = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^n}{n^2}. $$

Differentiation exposes the error immediately: differentiating the incorrect expression gives \(\ln(1+x)\), whereas the required derivative is \(\ln(1+x)/x\).

Why These Identities Matter

Integration can turn a familiar function series into a precise identity for an infinite sum. The logarithm divided by its variable leads to alternating reciprocal squares; the arctangent divided by its variable leads to alternating reciprocal odd squares. These identities provide both a way to represent definite integrals and a way to interpret sums through calculus.

The main discipline is to keep track of two issues: how each term changes under integration, and whether the interval lies inside the convergence region or reaches an endpoint. When an endpoint is involved, integrate first on an interior interval and then justify the limit.

Check Your Understanding

Use the series and endpoint reasoning developed above to answer these questions.

  1. For \(|x|<1\), what series represents \(\int_0^x \ln(1+t)\,dt\), and what denominator appears in its \(n\)th term?
  2. Why does integrating \(\ln(1+x)/x\) produce a factor \(1/n^2\) rather than \(1/[n(n+1)]\)?
  3. Express \(\int_0^1\ln(1+x)/x\,dx\) as an infinite sum, and explain why the endpoint requires care.
  4. What sum is represented by \(\int_0^1\arctan x/x\,dx\)?
  5. How can differentiating an integrated power series help check that it is correct?