Chapter 4 · Integration: Riemann to Lebesgue

4.2 Improper Integrals

Integrals over unbounded intervals and of unbounded functions: the $p$-tests, comparison and limit comparison, absolute versus conditional convergence, the Dirichlet and Abel tests, $\int_0^\infty\frac{\sin x}{x}\,dx=\frac\pi2$, the Gamma and Beta functions and the Cauchy principal value.

The Riemann integral of §4.1 lives on a bounded interval and only accepts bounded functions. Yet the integrals that matter most in applications break both rules: the normal density $\tfrac1{\sqrt{2\pi}}e^{-x^2/2}$ is integrated over the whole line, the Gamma function $\int_0^\infty x^{s-1}e^{-x}\,dx$ has an infinite range and, for $s\lt1$, an infinite integrand at $0$; the escape velocity of a rocket is an integral of $1/r^2$ out to infinity; the electric potential of a point charge has a singularity. An improper integral is defined as a limit of proper ones, and the whole subject is about deciding when that limit exists.

The decision is usually made by comparison — near a bad point, how fast does the integrand blow up or decay, compared with a power $x^{-p}$? — and, for oscillating integrands such as $\frac{\sin x}{x}$, by cancellation, which needs the subtler Dirichlet and Abel tests. CSIR NET asks for exactly these decisions: Part B questions of the form "for which $p$ does this integral converge?" or "evaluate using Gamma/Beta", and Part C questions that mix absolutely convergent, conditionally convergent and divergent integrals among the options, or test whether convergence of $\int f$ forces $f(x)\to0$.

Improper Integrals of the First and Second Kind

We say $f$ is locally integrable on an interval $J$ if $f$ is Riemann integrable on every closed bounded subinterval of $J$ (in particular $f$ is bounded on each of them).

📘 Definition 4.6 — Improper integrals over unbounded intervals (first kind)

Let $f$ be locally integrable on $[a,\infty)$. If the limit $$\int_a^\infty f(x)\,dx=\lim_{b\to\infty}\int_a^bf(x)\,dx$$ exists in $\mathbb{R}$, the improper integral converges; otherwise it diverges (to $\pm\infty$, or by oscillation). $\int_{-\infty}^bf$ is defined in the same way. For $f$ locally integrable on $\mathbb{R}$, $\int_{-\infty}^{\infty}f$ converges if both $\int_{-\infty}^cf$ and $\int_c^\infty f$ converge for some (hence every) $c$, and then $\int_{-\infty}^\infty f=\int_{-\infty}^cf+\int_c^\infty f$.

The two limits must exist independently: $\int_{-\infty}^\infty x\,dx$ diverges, although $\int_{-R}^Rx\,dx=0$ for every $R$ (that symmetric limit is the principal value, Definition 4.10).

📘 Definition 4.7 — Improper integrals of unbounded functions (second kind)

Let $f$ be locally integrable on $(a,b]$ (typically unbounded near $a$). If $$\int_a^bf(x)\,dx=\lim_{c\to a^+}\int_c^bf(x)\,dx$$ exists in $\mathbb{R}$, the integral converges. Similarly at the right end point $b$. If $f$ has finitely many "bad points" (singularities, or $\pm\infty$), split the interval at points between them; the integral converges if and only if every piece converges, and its value is the sum.

If $f$ happens to be Riemann integrable on $[a,b]$, the improper integral converges to the ordinary one, because $c\mapsto\int_c^bf$ is continuous (Theorem 4.8). So the notation is unambiguous.

📐 Theorem 4.11 — The $p$-tests
  1. $\displaystyle\int_1^\infty\frac{dx}{x^p}$ converges if and only if $p\gt1$, and then equals $\dfrac1{p-1}$.
  2. $\displaystyle\int_0^1\frac{dx}{x^p}$ converges if and only if $p\lt1$, and then equals $\dfrac1{1-p}$.
  3. $\displaystyle\int_2^\infty\frac{dx}{x(\log x)^q}$ converges if and only if $q\gt1$.
  4. $\displaystyle\int_0^\infty e^{-ax}\,dx$ converges if and only if $a\gt0$, and then equals $\dfrac1a$.

Proof. All four integrands are continuous with explicit antiderivatives. (1) For $p\ne1$, $\int_1^bx^{-p}dx=\frac{1-b^{1-p}}{p-1}$, which tends to $\frac1{p-1}$ if $p\gt1$ (since $b^{1-p}\to0$) and to $+\infty$ if $p\lt1$; for $p=1$ it is $\log b\to\infty$. (2) For $p\ne1$, $\int_c^1x^{-p}dx=\frac{1-c^{1-p}}{1-p}$, which tends to $\frac1{1-p}$ as $c\to0^+$ if $p\lt1$, and to $+\infty$ if $p\gt1$; for $p=1$ it is $-\log c\to\infty$. (3) Substitute $u=\log x$: $\int_2^b\frac{dx}{x(\log x)^q}=\int_{\log2}^{\log b}\frac{du}{u^q}$, and apply (1) (the lower limit $\log2\gt0$ does not matter). (4) $\int_0^be^{-ax}dx=\frac{1-e^{-ab}}a$ for $a\ne0$, and $b$ for $a=0$. ∎

Notice the two thresholds point in opposite directions: at infinity we need fast decay ($p\gt1$), near $0$ we need a mild singularity ($p\lt1$). Consequently $\int_0^\infty x^{-p}\,dx$ diverges for every $p$. The borderline $p=1$ diverges at both ends, but only logarithmically — and part (3) shows that a power of a logarithm can tip the balance.

📐 Theorem 4.12 — Cauchy criterion for improper integrals
Let $f$ be locally integrable on $[a,\infty)$. Then $\int_a^\infty f$ converges if and only if for every $\varepsilon\gt0$ there is $A\ge a$ such that $$\Big|\int_x^yf(t)\,dt\Big|\lt\varepsilon\qquad\text{for all }y\gt x\ge A.$$ The analogous statement holds for integrals of the second kind (with $x,y$ close to the bad point).

Proof. Let $F(b)=\int_a^bf$, so $\int_x^yf=F(y)-F(x)$. If $F(b)\to I$, choose $A$ with $|F(b)-I|\lt\varepsilon/2$ for $b\ge A$; then $|F(y)-F(x)|\lt\varepsilon$. Conversely, if the condition holds, then for every sequence $b_n\to\infty$ the sequence $F(b_n)$ is Cauchy, hence converges (completeness of $\mathbb{R}$, §2.1); interleaving two such sequences shows that all the limits coincide, and the sequential characterisation of limits gives $\lim_{b\to\infty}F(b)=I$. ∎

✏️ Example 1 — Straight from the definition
Evaluate, or show divergence: (a) $\int_0^1\log x\,dx$; (b) $\int_0^\infty xe^{-x}\,dx$; (c) $\int_{-\infty}^\infty\frac{dx}{1+x^2}$; (d) $\int_{-1}^1\frac{dx}{x^2}$.
(a) $-1$ $\log x$ is unbounded near $0$ (second kind). For $0\lt c\lt1$, $\int_c^1\log x\,dx=\big[x\log x-x\big]_c^1=-1-c\log c+c$. Since $c\log c\to0$ as $c\to0^+$ (§3.3, L'Hôpital), the integral is $-1$.
(b) $1$ By parts, $\int_0^bxe^{-x}dx=\big[-xe^{-x}-e^{-x}\big]_0^b=1-(b+1)e^{-b}\to1$.
(c) $\pi$ Split at $0$: $\int_0^\infty\frac{dx}{1+x^2}=\lim_{b\to\infty}\tan^{-1}b=\frac\pi2$ and likewise $\int_{-\infty}^0=\frac\pi2$. Both converge, so the total is $\pi$.
(d) Diverges The naive computation $\big[-\tfrac1x\big]_{-1}^1=-2$ is nonsense — a positive integrand cannot have a negative integral. The point $0$ is a singularity, so split: $\int_0^1x^{-2}dx$ diverges by Theorem 4.11(2) ($p=2\ge1$), hence so does the whole integral. The fundamental theorem needs $F'=f$ on the whole closed interval.

Comparison Tests for Non-negative Integrands

For a non-negative integrand the partial integrals $F(b)=\int_a^bf$ increase with $b$, so by the monotone convergence principle (§2.1) they either converge or tend to $+\infty$. Everything rests on this one observation.

📐 Theorem 4.13 — Comparison test
Let $f,g$ be locally integrable on $[a,\infty)$.
  1. If $f\ge0$, then $\int_a^\infty f$ converges if and only if $F(b)=\int_a^bf$ is bounded above.
  2. If $0\le f(x)\le g(x)$ for all $x\ge a$ (or for all large $x$), then: $\int_a^\infty g$ converges $\Rightarrow\int_a^\infty f$ converges; and $\int_a^\infty f$ diverges $\Rightarrow\int_a^\infty g$ diverges.
  3. (Integral test.) If $f\ge0$ is decreasing on $[1,\infty)$, then $\int_1^\infty f$ and $\sum_{n\ge1}f(n)$ converge or diverge together, and $\sum_{n=2}^Nf(n)\le\int_1^Nf\le\sum_{n=1}^{N-1}f(n)$.
The same statements hold for integrals of the second kind.

Proof. (1) $F$ is increasing, so $\lim_{b\to\infty}F(b)=\sup_bF(b)$, which is finite iff $F$ is bounded (§1.2). (2) If the inequality holds for $x\ge A$, then $\int_A^bf\le\int_A^bg\le\int_A^\infty g$, so the partial integrals of $f$ beyond $A$ are bounded; apply (1) (the piece over $[a,A]$ is a proper integral). The second implication is the contrapositive. (3) For $k\le x\le k+1$, $f(k+1)\le f(x)\le f(k)$; integrate over $[k,k+1]$ and sum from $k=1$ to $N-1$. Both partial sums and partial integrals are increasing, and each is bounded iff the other is. ∎

📐 Theorem 4.14 — Limit comparison test
Let $f,g$ be locally integrable on $[a,\infty)$ with $f\ge0$ and $g\gt0$, and suppose $\displaystyle\lim_{x\to\infty}\frac{f(x)}{g(x)}=L$.
  1. If $0\lt L\lt\infty$, then $\int_a^\infty f$ and $\int_a^\infty g$ converge or diverge together.
  2. If $L=0$ and $\int_a^\infty g$ converges, then $\int_a^\infty f$ converges.
  3. If $L=\infty$ and $\int_a^\infty g$ diverges, then $\int_a^\infty f$ diverges.
The same holds at a singular end point $c$, with $x\to c$.

Proof. (1) There is $A$ with $\frac L2\le\frac{f(x)}{g(x)}\le2L$ for $x\ge A$, i.e. $\frac L2g\le f\le2Lg$ there; apply Theorem 4.13(2) in both directions. (2) Eventually $f\le g$. (3) Eventually $f\ge g$. ∎

🧭 Problem-solving strategy — power counting
  1. Locate the bad points: $\pm\infty$, and every point where the integrand is unbounded. Split the integral so that each piece has exactly one bad point, and test each piece separately — all must converge.
  2. Find the leading behaviour at each bad point: $f(x)\sim Cx^{-p}$ as $x\to\infty$, or $f(x)\sim C|x-c|^{-p}$ as $x\to c$ (use Taylor expansions: $\sin x\sim x$, $1-\cos x\sim\tfrac{x^2}2$, $e^x-1\sim x$, $\log(1+x)\sim x$, $x-\sin x\sim\tfrac{x^3}6$).
  3. Apply the $p$-test by limit comparison: at $\infty$ converge iff $p\gt1$; at a finite point converge iff $p\lt1$.
  4. Logs and exponentials: $e^{-x}$ beats every power ($x^ke^{-x}\le x^{-2}$ for large $x$); every power beats every power of $\log$ ($(\log x)^k\le x^\delta$ for large $x$, any $\delta\gt0$). So $\int_2^\infty\frac{dx}{x^p(\log x)^q}$ is decided by $p$ alone unless $p=1$, where $q$ decides (Theorem 4.11(3)).
  5. Sign changes? Comparison tests need $f\ge0$ (at least eventually). For oscillating integrands go to the next subsection.
✏️ Example 2 — A two-parameter family
For which real $p$ and $q\gt0$ does $\displaystyle\int_0^\infty\frac{x^p}{1+x^q}\,dx$ converge?
Split The integrand is positive and continuous on $(0,\infty)$; the possible bad points are $0$ (if $p\lt0$) and $\infty$. Split at $1$.
Near $0$ $\dfrac{x^p}{1+x^q}\Big/x^p\to1$, so $\int_0^1$ behaves like $\int_0^1x^{p}dx=\int_0^1x^{-(-p)}dx$: convergent iff $-p\lt1$, i.e. $p\gt-1$.
Near $\infty$ $\dfrac{x^p}{1+x^q}\Big/x^{p-q}\to1$, so $\int_1^\infty$ behaves like $\int_1^\infty x^{-(q-p)}dx$: convergent iff $q-p\gt1$.
Answer Converges iff $-1\lt p\lt q-1$. For instance $\int_0^\infty\frac{dx}{1+x^2}$ ($p=0,q=2$) converges, $\int_0^\infty\frac{x\,dx}{1+x^2}$ ($p=1,q=2$) diverges, and $\int_0^\infty\frac{dx}{\sqrt x(1+x)}$ ($p=-\tfrac12,q=1$) converges (to $\pi$, Exercise II.3). The value, when it converges, is $\dfrac{\pi}{q\sin\big((p+1)\pi/q\big)}$ — from the Beta function and the reflection formula (Theorem 4.19).
✏️ Example 3 — Four convergence decisions
Decide convergence; evaluate (b) and (d). (a) $\int_0^\infty e^{-x^2}dx$; (b) $\int_0^1\frac{dx}{\sqrt{x(1-x)}}$; (c) $\int_2^\infty\frac{dx}{x\log x}$; (d) $\int_0^{\pi/2}\log(\sin x)\,dx$.
(a) Converges For $x\ge1$, $e^{-x^2}\le e^{-x}$, and $\int_1^\infty e^{-x}dx$ converges; $\int_0^1$ is proper. (Its value $\tfrac{\sqrt\pi}2$ comes from $\Gamma(\tfrac12)$, Example 6.)
(b) $\pi$ Bad points $0$ and $1$, each like $|x-c|^{-1/2}$: both halves converge ($p=\tfrac12\lt1$). With $x=\sin^2\theta$, $dx=2\sin\theta\cos\theta\,d\theta$ and $\sqrt{x(1-x)}=\sin\theta\cos\theta$, the integral becomes $\int_0^{\pi/2}2\,d\theta=\pi$. (It is $B(\tfrac12,\tfrac12)$.)
(c) Diverges Theorem 4.11(3) with $q=1$: $\int_2^b\frac{dx}{x\log x}=\log\log b-\log\log2\to\infty$ — extremely slowly ($b=10^{100}$ gives only about $5.8$).
(d) Converges Near $0$, $\log\sin x=\log x+\log\frac{\sin x}x$ and the last term is bounded, while $\int_0^1|\log x|\,dx=1$; so the integral converges absolutely. Call it $I$. Substituting $x\mapsto\frac\pi2-x$ shows $I=\int_0^{\pi/2}\log\cos x\,dx$.
(d) Value Add: $$2I=\int_0^{\pi/2}\log\frac{\sin2x}{2}\,dx=-\frac\pi2\log2+\int_0^{\pi/2}\log\sin2x\,dx.$$ With $u=2x$ the last integral is $\tfrac12\int_0^\pi\log\sin u\,du=\tfrac12\cdot2I=I$ (by symmetry about $\frac\pi2$). Hence $2I=-\frac\pi2\log2+I$, so $$I=-\frac\pi2\log2\approx-1.08879.$$
Interactive 1 — The $p$-Test: Where Does the Area Stop Growing?

Left: the integrand with the area so far shaded. Right: the partial integral plotted against $\log_{10}$ of the cut-off ($b=10^s$ out to infinity, or $\varepsilon=10^{-s}$ down to $0$), with the limit as a dashed green line when it exists. Press Play to push the cut-off, and move $p$ across the threshold: just past it, the curve flattens; just before it, it keeps climbing — at $p=1$ like $\log b$, in the third mode like $\log\log b$.

1.20
cut-off—
partial integral—
limit—

Absolute and Conditional Convergence; the Dirichlet and Abel Tests

📘 Definition 4.8 — Absolute and conditional convergence
An improper integral $\int_a^\infty f$ (or of the second kind) converges absolutely if $\int_a^\infty|f|$ converges. It converges conditionally if $\int_a^\infty f$ converges but $\int_a^\infty|f|$ diverges.
📐 Theorem 4.15 — Absolute convergence implies convergence
If $f$ is locally integrable on $[a,\infty)$ and $\int_a^\infty|f|$ converges, then $\int_a^\infty f$ converges and $\left|\int_a^\infty f\right|\le\int_a^\infty|f|$.

Proof. $|f|$ is locally integrable (Theorem 4.6). For $y\gt x$, $\left|\int_x^yf\right|\le\int_x^y|f|$, and the right side is small for large $x$ by the Cauchy criterion (Theorem 4.12) applied to $|f|$; so the Cauchy criterion holds for $f$. The inequality follows by letting $b\to\infty$ in $\left|\int_a^bf\right|\le\int_a^b|f|$. (Alternatively: $0\le f+|f|\le2|f|$, so $\int(f+|f|)$ converges by comparison, and $f=(f+|f|)-|f|$.) ∎

For example $\int_1^\infty\frac{\sin x}{x^2}dx$ converges absolutely, because $\left|\frac{\sin x}{x^2}\right|\le\frac1{x^2}$. But the most important oscillating integral, $\int_0^\infty\frac{\sin x}{x}dx$, does not converge absolutely — its convergence comes from the cancellation between positive and negative lobes. The next test captures that cancellation; it is the integral analogue of the Dirichlet test for series (§2.3).

📐 Theorem 4.16 — Dirichlet's test
Let $f$ be continuous on $[a,\infty)$ with bounded partial integrals: $\left|\int_a^xf\right|\le K$ for all $x\ge a$. Let $g$ be monotone on $[a,\infty)$ with a continuous derivative, and $g(x)\to0$ as $x\to\infty$. Then $\int_a^\infty f(x)g(x)\,dx$ converges.

Proof. Let $F(x)=\int_a^xf$, so $F'=f$ (Theorem 4.8) and $|F|\le K$. Integration by parts (Theorem 4.10) on $[a,b]$ gives $$\int_a^bfg=F(b)g(b)-\int_a^bF(x)g'(x)\,dx.$$ As $b\to\infty$, $|F(b)g(b)|\le K|g(b)|\to0$. For the last integral, $g'$ has constant sign (as $g$ is monotone), so $$\int_a^b|F\,g'|\le K\int_a^b|g'|=K\,|g(b)-g(a)|\le K|g(a)|,$$ since $g(b)$ moves monotonically from $g(a)$ towards $0$. So $\int_a^\infty Fg'$ converges absolutely (Theorem 4.13(1)), hence converges (Theorem 4.15), and $\int_a^bfg$ has a limit. ∎

The smoothness of $g$ is a convenience: the test remains true for any monotone $g\to0$ and locally integrable $f$ with bounded partial integrals, by Bonnet's second mean value theorem: for monotone $g\ge0$ decreasing, $\int_x^yfg=g(x^+)\int_x^\xi f$ for some $\xi\in[x,y]$. The monotonicity of $g$ cannot be dropped (pitfall 8 below).

📐 Theorem 4.17 — Abel's test
Let $f$ be continuous on $[a,\infty)$ with $\int_a^\infty f$ convergent, and let $g$ be monotone and bounded on $[a,\infty)$ with a continuous derivative. Then $\int_a^\infty fg$ converges.

Proof. A bounded monotone function has a limit $\ell=\lim_{x\to\infty}g(x)$ (§2.1, applied along sequences). Write $fg=f\,(g-\ell)+\ell f$. The function $g-\ell$ is monotone, $C^1$, and tends to $0$; the partial integrals of $f$ converge, so they are bounded. Dirichlet's test gives convergence of $\int f(g-\ell)$, and $\int\ell f$ converges by hypothesis. ∎

Typical uses: $\int_1^\infty\frac{\sin x}{x}\tan^{-1}x\,dx$ (Abel, $g=\tan^{-1}$), $\int_1^\infty\cos x\cdot\frac{\log x}{x}\,dx$ (Dirichlet, $g=\frac{\log x}x$ decreasing for $x\ge e$).

✏️ Example 4 — The family $\int_0^\infty\frac{\sin x}{x^p}\,dx$
Find all real $p$ for which $\displaystyle\int_0^\infty\frac{\sin x}{x^p}\,dx$ converges, and those for which it converges absolutely.
Near $0$ Split at $1$. On $(0,1]$, $\sin x\gt0$ and $\frac{\sin x}{x^p}\big/x^{1-p}\to1$, so $\int_0^1$ converges (absolutely) iff $x^{1-p}=x^{-(p-1)}$ has $p-1\lt1$, i.e. $p\lt2$.
At $\infty$, $p\gt0$ Dirichlet's test with $f=\sin x$ ($|\int_1^x\sin|\le2$) and $g=x^{-p}$ (decreasing, $C^1$, $\to0$): $\int_1^\infty$ converges.
Absolutely? If $p\gt1$: $|\sin x|x^{-p}\le x^{-p}$, absolutely convergent. If $0\lt p\le1$: on $[k\pi,(k+1)\pi]$, $$\int_{k\pi}^{(k+1)\pi}\frac{|\sin x|}{x^p}dx\ge\frac{1}{((k+1)\pi)^p}\int_{k\pi}^{(k+1)\pi}|\sin x|\,dx=\frac{2}{((k+1)\pi)^p}\ge\frac{2}{(k+1)\pi},$$ and the harmonic series diverges: not absolutely convergent.
At $\infty$, $p\le0$ Diverges: on $[2k\pi,(2k+1)\pi]$, $\int\sin x\cdot x^{-p}dx\ge\int\sin x\,dx=2$ (as $x^{-p}\ge1$ there for $k\ge1$), so the Cauchy criterion fails.
Answer Converges iff $0\lt p\lt2$; converges absolutely iff $1\lt p\lt2$; converges conditionally iff $0\lt p\le1$. Interactive 2 shows both behaviours; for the value at $p=1$ see Theorem 4.18.
📐 Theorem 4.18 — The Dirichlet integral
$$\int_0^\infty\frac{\sin x}{x}\,dx=\frac\pi2,$$ and the integral converges conditionally, not absolutely.

Proof. Convergence and non-absolute convergence are Example 4 with $p=1$. For the value, use the Dirichlet kernel: from $2\sin\frac t2\cos kt=\sin(k+\frac12)t-\sin(k-\frac12)t$ and telescoping, $$D_n(t)=\frac12+\sum_{k=1}^n\cos kt=\frac{\sin\big((n+\frac12)t\big)}{2\sin\frac t2}\qquad(0\lt t\le\pi),$$ and integrating the cosine sum term by term over $[0,\pi]$ gives $\int_0^\pi D_n(t)\,dt=\frac\pi2$ for every $n$. Now let $$\varphi(t)=\frac1t-\frac1{2\sin\frac t2}\quad(0\lt t\le\pi),\qquad\varphi(0)=0.$$ Expanding $\sin\frac t2=\frac t2-\frac{t^3}{48}+\cdots$ shows $\varphi(t)=-\frac{t}{24}+O(t^3)$, so $\varphi$ is continuous on $[0,\pi]$. By the Riemann–Lebesgue lemma (§4.1, Exercise IV.1; the same proof works for $\sin\big((n+\frac12)t\big)=\sin nt\cos\frac t2+\cos nt\sin\frac t2$), $$\int_0^\pi\varphi(t)\sin\big((n+\tfrac12)t\big)\,dt\to0.$$ Hence, since $\frac1t=\frac1{2\sin(t/2)}+\varphi(t)$, $$\int_0^\pi\frac{\sin((n+\frac12)t)}{t}dt=\frac\pi2+\int_0^\pi\varphi(t)\sin\big((n+\tfrac12)t\big)\,dt\to\frac\pi2.$$ Substituting $u=(n+\frac12)t$, the left side is $\int_0^{(n+\frac12)\pi}\frac{\sin u}u\,du$, which tends to $\int_0^\infty\frac{\sin u}u\,du$ since that integral converges. So the value is $\frac\pi2$. ∎

By substitution, $\int_0^\infty\frac{\sin ax}{x}dx=\frac\pi2\operatorname{sign}a$ for every real $a$ — a function of $a$ with a jump at $0$, a first warning that limits and improper integrals need care (Chapter 5, §4.5).

Interactive 2 — Cancellation: $\int\frac{\sin x}{x^p}$ versus $\int\frac{|\sin x|}{x^p}$

Top: $\frac{\sin x}{x^p}$ with its positive and negative lobes. Bottom: the running integrals $\int_0^b\frac{\sin x}{x^p}$ (green) and $\int_0^b\frac{|\sin x|}{x^p}$ (amber) as $b$ grows to $16\pi$, with the exact value $\int_0^\infty\frac{\sin x}{x^p}=\Gamma(1-p)\cos\frac{p\pi}2$ dashed ($\frac\pi2$ at $p=1$). For $0\lt p\le1$ the green curve settles while the amber one climbs for ever: convergent, but only conditionally.

1.00
b—
∫₀ᵇ sin x / xᵖ—
∫₀ᵇ |sin x| / xᵖ—
∫₀^∞ sin x / xᵖ—
✏️ Example 5 — Must the integrand tend to $0$? Prove or disprove
Let $f:[0,\infty)\to\mathbb{R}$ be continuous and suppose $\int_0^\infty f$ converges. Prove or disprove: (a) if $f\ge0$ then $f(x)\to0$; (b) $f$ is bounded; (c) if $f$ is uniformly continuous then $f(x)\to0$; (d) if $f$ is monotone then $xf(x)\to0$.
(a) False Let $f$ be $0$ except for a triangular spike of height $1$ and base $[n-\frac1{n^2},n+\frac1{n^2}]$ at each $n\ge2$. The spike has area $\frac1{n^2}$, so $\int_0^b f\le\sum\frac1{n^2}$ is bounded and the integral converges (Theorem 4.13(1)); but $f(n)=1$ for all $n$. A sign-changing example is $\sin(x^2)$: with $u=x^2$, $\int_1^\infty\sin(x^2)dx=\int_1^\infty\frac{\sin u}{2\sqrt u}du$ converges (Dirichlet), while $\sin(x^2)$ has no limit.
(b) False Make the spike at $n$ of height $n$ and base of width $\frac2{n^3}$: area $\frac1{n^2}$ again, but $f(n)=n$. Or $x\sin(x^4)$: with $u=x^2$ it becomes $\frac12\int\sin(u^2)\,du$, which converges by (a).
(c) True Suppose not: there are $\varepsilon\gt0$ and $x_n\to\infty$ with $|f(x_n)|\ge\varepsilon$. Uniform continuity gives $\delta\gt0$ with $|f(x)-f(y)|\lt\frac\varepsilon2$ when $|x-y|\le\delta$. On $[x_n,x_n+\delta]$, $f$ then has the sign of $f(x_n)$ and $|f|\gt\frac\varepsilon2$, so $\left|\int_{x_n}^{x_n+\delta}f\right|\ge\frac{\varepsilon\delta}2$ for all $n$, contradicting the Cauchy criterion (Theorem 4.12). (The spikes in (a) are continuous but not uniformly continuous: they get steeper.)
(d) True A monotone $f$ has a limit $\ell\in[-\infty,\infty]$; if $\ell\ne0$ then $|f|\ge|\ell|/2\gt0$ eventually (or $|f|\to\infty$) and the integral diverges. So $f\to0$, and $f$ is decreasing to $0$, hence $f\ge0$ (if $f$ increased to $0$, use $-f$). Then $0\le\frac x2f(x)\le\int_{x/2}^xf(t)\,dt\to0$ by the Cauchy criterion. So $xf(x)\to0$.
Contrast For series, $\sum a_n$ convergent forces $a_n\to0$. For integrals there is no such rule without an extra hypothesis such as (c) or (d) — a favourite CSIR Part C trap.

The Gamma and Beta Functions; Principal Values

📘 Definition 4.9 — The Gamma and Beta functions
For $s\gt0$ and $p,q\gt0$, $$\Gamma(s)=\int_0^\infty x^{s-1}e^{-x}\,dx,$$ $$B(p,q)=\int_0^1x^{p-1}(1-x)^{q-1}\,dx.$$
📐 Theorem 4.19 — Properties of $\Gamma$ and $B$
  1. The integral for $\Gamma(s)$ converges if and only if $s\gt0$; that for $B(p,q)$ if and only if $p\gt0$ and $q\gt0$.
  2. $\Gamma(s+1)=s\,\Gamma(s)$ for $s\gt0$; $\Gamma(1)=1$, so $\Gamma(n+1)=n!$ for $n=0,1,2,\dots$
  3. $B(p,q)=B(q,p)$, and $$B(p,q)=2\int_0^{\pi/2}\sin^{2p-1}\theta\,\cos^{2q-1}\theta\,d\theta,$$ $$B(p,q)=\int_0^\infty\frac{t^{p-1}}{(1+t)^{p+q}}\,dt.$$
  4. $B(p,q)=\dfrac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}$.
  5. $\Gamma(\tfrac12)=\sqrt\pi$, hence $\int_{-\infty}^\infty e^{-x^2}dx=\sqrt\pi$, and $\int_0^\infty x^{m}e^{-x^n}dx=\frac1n\Gamma\big(\frac{m+1}n\big)$ for $n\gt0$, $m\gt-1$.
  6. (Reflection formula, statement.) $\Gamma(p)\Gamma(1-p)=\dfrac{\pi}{\sin p\pi}$ for $0\lt p\lt1$; equivalently $\int_0^\infty\frac{t^{p-1}}{1+t}dt=\frac\pi{\sin p\pi}$.

Proof. (1) The integrand of $\Gamma$ is positive. Near $0$, $x^{s-1}e^{-x}\big/x^{s-1}\to1$, and $\int_0^1x^{s-1}dx$ converges iff $1-s\lt1$, i.e. $s\gt0$ (Theorem 4.14 and 4.11). Near $\infty$, $x^{s-1}e^{-x}\le x^{-2}$ for large $x$ because $x^{s+1}e^{-x}\to0$; so $\int_1^\infty$ converges for every $s$. For $B$, the integrand behaves like $x^{p-1}$ at $0$ and like $(1-x)^{q-1}$ at $1$.

(2) On $[c,R]$, integrate by parts with $u=x^s$, $dv=e^{-x}dx$: $\int_c^Rx^se^{-x}dx=\big[-x^se^{-x}\big]_c^R+s\int_c^Rx^{s-1}e^{-x}dx$. Let $c\to0^+$, $R\to\infty$; the boundary terms vanish because $s\gt0$. And $\Gamma(1)=\int_0^\infty e^{-x}dx=1$; induct.

(3) Symmetry: $x\mapsto1-x$. The trigonometric form: $x=\sin^2\theta$, $dx=2\sin\theta\cos\theta\,d\theta$. The last form: $x=\frac t{1+t}$, $1-x=\frac1{1+t}$, $dx=\frac{dt}{(1+t)^2}$. (Substitution in improper integrals is justified on compact subintervals and then by passing to the limit.)

(4) (Careful sketch.) Substituting $x=u^2$ gives $\Gamma(p)=2\int_0^\infty u^{2p-1}e^{-u^2}du$. Hence $$\Gamma(p)\Gamma(q)=4\iint_{u,v\gt0}u^{2p-1}v^{2q-1}e^{-(u^2+v^2)}\,du\,dv.$$ The integrand is non-negative and continuous, so the iterated improper integrals may be combined into one over the quarter plane and computed in polar coordinates $u=r\cos\theta$, $v=r\sin\theta$ (Tonelli's theorem for non-negative functions, §4.5; or exhaust the quarter plane by quarter discs and squares, which squeeze the same integral). This gives $$\Gamma(p)\Gamma(q)=\Big(2\int_0^\infty r^{2(p+q)-1}e^{-r^2}dr\Big)\Big(2\int_0^{\pi/2}\cos^{2p-1}\theta\sin^{2q-1}\theta\,d\theta\Big)=\Gamma(p+q)\,B(p,q).$$ (5) By (3), $B(\frac12,\frac12)=2\int_0^{\pi/2}d\theta=\pi$, and by (4) it equals $\Gamma(\frac12)^2/\Gamma(1)$; as $\Gamma(\frac12)\gt0$, $\Gamma(\frac12)=\sqrt\pi$. Then $\int_0^\infty e^{-x^2}dx=\frac12\Gamma(\frac12)$ (substitute $t=x^2$), and the general formula follows from $t=x^n$. (6) is proved with complex analysis (residues, Unit 2) or with infinite products; we use it as a fact. ∎

📘 Definition 4.10 — Cauchy principal value

If $f$ is locally integrable on $\mathbb{R}$, its principal value is $$\mathrm{PV}\!\int_{-\infty}^\infty f=\lim_{R\to\infty}\int_{-R}^Rf,$$ when this limit exists. If $f$ is locally integrable on $[a,b]$ except near one interior point $c$, $$\mathrm{PV}\!\int_a^bf=\lim_{\varepsilon\to0^+}\Big(\int_a^{c-\varepsilon}f+\int_{c+\varepsilon}^bf\Big).$$

If the improper integral converges, the principal value exists and equals it; the converse fails. Principal values arise naturally in the Hilbert transform, in dispersion relations in physics, and in contour integration (Unit 2).

✏️ Example 6 — Evaluating with $\Gamma$ and $B$
Evaluate (a) $\Gamma(\tfrac52)$; (b) $\int_0^\infty x^4e^{-x^2}dx$; (c) $\int_0^1x^2(1-x)^3dx$; (d) $\int_0^{\pi/2}\sin^6\theta\,d\theta$; (e) $\int_0^\infty\frac{dx}{1+x^4}$.
(a) $\Gamma(\tfrac52)=\tfrac32\cdot\tfrac12\cdot\Gamma(\tfrac12)=\dfrac{3\sqrt\pi}4\approx1.3293$.
(b) Theorem 4.19(5) with $m=4$, $n=2$: $\tfrac12\Gamma(\tfrac52)=\dfrac{3\sqrt\pi}8\approx0.66467$.
(c) $B(3,4)=\dfrac{\Gamma(3)\Gamma(4)}{\Gamma(7)}=\dfrac{2!\,3!}{6!}=\dfrac{12}{720}=\dfrac1{60}$.
(d) $2p-1=6$, $2q-1=0$: $p=\tfrac72$, $q=\tfrac12$, and the integral is $\tfrac12B(\tfrac72,\tfrac12)=\dfrac{\Gamma(\frac72)\Gamma(\frac12)}{2\Gamma(4)}=\dfrac{\frac{15}8\sqrt\pi\cdot\sqrt\pi}{12}=\dfrac{5\pi}{32}\approx0.49087$.
(e) Put $t=x^4$, $dx=\tfrac14t^{-3/4}dt$: $\int_0^\infty\frac{dx}{1+x^4}=\tfrac14\int_0^\infty\frac{t^{1/4-1}}{1+t}dt=\tfrac14\cdot\dfrac{\pi}{\sin(\pi/4)}=\dfrac{\pi}{2\sqrt2}\approx1.11072$, by Theorem 4.19(6).
Check Numerical quadrature reproduces all five values to at least $10$ digits.
✏️ Example 7 — Principal values
(a) Find $\mathrm{PV}\int_{-1}^2\frac{dx}x$. (b) Show that $\int_{-\infty}^\infty\frac{x}{1+x^2}dx$ diverges but its principal value is $0$. (c) Does $\mathrm{PV}\int_{-1}^1\frac{dx}{x^2}$ exist? (d) Compute $\lim_{R\to\infty}\int_{-R}^{2R}\frac{x}{1+x^2}dx$ and explain what it shows.
(a) $\log2$ $\int_{-1}^{-\varepsilon}\frac{dx}x=\log\varepsilon-\log1=\log\varepsilon$ and $\int_\varepsilon^2\frac{dx}x=\log2-\log\varepsilon$; the sum is $\log2$ for every $\varepsilon$. The improper integral itself diverges ($\int_0^2dx/x=\infty$).
(b) $\int_0^R\frac{x\,dx}{1+x^2}=\tfrac12\log(1+R^2)\to\infty$, so $\int_0^\infty$ diverges and with it the integral over $\mathbb{R}$. The integrand is odd, so $\int_{-R}^R=0$ for all $R$: $\mathrm{PV}=0$.
(c) No $\int_{-1}^{-\varepsilon}+\int_\varepsilon^1\frac{dx}{x^2}=2\big(\tfrac1\varepsilon-1\big)\to+\infty$. Principal values rescue only cancelling singularities, like the odd $\frac1x$; a positive singularity cannot be cancelled.
(d) $\log2$ $\int_{-R}^{2R}\frac{x\,dx}{1+x^2}=\tfrac12\log\frac{1+4R^2}{1+R^2}\to\tfrac12\log4=\log2$. Different ways of letting the two limits go to infinity give different answers ($0$ symmetrically, $\log2$ here, anything with other ratios). That is exactly why Definition 4.6 requires both one-sided integrals to converge on their own.
⚠️ Counterexamples and pitfalls
  1. Symmetric limits are not enough. $\int_{-\infty}^\infty x\,dx$ and $\int_{-\infty}^\infty\frac{x}{1+x^2}dx$ diverge although their principal values are $0$.
  2. Hidden singularities. $\int_{-1}^1\frac{dx}{x^2}$ is not $\big[-\frac1x\big]_{-1}^1=-2$: it diverges. Always look for points where the integrand is unbounded before using an antiderivative.
  3. $\int_a^\infty f$ convergent does not force $f\to0$, nor even $f$ bounded: spikes of area $\frac1{n^2}$; $\sin(x^2)$; $x\sin(x^4)$. It does if $f$ is uniformly continuous, or monotone (Example 5).
  4. Convergent is not absolutely convergent. $\int_0^\infty\frac{\sin x}x\,dx=\frac\pi2$, while $\int_0^\infty\frac{|\sin x|}x\,dx=\infty$. In Lebesgue's theory (§4.5) $\frac{\sin x}{x}$ is not integrable on $(0,\infty)$ — the improper Riemann integral exists only as a limit.
  5. No implication between $\int f$ and $\int f^2$. On $[1,\infty)$, $f=\frac1x$: $\int f^2$ converges, $\int f$ diverges. On $(0,1]$, $f=\frac1{\sqrt x}$: $\int f$ converges, $\int f^2$ diverges. And $f=\frac{\sin x}{\sqrt x}$ on $[1,\infty)$: $\int f$ converges, $\int f^2=\int\frac{\sin^2x}x$ diverges.
  6. Limit comparison needs a sign condition. $g=\frac{\sin x}{\sqrt x}$ and $f=\frac{\sin x}{\sqrt x}+\frac{\sin^2x}{x}$ on $[1,\infty)$ have $\frac fg=1+\frac{\sin x}{\sqrt x}\to1$ (where $\sin x\ne0$), yet $\int g$ converges and $\int f$ diverges.
  7. Integral and series can disagree without monotonicity. $f(x)=\sin^2(\pi x)$ has $\sum f(n)=0$ but $\int_1^\infty f=\infty$; narrow spikes of height $1$ at the integers give $\int f\lt\infty$ but $\sum f(n)=\infty$. The integral test needs $f$ decreasing.
  8. Dirichlet's test needs monotone $g$. With $f=\sin x$ and $g=\frac{\sin x}{x}\to0$ (not monotone), $\int_1^\infty fg=\int_1^\infty\frac{\sin^2x}x\,dx$ diverges.
  9. Every piece must converge. $\int_0^\infty\frac{dx}{x^p}$ diverges for every $p$: the two ends need $p\lt1$ and $p\gt1$.
  10. Domains of $\Gamma$ and $B$. $\int_0^\infty x^{s-1}e^{-x}dx$ diverges for $s\le0$ (at $0$); $B(p,q)$ needs $p,q\gt0$. Formulas like $\Gamma(s)=\Gamma(s+1)/s$ extend $\Gamma$ to negative non-integers, but not as a convergent integral.

Exercises

I
Improper integrals from the definition.
  • 1 Evaluate $\int_0^\infty xe^{-x^2}dx$.
  • 2 Evaluate $\int_1^\infty\frac{\log x}{x^2}dx$.
  • 3 Evaluate $\int_0^1x\log x\,dx$.
  • 4 Evaluate $\int_0^\infty e^{-x}\sin x\,dx$.
  • 5 Evaluate $\int_{-\infty}^\infty\frac{dx}{x^2+2x+5}$.
  • 6 Evaluate $\int_0^3\frac{dx}{(x-1)^{2/3}}$.
  • 7 Show that $\int_0^\infty\cos x\,dx$ diverges, and that $\int_{-\infty}^\infty x^3dx$ diverges although $\lim_{R\to\infty}\int_{-R}^Rx^3dx=0$.
  • 8 Using $\int_0^1\log x\,dx=-1$, prove $\displaystyle\lim_{n\to\infty}\frac{(n!)^{1/n}}{n}=\frac1e$. (Take care: $\log x$ is not Riemann integrable on $[0,1]$.)
1 $\int_0^bxe^{-x^2}dx=\tfrac12(1-e^{-b^2})\to\tfrac12$.
2 By parts ($u=\log x$, $dv=x^{-2}dx$): $\int_1^b\frac{\log x}{x^2}dx=\big[-\frac{\log x}{x}\big]_1^b+\int_1^bx^{-2}dx=-\frac{\log b}b+1-\frac1b\to1$.
3 $\int_c^1x\log x\,dx=\big[\tfrac{x^2}2\log x-\tfrac{x^2}4\big]_c^1=-\tfrac14-\tfrac{c^2}2\log c+\tfrac{c^2}4\to-\tfrac14$. (The integrand is bounded and continuous on $(0,1]$ with limit $0$ at $0$, so this is really a proper integral.)
4 An antiderivative is $-\tfrac12e^{-x}(\sin x+\cos x)$, so $\int_0^b=\tfrac12-\tfrac12e^{-b}(\sin b+\cos b)\to\tfrac12$.
5 $x^2+2x+5=(x+1)^2+4$; an antiderivative is $\tfrac12\tan^{-1}\frac{x+1}2$, with limits $\pm\frac\pi4$ at $\pm\infty$. Total $\frac\pi2$.
6 Singularity at $x=1$ ($p=\tfrac23\lt1$): split. An antiderivative is $3(x-1)^{1/3}$, continuous at $1$. $\int_0^1=0-3(-1)=3$ and $\int_1^3=3\sqrt[3]2$. Total $3(1+\sqrt[3]2)\approx6.7798$.
7 $\int_0^b\cos x\,dx=\sin b$ has no limit (it oscillates between $\pm1$). $\int_0^bx^3dx=\frac{b^4}4\to\infty$, so $\int_0^\infty x^3$ diverges and the integral over $\mathbb{R}$ diverges (Definition 4.6); the symmetric integrals vanish because $x^3$ is odd.
8 $\log\frac{(n!)^{1/n}}n=\frac1n\sum_{k=1}^n\log\frac kn=:S_n$. Since $\log$ is increasing, $\frac1n\log\frac kn\ge\int_{(k-1)/n}^{k/n}\log x\,dx$ (for $k=1$ this is an improper integral), so $S_n\ge\int_0^1\log x\,dx=-1$. Also $\frac1n\log\frac kn\le\int_{k/n}^{(k+1)/n}\log x\,dx$ for $k\le n-1$, and the $k=n$ term is $0$, so $S_n\le\int_{1/n}^1\log x\,dx=-1+\frac{1+\log n}n$. Hence $S_n\to-1$ and the limit is $e^{-1}$. ($n=10^5$: $0.36790$.)
II
Comparison tests. Decide convergence (and evaluate where asked).
  • 1 $\displaystyle\int_1^\infty\frac{dx}{x\sqrt{1+x^2}}$
  • 2 $\displaystyle\int_0^1\frac{dx}{\sqrt{x+x^3}}$
  • 3 $\displaystyle\int_0^\infty\frac{dx}{\sqrt x\,(1+x)}$ — and evaluate it.
  • 4 $\displaystyle\int_0^1\frac{dx}{e^x-1}$
  • 5 $\displaystyle\int_1^\infty\Big(1-\cos\frac1x\Big)dx$
  • 6 $\displaystyle\int_2^\infty\frac{dx}{(\log x)^{10}}$
  • 7 $\displaystyle\int_0^1\frac{\log x}{\sqrt x}dx$ — and evaluate it.
  • 8 For which $\alpha\gt0$ does $\displaystyle\int_0^{\pi/2}\frac{dx}{(\sin x)^\alpha}$ converge?
  • 9 For $0\lt a\lt b$, show that $\displaystyle\int_0^\infty\frac{dx}{x^a+x^b}$ converges if and only if $a\lt1\lt b$.
1 Converges: the integrand is $\sim x^{-2}$ at $\infty$ (limit comparison, $p=2$).
2 Converges: near $0$, $\sqrt{x+x^3}=\sqrt x\sqrt{1+x^2}$, so the integrand is $\sim x^{-1/2}$ ($p=\tfrac12\lt1$).
3 Converges: $\sim x^{-1/2}$ at $0$, $\sim x^{-3/2}$ at $\infty$. With $x=u^2$: $\int_0^\infty\frac{2u\,du}{u(1+u^2)}=2\cdot\frac\pi2=\pi$.
4 Diverges: $e^x-1\sim x$ at $0$, so the integrand is $\sim\frac1x$ ($p=1$).
5 Converges: $1-\cos\frac1x\sim\frac1{2x^2}$ as $x\to\infty$ ($p=2$).
6 Diverges: $(\log x)^{10}\le x^{1/2}$ for large $x$, so the integrand is $\ge x^{-1/2}$ eventually, and $\int^\infty x^{-1/2}=\infty$.
7 Converges: $|\log x|/\sqrt x\le x^{-3/4}$ near $0$ (since $x^{1/4}|\log x|\to0$). By parts with $u=\log x$, $dv=x^{-1/2}dx$: $\int_c^1=\big[2\sqrt x\log x\big]_c^1-\int_c^12x^{-1/2}dx\to0-4=-4$.
8 Only $0$ is bad: $\sin x\sim x$, so the integrand is $\sim x^{-\alpha}$; converges iff $\alpha\lt1$.
9 Near $0$, $x^b\le x^a$ (as $b\gt a$), so $x^a\le x^a+x^b\le2x^a$ and the integrand is comparable to $x^{-a}$: need $a\lt1$. Near $\infty$, $x^b\le x^a+x^b\le2x^b$: comparable to $x^{-b}$, need $b\gt1$.
III
Absolute and conditional convergence.
  • 1 Show that $\int_1^\infty\frac{\cos x}{x}dx$ converges conditionally.
  • 2 Show that $\int_1^\infty\frac{\sin x}{x^2}dx$ converges absolutely.
  • 3 Show that $\int_0^\infty\sin(x^2)\,dx$ converges but $\int_0^\infty|\sin(x^2)|\,dx$ diverges.
  • 4 Decide the convergence of $\int_3^\infty\frac{\log x}{x}\sin x\,dx$.
  • 5 Show that $\int_1^\infty\frac{\sin x}{x}\tan^{-1}x\,dx$ converges.
  • 6 Show that $\int_1^\infty x\sin x\,dx$ diverges by the Cauchy criterion.
  • 7 Using Theorem 4.18, prove $\int_0^\infty\frac{\sin^2x}{x^2}dx=\frac\pi2$.
1 Dirichlet with $f=\cos x$ ($|\int_1^x\cos|\le2$) and $g=\frac1x$: converges. Not absolutely: $|\cos x|\ge\cos^2x=\frac{1+\cos2x}2$, and $\int_1^\infty\frac{1+\cos2x}{2x}dx$ diverges ($\int\frac1{2x}=\infty$ while $\int\frac{\cos2x}{2x}$ converges).
2 $\left|\frac{\sin x}{x^2}\right|\le\frac1{x^2}$ and Theorem 4.11.
3 On $[1,\infty)$ put $u=x^2$: $\int_1^b\sin(x^2)dx=\int_1^{b^2}\frac{\sin u}{2\sqrt u}du$, convergent by Dirichlet ($p=\tfrac12$). Similarly $\int_1^b|\sin x^2|dx=\int_1^{b^2}\frac{|\sin u|}{2\sqrt u}du\to\infty$ (Example 4, $p=\tfrac12\le1$). $\int_0^1$ is proper.
4 $g(x)=\frac{\log x}x$ has $g'=\frac{1-\log x}{x^2}\lt0$ for $x\gt e$, so it decreases to $0$ on $[3,\infty)$: Dirichlet gives convergence. Not absolute: $\frac{\log x}{x}|\sin x|\ge\frac{|\sin x|}x$ for $x\ge e$.
5 Abel: $\int_1^\infty\frac{\sin x}xdx$ converges and $\tan^{-1}x$ is increasing, bounded, $C^1$.
6 On $[2k\pi,(2k+1)\pi]$: $\int x\sin x\,dx\ge2k\pi\int\sin x\,dx=4k\pi\ge4\pi$ for $k\ge1$, so $\left|\int_x^yf\right|$ cannot be made small for large $x$.
7 On $[\varepsilon,R]$, by parts with $u=\sin^2x$, $dv=x^{-2}dx$: $\int_\varepsilon^R\frac{\sin^2x}{x^2}=\Big[-\frac{\sin^2x}x\Big]_\varepsilon^R+\int_\varepsilon^R\frac{2\sin x\cos x}x\,dx$. The boundary terms $\to0$ ($\sin^2\varepsilon/\varepsilon\to0$), and $\int_0^\infty\frac{\sin2x}xdx=\int_0^\infty\frac{\sin u}udu=\frac\pi2$.
IV
Gamma, Beta, principal values and proofs.
  • 1 Compute $\Gamma(\tfrac72)$.
  • 2 Evaluate $\int_0^\infty x^6e^{-2x}dx$.
  • 3 Evaluate $\int_0^1x^4\sqrt{1-x}\,dx$ as a Beta value and as a fraction.
  • 4 Evaluate $\int_0^{\pi/2}\sin^4\theta\cos^2\theta\,d\theta$.
  • 5 Express $\int_0^1\frac{dx}{\sqrt{1-x^4}}$ in terms of the Beta function.
  • 6 Show that $\int_0^\infty e^{-x^3}dx=\Gamma(\tfrac43)$.
  • 7 Find $\mathrm{PV}\int_{-\infty}^\infty\frac{1+x}{1+x^2}dx$. Does the improper integral converge?
  • 8 Prove that $\displaystyle\lim_{n\to\infty}\int_0^\infty\frac{\sin x}{x}e^{-x/n}\,dx=\frac\pi2$. (Hint: bound the tails $\int_A^\infty$ uniformly in $n$ with the second mean value theorem mentioned after Theorem 4.16.)
  • 9 Prove the integral test with error bound: for $f\ge0$ decreasing on $[1,\infty)$ with $\int_1^\infty f\lt\infty$, show $0\le\sum_{n=N+1}^\infty f(n)\le\int_N^\infty f$.
1 $\Gamma(\tfrac72)=\tfrac52\cdot\tfrac32\cdot\tfrac12\sqrt\pi=\frac{15\sqrt\pi}8\approx3.3234$.
2 $x=u/2$: $\int_0^\infty\frac{u^6}{2^6}e^{-u}\frac{du}2=\frac{6!}{2^7}=\frac{720}{128}=\frac{45}8$.
3 $B(5,\tfrac32)=\frac{\Gamma(5)\Gamma(\frac32)}{\Gamma(\frac{13}2)}$, with $\Gamma(5)=24$, $\Gamma(\tfrac32)=\tfrac{\sqrt\pi}2$, $\Gamma(\tfrac{13}2)=\tfrac{11}2\cdot\tfrac92\cdot\tfrac72\cdot\tfrac52\cdot\tfrac32\cdot\tfrac12\sqrt\pi=\tfrac{10395}{64}\sqrt\pi$. So the value is $\frac{24\cdot32}{10395}=\frac{256}{3465}\approx0.073882$.
4 $2p-1=4$, $2q-1=2$: $\tfrac12B(\tfrac52,\tfrac32)=\frac{\Gamma(\frac52)\Gamma(\frac32)}{2\Gamma(4)}=\frac{\frac{3\sqrt\pi}4\cdot\frac{\sqrt\pi}2}{12}=\frac{\pi}{32}\approx0.098175$.
5 $x=t^{1/4}$, $dx=\tfrac14t^{-3/4}dt$: $\tfrac14\int_0^1t^{-3/4}(1-t)^{-1/2}dt=\tfrac14B(\tfrac14,\tfrac12)\approx1.31103$.
6 $t=x^3$, $dx=\tfrac13t^{-2/3}dt$: $\tfrac13\int_0^\infty t^{1/3-1}e^{-t}dt=\tfrac13\Gamma(\tfrac13)=\Gamma(\tfrac43)\approx0.89298$.
7 $\int_{-R}^R\frac{dx}{1+x^2}=2\tan^{-1}R\to\pi$ and $\int_{-R}^R\frac{x\,dx}{1+x^2}=0$: $\mathrm{PV}=\pi$. The improper integral diverges since $\int_0^\infty\frac{x}{1+x^2}=\infty$ while $\int_0^\infty\frac1{1+x^2}$ converges.
8 Exchanging a limit with an improper integral needs justification (domination by an integrable function is not available, since $\frac{\sin x}x$ is not absolutely integrable). Each integral converges (Dirichlet's test with $g=e^{-x/n}/x$). Tails: for $A\ge1$, $g_n(x)=\frac{e^{-x/n}}x$ is positive and decreasing, so the second mean value theorem gives $\int_A^y\sin x\,g_n(x)\,dx=g_n(A)\int_A^\xi\sin x\,dx$ for some $\xi$, hence $\left|\int_A^\infty\frac{\sin x}xe^{-x/n}dx\right|\le\frac2A$ for every $n$; similarly $\left|\int_A^\infty\frac{\sin x}xdx\right|\le\frac2A$. Compact part: on $[0,A]$, $|e^{-x/n}-1|\le\frac An$, so $\left|\int_0^A\frac{\sin x}x(e^{-x/n}-1)dx\right|\le\frac{A^2}n$ (using $|\sin x/x|\le1$). So the difference from $\frac\pi2$ is at most $\frac4A+\frac{A^2}n$; choose $A$ large, then $n$ large. (The function $t\mapsto\int_0^\infty\frac{\sin x}{x}e^{-tx}dx$ equals $\frac\pi2-\tan^{-1}t$ — differentiate under the integral to get $-\frac1{1+t^2}$ — which gives a second route to Theorem 4.18 once that differentiation is justified.)
9 For $n\ge N+1$, $f(n)\le\int_{n-1}^nf$ (since $f$ decreases). Summing from $N+1$ to $M$: $\sum_{N+1}^Mf(n)\le\int_N^Mf\le\int_N^\infty f$. Let $M\to\infty$.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA The integral $\displaystyle\int_0^\infty\frac{x^{p-1}}{1+x^2}\,dx$ converges if and only if (A) $0\lt p\lt1$; (B) $0\lt p\lt2$; (C) $p\gt0$; (D) $1\lt p\lt2$.

Near $0$ The integrand is $\sim x^{p-1}=x^{-(1-p)}$: need $1-p\lt1$, i.e. $p\gt0$.
Near $\infty$ It is $\sim x^{p-3}=x^{-(3-p)}$: need $3-p\gt1$, i.e. $p\lt2$. (This is Example 2 with $p-1$ in place of $p$ and $q=2$.)
Answer (B). (The value is $\frac{\pi}{2\sin(p\pi/2)}$.)

E2. CSIR Part B The value of $\displaystyle\int_0^1x^2\Big(\log\frac1x\Big)^3dx$ is (A) $\dfrac2{27}$; (B) $\dfrac19$; (C) $6$; (D) $\dfrac29$.

Substitute $x=e^{-t}$, $dx=-e^{-t}dt$, $\log\frac1x=t$: the integral is $\int_0^\infty t^3e^{-3t}\,dt$.
Gamma With $u=3t$: $\frac1{3^4}\int_0^\infty u^3e^{-u}du=\frac{\Gamma(4)}{81}=\frac6{81}=\frac2{27}\approx0.07407$ (confirmed numerically).
Answer (A). (C) forgets the factor $3^{-4}$.

E3. CSIR Part B Which of the following improper integrals converges? (A) $\displaystyle\int_1^\infty\frac{dx}{x\log(1+x)}$; (B) $\displaystyle\int_0^1\frac{dx}{(x-\sin x)^{1/3}}$; (C) $\displaystyle\int_0^\infty\frac{dx}{\sqrt{x+x^4}}$; (D) $\displaystyle\int_0^{\pi/2}\frac{dx}{\sqrt{1-\cos x}}$.

(A) Diverges $\log(1+x)\sim\log x$, so compare with $\frac1{x\log x}$ (Theorem 4.11(3), $q=1$).
(B) Diverges $x-\sin x\sim\frac{x^3}6$, so the integrand is $\sim\frac{6^{1/3}}x$ at $0$ ($p=1$).
(C) Converges $\sim x^{-1/2}$ at $0$ and $\sim x^{-2}$ at $\infty$.
(D) Diverges $1-\cos x\sim\frac{x^2}2$, so the integrand is $\sim\frac{\sqrt2}x$ at $0$.
Answer (C).

E4. CSIR Part C Which of the following integrals converge? (One or more options may be correct.) (A) $\displaystyle\int_1^\infty\frac{\sin x}{x^{1/3}}dx$; (B) $\displaystyle\int_1^\infty\frac{|\sin x|}{x^{1/3}}dx$; (C) $\displaystyle\int_0^1\frac1x\sin\frac1x\,dx$; (D) $\displaystyle\int_1^\infty\frac{\sin^2x}{x}dx$.

(A) Converges Dirichlet's test, $g=x^{-1/3}\downarrow0$ (conditionally).
(B) Diverges Example 4 with $p=\tfrac13\le1$.
(C) Converges Substitute $u=\frac1x$, $dx=-\frac{du}{u^2}$: $\int_c^1\frac1x\sin\frac1x\,dx=\int_1^{1/c}\frac{\sin u}{u}du$, which converges as $c\to0^+$. The integrand is unbounded and oscillates wildly near $0$, yet the integral converges.
(D) Diverges $\frac{\sin^2x}x=\frac1{2x}-\frac{\cos2x}{2x}$: the second part converges (Dirichlet), the first diverges.
Answer (A) and (C).

E5. CSIR Part C Let $f:[0,\infty)\to[0,\infty)$ be continuous with $\int_0^\infty f(x)\,dx$ convergent. Which of the following must be true? (A) $\lim_{x\to\infty}f(x)=0$; (B) $f$ is bounded; (C) $\liminf_{x\to\infty}f(x)=0$; (D) $\int_0^\infty f(x)e^{-x}\,dx$ converges.

(A) False Triangular spikes of height $1$ and area $\frac1{n^2}$ at each integer $n$ (Example 5(a)).
(B) False Spikes of height $n$ and area $\frac1{n^2}$ (Example 5(b)).
(C) True If $\liminf f=c\gt0$ (possibly $\infty$), then $f\ge\min(c,1)/2=:m\gt0$ on some $[A,\infty)$, and $\int_A^bf\ge m(b-A)\to\infty$.
(D) True $0\le f(x)e^{-x}\le f(x)$ and comparison (Theorem 4.13).
Answer (C) and (D).

E6. CSIR Part C Which of the following are true? (A) $\Gamma(\tfrac12)=\sqrt\pi$; (B) $\displaystyle\int_0^\infty e^{-x^4}dx=\Gamma(\tfrac54)$; (C) $B(\tfrac12,\tfrac12)=\dfrac\pi2$; (D) $\displaystyle\int_0^{\pi/2}\sqrt{\tan\theta}\,d\theta=\dfrac{\pi}{\sqrt2}$.

(A) True Theorem 4.19(5).
(B) True $t=x^4$: $\tfrac14\int_0^\infty t^{1/4-1}e^{-t}dt=\tfrac14\Gamma(\tfrac14)=\Gamma(\tfrac54)\approx0.90640$.
(C) False $B(\tfrac12,\tfrac12)=\Gamma(\tfrac12)^2/\Gamma(1)=\pi$ (or $\int_0^1\frac{dx}{\sqrt{x(1-x)}}=\pi$, Example 3(b)).
(D) True $\sqrt{\tan\theta}=\sin^{1/2}\theta\cos^{-1/2}\theta$, so $2p-1=\tfrac12$, $2q-1=-\tfrac12$: $p=\tfrac34$, $q=\tfrac14$. The integral is $\tfrac12B(\tfrac34,\tfrac14)=\tfrac12\Gamma(\tfrac34)\Gamma(\tfrac14)=\tfrac12\cdot\frac{\pi}{\sin(\pi/4)}=\frac\pi{\sqrt2}\approx2.2214$ (reflection formula).
Answer (A), (B) and (D).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. Definitions and the $p$-tests. Definitions 4.6–4.7, Example 1 (spend time on (d) — ask the class to find the error), Theorem 4.11 with Interactive 1 (move $p$ slowly through $1$ in each mode), the Cauchy criterion.
  2. Comparison. Theorems 4.13–4.14, the power-counting strategy, Examples 2–3; have students do Exercise II in pairs and report the leading behaviour at each bad point before deciding. Finish with Example 3(d), the symmetry trick for $\int\log\sin x$.
  3. Oscillation and special functions. Absolute vs conditional convergence, Dirichlet and Abel (Theorems 4.15–4.17), Example 4 with Interactive 2 (try $p=0.5$, $1$, $1.5$), the value $\frac\pi2$ (sketch Theorem 4.18), Example 5 (prove/disprove — do it as a class debate), then Gamma, Beta and principal values (Theorem 4.19, Examples 6–7) and Exam-corner E2, E6.

Discussion questions. (1) For series, $\sum a_n$ convergent implies $a_n\to0$; why does the analogous statement fail for integrals, and which extra hypothesis rescues it? (2) Why must $\int_{-\infty}^\infty f$ be defined with two independent limits? Give an example where a lopsided limit gives a different answer. (3) Is $\frac{\sin x}x$ "integrable" on $(0,\infty)$? In which sense — and what will Lebesgue's theory say?

Misconceptions to watch for. Applying an antiderivative across a singularity; using limit comparison for sign-changing integrands; "the integrand tends to $0$, so the integral converges" (and its converse); confusing the thresholds $p\gt1$ at $\infty$ and $p\lt1$ at $0$; using $\Gamma(s)$ for $s\le0$; treating a principal value as the value of a divergent integral.

Suggested homework. I(2, 5, 6, 8), II(3, 4, 6, 7, 9), III(1, 3, 4, 7), IV(1, 3, 4, 6, 7); Exam corner E1, E3, E4, E5.

🔬 Research–Teaching NexusResearch-tutored · optional, about 60 minutes

Research question. How do you compute an oscillatory improper integral such as $\int_0^\infty\frac{\sin x}{x}\,dx$ numerically when its integrand decays so slowly that the naive partial integrals $\int_0^b$ crawl towards the answer?

Why it matters. Slowly decaying oscillatory integrals are everywhere in applied science: Fourier transforms in signal processing and MRI image reconstruction, the diffraction integrals of optics (Fresnel's $\int\sin x^2$), and option-pricing formulas in finance that invert characteristic functions. Engineers accelerate them by integrating lobe by lobe and summing the resulting alternating series cleverly.

What to do.

  1. Compute the lobe integrals $a_k=\int_{k\pi}^{(k+1)\pi}\frac{\sin x}{x}dx$ for $k=0,\dots,40$ (Simpson's rule with $200$ points per lobe is plenty). Check that they alternate in sign and decrease in modulus, and explain why with the Leibniz test (§2.3).
  2. Compare the error of the partial sums $\sum_{k\lt n}a_k$ with $\frac\pi2$ and with the bound $|a_n|\approx\frac2{n\pi}$.
  3. Average consecutive partial sums (one step of Euler's transformation) and repeat the averaging a few times. How many lobes do you need for $6$ correct digits, with and without averaging?
  4. Apply the same method to the Fresnel integral $\int_0^\infty\sin(x^2)dx$ (lobes between $\sqrt{k\pi}$ and $\sqrt{(k+1)\pi}$) and compare with the exact value $\frac12\sqrt{\frac\pi2}$.

Tools: Python (NumPy, SciPy for reference values) or a spreadsheet; Interactive 2 for the picture.

Hand in: A table of errors against the number of lobes for the raw and the averaged sums, and a short explanation of why averaging helps for alternating series.

Going further. Read about the Shanks transformation and Wynn's $\varepsilon$-algorithm, and about Longman's method for Fourier-type integrals; try $\int_0^\infty\frac{\cos x}{1+x}dx$.

Instructor note: $a_0=\mathrm{Si}(\pi)\approx1.85194$ and $a_1\approx-0.43379$; the raw partial sum after $n$ lobes has error close to $\frac{|a_n|}2\approx\frac1{n\pi}$ (about $8\times10^{-3}$ after $40$ lobes), while a few rounds of averaging reach $6$ digits with about $15$–$20$ lobes. The Fresnel value is $\frac12\sqrt{\pi/2}\approx0.626657$.

🧪 Self-check quiz

0/5 correct

Q1. $\displaystyle\int_1^\infty\frac{dx}{x^p}$ converges exactly when

Q2. The integral $\displaystyle\int_0^\infty\frac{\sin x}{x}\,dx$

Q3. $\Gamma(5)$ equals

Q4. About $\displaystyle\int_{-1}^1\frac{dx}{x}$ we can say:

Q5. $B(2,3)=\int_0^1x(1-x)^2\,dx$ equals