Tutorials › Measure Theory › Dirichlet’s Test for Oscillatory Improper Integrals

Comparing Riemann and Lebesgue Integrals · Tutorial 326 of 798

Dirichlet's Test for Oscillatory Improper Integrals

Learn how bounded oscillation combines with a weight tending to zero to ensure improper-integral convergence, and how to compute a classic example.

Advanced 10 min read

What You'll Learn

  • State the hypotheses of Dirichlet’s test for improper integrals
  • Prove the test using integration by parts and a tail estimate
  • Apply the test to weighted sine and cosine integrals
  • Evaluate the improper integral of sin(x)/x
  • Recognize why bounded primitives alone do not guarantee convergence

Oscillation and Decay

An improper integral can converge even when its integrand is not absolutely integrable: positive and negative contributions may cancel over longer and longer intervals. Dirichlet’s test makes this mechanism precise. It combines a function whose accumulated integral stays bounded with a nonnegative weight that decreases to zero. The weight suppresses the remaining oscillations in the tail.

Throughout, functions in the test and examples are real-valued and continuous on their stated intervals, and hence Lebesgue measurable with respect to Lebesgue measure \(m\) on \(\mathbb{R}\). The integrals in the test are improper Riemann integrals: for a continuous \(f\) on \([a,\infty)\), convergence means that the finite-interval integrals \(\int_a^R f(x)\,dx\) have a finite limit as \(R\to\infty\). This is a statement about that limit; it does not by itself assert that \(\int_a^\infty |f|\,dm\) is finite.

Theorem (Dirichlet’s test): Let \(a\in\mathbb{R}\), let \(g:[a,\infty)\to\mathbb{R}\) be continuous, and suppose its primitive \(P(x)=\int_a^x g(t)\,dt\) is bounded: \(|P(x)|\le M\) for all \(x\ge a\), for some finite \(M\ge0\). Let \(h:[a,\infty)\to[0,\infty)\) be continuous, nonincreasing, and satisfy \(\lim_{x\to\infty}h(x)=0\). Then the improper Riemann integral \(\int_a^\infty g(x)h(x)\,dx\) converges. For every \(v\ge u\ge a\), its finite-interval tails satisfy \(\left|\int_u^v g(x)h(x)\,dx\right|\le 2M h(u)\).

Proof and Tail Estimate

Proof. Fix \(u\ge a\) and define \(Q(x)=\int_u^x g(t)\,dt=P(x)-P(u)\) for \(x\ge u\). The assumed bound on \(P\) gives \(|Q(x)|\le 2M\), and \(Q(u)=0\). On a finite interval \([u,v]\), integration by parts for a continuous function \(Q\) and a continuous monotone function \(h\) gives \[ \int_u^v h(x)g(x)\,dx=h(v)Q(v)-\int_u^v Q\,dh. \] Here \(\int Q\,dh\) is the Riemann–Stieltjes integral, defined by limits of sums \( \sum_i Q(\xi_i)(h(x_i)-h(x_{i-1}))\) over partitions of \([u,v]\), with \(\xi_i\in[x_{i-1},x_i]\). It exists because \(Q\) is continuous and \(h\) is monotone. The integration-by-parts identity follows by summing the finite telescoping identity for the increments of \(hQ\) and taking the partition mesh to zero. Since \(h\) is nonincreasing, each increment of \(h\) is nonpositive, so the defining sums also give \[ \left|\int_u^v Q\,dh\right|\le \sup_{x\in[u,v]}|Q(x)|\bigl(h(u)-h(v)\bigr)\le 2M\bigl(h(u)-h(v)\bigr). \] The boundary term is bounded by \(|h(v)Q(v)|\le 2Mh(v)\). Consequently, \[ \left|\int_u^v g(x)h(x)\,dx\right| \le 2Mh(v)+2M\bigl(h(u)-h(v)\bigr) =2Mh(u). \] To verify convergence, let \(\varepsilon>0\). If \(M=0\), the displayed tail bound is zero for all \(u,v\), so the finite-interval integrals satisfy the Cauchy criterion. If \(M>0\), the condition \(h(u)\to0\) gives \(U\ge a\) such that \(2Mh(U)<\varepsilon\). For any \(v\ge u\ge U\), monotonicity gives \(h(u)\le h(U)\), and therefore \(\left|\int_u^v gh\right|\le2Mh(U)<\varepsilon\). Thus the finite-interval integrals satisfy the Cauchy criterion as their upper endpoints tend to infinity, so they converge to a finite real number. This proves both the test and its stated tail estimate. \(\square\)

The estimate explains the role of each hypothesis. Boundedness of the primitive controls the accumulated oscillation; monotonicity lets the weight be handled by integration by parts; and decay of the weight makes the bound on distant tails arbitrarily small. The bound concerns a signed integral over the whole tail, not the integral of the absolute value.

Applications

Worked Example: The Integral of sin(x)/x

Consider \(\int_0^\infty \frac{\sin x}{x}\,dx\), where the integrand at \(x=0\) is defined by its continuous value \(1\). The interval near zero causes no improper singularity. On \([1,\infty)\), take \(g(x)=\sin x\) and \(h(x)=1/x\). The primitive based at \(1\) is \(P(x)=\int_1^x\sin t\,dt=\cos 1-\cos x\). Since both \(\cos 1\) and \(\cos x\) lie in \([-1,1]\), \(|P(x)|\le2\). The weight is nonnegative, continuous, nonincreasing, and tends to zero. Dirichlet’s test proves convergence on \([1,\infty)\); continuity at zero proves convergence of the full improper integral.

The tail estimate also gives a concrete error bound. For \(R\ge1\), choose \(u=R\) and \(M=2\); for every \(v\ge R\), \[ \left|\int_R^v\frac{\sin x}{x}\,dx\right|\le 2\cdot2\cdot\frac1R=\frac4R. \] Thus the tails tend to zero uniformly in the finite endpoint \(v\).

We can also evaluate the integral. For \(t>0\), define \(J(t)=\int_0^\infty e^{-tx}\frac{\sin x}{x}\,dx\). This integral is absolutely convergent: near zero, \(|\sin x|/x\le1\), and for \(x\ge1\), its absolute value after damping is at most \(e^{-tx}\). Differentiation under the integral is justified locally around any fixed \(t>0\) by the Dominated Convergence Theorem: for nearby parameters \(s\ge t/2\), the derivative integrand has absolute value \(|e^{-sx}\sin x|\le e^{-tx/2}\), an integrable function on \([0,\infty)\). Hence \[ J'(t)=-\int_0^\infty e^{-tx}\sin x\,dx=-\frac1{1+t^2}. \] For the last equality, an antiderivative of \(e^{-tx}\sin x\) is \(e^{-tx}(-t\sin x-\cos x)/(1+t^2)\); evaluating at zero and infinity gives \(1/(1+t^2)\). Also, \(|J(T)|\le\int_0^\infty e^{-Tx}\,dx=1/T\), because \(|\sin x|/x\le1\). Integrating the formula for \(J'\) from \(t\) to \(T\) and letting \(T\to\infty\) yields \(J(t)=\int_t^\infty(1+s^2)^{-1}\,ds=\arctan(1/t)\).

It remains to justify that this damped value tends to the original improper integral as \(t\downarrow0\). On every finite interval \([0,R]\), the integrands converge pointwise and are bounded in absolute value by \(1\), so the Dominated Convergence Theorem gives convergence of their integrals. On \([R,\infty)\), the Dirichlet tail bound is at most \(4/R\), both for \(h(x)=1/x\) and for \(h_t(x)=e^{-tx}/x\): each is nonnegative and nonincreasing, and \(h_t(R)\le1/R\). Given \(\varepsilon>0\), choose \(R\) with \(4/R<\varepsilon/3\); then choose \(t\) small enough that the finite-interval integrals on \([0,R]\) differ by less than \(\varepsilon/3\). The difference between the two full improper integrals is then less than \(\varepsilon\), by bounding each of the two tails by \(4/R\). Therefore the original integral equals \(\lim_{t\downarrow0}J(t)=\pi/2\). Check: \(\arctan(1/t)\to\pi/2\) as \(t\downarrow0\), in agreement with the established improper-integral limit.

Worked Example: A Shifted Cosine Weight

Consider \(\int_0^\infty \frac{\cos(2x)}{x+1}\,dx\). Set \(g(x)=\cos(2x)\) and \(h(x)=1/(x+1)\). The primitive based at zero is \(P(x)=\int_0^x\cos(2t)\,dt=\sin(2x)/2\), so \(|P(x)|\le1/2\). The weight is continuous, nonnegative, nonincreasing, and tends to zero. The test therefore proves convergence. Using \(M=1/2\), for every \(v\ge u\ge0\) the tail estimate is \[ \left|\int_u^v\frac{\cos(2x)}{x+1}\,dx\right| \le 2\cdot\frac12\cdot\frac1{u+1} =\frac1{u+1}. \] For example, at \(u=3\) this bound is \(1/(3+1)=1/4\), uniformly for all \(v\ge3\). Check: the bound tends to zero as \(u\to\infty\), which is the Cauchy tail condition required for convergence.

Worked Example: Slower Decay with sin(3x)

Consider \(\int_1^\infty \frac{\sin(3x)}{\sqrt{x}}\,dx\). Choose \(g(x)=\sin(3x)\) and \(h(x)=x^{-1/2}\). The primitive based at \(1\) is \(P(x)=(\cos 3-\cos(3x))/3\), so \(|P(x)|\le2/3\). The weight is continuous, nonnegative, nonincreasing on \([1,\infty)\), and tends to zero. Thus the integral converges. With \(M=2/3\), its finite tail satisfies \[ \left|\int_u^v\frac{\sin(3x)}{\sqrt{x}}\,dx\right| \le 2\cdot\frac23\cdot\frac1{\sqrt{u}} =\frac4{3\sqrt{u}} \qquad (v\ge u\ge1). \] At \(u=16\), the bound is \(4/(3\sqrt{16})=4/(3\cdot4)=1/3\). Check: as \(u\to\infty\), \(4/(3\sqrt{u})\to0\), as required. The test proves convergence without requiring the weight to decay as fast as \(1/x\).

A Common Pitfall: Bounded Oscillation Is Not Enough

A bounded primitive alone does not imply convergence of the improper integral. For example, take \(g(x)=\sin x\) and \(h(x)=1\) on \([0,\infty)\). The primitive \(P(x)=1-\cos x\) is bounded, but the weight does not tend to zero. The finite-interval integrals are \(\int_0^R\sin x\,dx=1-\cos R\). At \(R=2\pi n\) this value is \(0\), while at \(R=(2n+1)\pi\) it is \(2\), for integers \(n\ge0\); hence the limit does not exist.

A tempting but incorrect argument is to say, “\(\int_0^R\sin x\,dx\) stays bounded, so \(\int_0^\infty\sin x\,dx\) converges.” Boundedness of the truncated integrals is not the Cauchy criterion: their values must approach one limit. Dirichlet’s test supplies the missing condition by requiring a decreasing weight that tends to zero. It is a convergence test for oscillatory improper integrals, not a test for absolute integrability.

Check Your Understanding

For each question, identify the primitive bound and verify the weight conditions before applying Dirichlet’s test.

  1. Use the test to prove convergence of \(\int_1^\infty \cos x\,x^{-1/3}\,dx\), and give a bound for the integral from \(R\) to \(S\), where \(S\ge R\ge1\).
  2. For \(g(x)=\sin(2x)\) on \([0,\infty)\), find a bound \(M\) for the primitive based at zero.
  3. Explain why the test does not apply to \(\int_0^\infty\sin x\,dx\), and determine whether that improper integral converges.
  4. In the proof of Dirichlet’s test, where is the condition \(h(x)\to0\) used to obtain the Cauchy criterion?
  5. Does convergence by Dirichlet’s test alone imply that \(\int_a^\infty |g(x)h(x)|\,dm\) is finite? Explain the distinction.