# Improper Integrals: Convergence, p-Integrals and Examples

> Learn how to evaluate improper integrals with infinite limits or infinite discontinuities, the p-integral rule, the comparison test and worked examples.

Source: https://practicecalculus.com/blog/improper-integrals
Updated: 2026-10-24

## Key takeaways

- An improper integral is defined as a limit: replace the infinite bound or the bad point with a variable, integrate, then take the limit.
- If the limit is a finite number the integral converges. If it is infinite or does not exist, the integral diverges.
- $\int_1^\infty \frac{1}{x^p}\,dx$ converges exactly when $p > 1$, while $\int_0^1 \frac{1}{x^p}\,dx$ converges exactly when $p < 1$.
- Always check for discontinuities inside the interval: ignoring one can produce a confident but completely wrong answer.

Can a region that stretches forever have a finite area? Surprisingly, often yes. The region under $y = \frac{1}{x^2}$ to the right of $x = 1$ never ends, yet its area is exactly 1. **Improper integrals** are how calculus measures areas like this, and they show up everywhere from probability to the integral test for series.

## What is an improper integral?

An ordinary definite integral $\int_a^b f(x)\,dx$ needs a finite interval and a function that stays finite on it. An **improper integral** breaks one of those rules:

- **Type 1: an infinite limit of integration**, such as $\int_1^\infty \frac{1}{x^2}\,dx$.
- **Type 2: an infinite discontinuity**, where the integrand blows up somewhere in $[a, b]$, such as $\int_0^1 \frac{1}{\sqrt x}\,dx$.

In both cases the fix is the same: replace the problem spot with a variable, compute an ordinary integral, and take a limit.

$$\int_a^\infty f(x)\,dx = \lim_{b\to\infty}\int_a^b f(x)\,dx$$

If the limit is a finite number, the integral **converges** to that number. If the limit is infinite or does not exist, the integral **diverges**.

## Type 1: infinite limits of integration

### Worked example 1: 1/x² from 1 to infinity

Evaluate $\int_1^\infty \frac{1}{x^2}\,dx$.

**Step 1. Write it as a limit.**

$$\int_1^\infty \frac{1}{x^2}\,dx = \lim_{b\to\infty}\int_1^b x^{-2}\,dx$$

**Step 2. Integrate on $[1, b]$.**

$$\int_1^b x^{-2}\,dx = \left[-\frac1x\right]_1^b = -\frac1b + 1$$

**Step 3. Take the limit.** As $b\to\infty$, $\frac1b\to 0$:

$$\int_1^\infty \frac{1}{x^2}\,dx = 1$$

The integral converges to 1.

### Worked example 2: 1/x from 1 to infinity

Evaluate $\int_1^\infty \frac{1}{x}\,dx$.

$$\lim_{b\to\infty}\int_1^b \frac1x\,dx = \lim_{b\to\infty}\Big[\ln x\Big]_1^b = \lim_{b\to\infty}\ln b = \infty$$

The integral diverges. The area under $\frac1x$ grows without bound, just very slowly.

```graph
title: 'Graphs of y = 1/x² and y = 1/x for x ≥ 1, showing the finite area under 1/x²'
caption: 'Both curves approach 0, but the area under $\frac{1}{x^2}$ from 1 to infinity is exactly 1, while the area under $\frac1x$ is infinite.'
x: [0, 8]
y: [0, 2]
functions:
  - expr: 1/x^2
    label: y = 1/x²
  - expr: 1/x
    label: y = 1/x
    dashed: true
shade: {expr: 1/x^2, from: 1, to: 8}
points:
  - [1, 1, '(1, 1)']
```

The picture shows how close these two cases are. Both curves pass through $(1, 1)$ and both head toward zero. The difference is speed: $\frac{1}{x^2}$ shrinks fast enough for the total area to settle, and $\frac1x$ does not.

### Worked example 3: an exponential tail

Evaluate $\int_0^\infty e^{-x}\,dx$.

$$\lim_{b\to\infty}\int_0^b e^{-x}\,dx = \lim_{b\to\infty}\Big[-e^{-x}\Big]_0^b = \lim_{b\to\infty}\left(1 - e^{-b}\right) = 1$$

The integral converges to 1. Exponential decay is so fast that its tails almost always converge.

### Worked example 4: both limits infinite

Evaluate $\int_{-\infty}^\infty \frac{1}{1+x^2}\,dx$.

When both ends are infinite, **split the integral** at any convenient point (0 is easiest) and evaluate each half separately:

$$\int_0^\infty \frac{dx}{1+x^2} = \lim_{b\to\infty}\arctan b = \frac{\pi}{2}, \qquad \int_{-\infty}^0 \frac{dx}{1+x^2} = \lim_{a\to-\infty}\left(0 - \arctan a\right) = \frac{\pi}{2}$$

Both halves converge, so the whole integral converges to $\pi$. If either half diverged, the whole integral would diverge.

### Divergence without blowing up

An integral can diverge even when the area never becomes infinite. Consider $\int_0^\infty \cos x\,dx$:

$$\lim_{b\to\infty}\int_0^b \cos x\,dx = \lim_{b\to\infty}\sin b$$

The value of $\sin b$ keeps swinging between $-1$ and $1$ forever, so the limit does not exist and the integral diverges. Convergence requires the limit to settle on a single finite number.

## Type 2: infinite discontinuities

When the integrand blows up at an endpoint, approach that endpoint with a limit from inside the interval.

### Worked example 5: 1/√x from 0 to 1

Evaluate $\int_0^1 \frac{1}{\sqrt x}\,dx$. The integrand is infinite at $x = 0$.

$$\lim_{t\to 0^+}\int_t^1 x^{-1/2}\,dx = \lim_{t\to 0^+}\Big[2\sqrt x\Big]_t^1 = \lim_{t\to 0^+}\left(2 - 2\sqrt t\right) = 2$$

The integral converges to 2, even though the graph shoots up to infinity at the left edge.

```graph
title: 'Area under y = 1/√x from 0 to 1, an unbounded region with finite area'
caption: 'The curve shoots up along the $y$-axis, yet the shaded area is $\int_0^1 \frac{1}{\sqrt x}\,dx = 2$.'
x: [-0.6, 2]
y: [0, 5]
functions:
  - expr: 1/sqrt(x)
    label: y = 1/√x
shade: {expr: 1/sqrt(x), from: 0.0001, to: 1}
points:
  - [1, 1, '(1, 1)']
```

### Worked example 6: ln x from 0 to 1

Evaluate $\int_0^1 \ln x\,dx$. Here $\ln x \to -\infty$ as $x \to 0^+$.

**Step 1. Write the limit.** $\displaystyle\lim_{t\to0^+}\int_t^1 \ln x\,dx$.

**Step 2. Find the antiderivative.** [Integration by parts](/blog/integration-by-parts) gives $\int \ln x\,dx = x\ln x - x$.

**Step 3. Evaluate on $[t, 1]$.**

$$\Big[x\ln x - x\Big]_t^1 = (0 - 1) - (t\ln t - t) = -1 - t\ln t + t$$

**Step 4. Take the limit.** As $t\to0^+$, $t \to 0$, and $t\ln t \to 0$ as well (rewrite it as $\frac{\ln t}{1/t}$ and use [L'Hôpital's rule](/blog/lhopitals-rule)). So

$$\int_0^1 \ln x\,dx = -1$$

The answer is negative because $\ln x < 0$ on $(0, 1)$: the region lies below the $x$-axis.

### Worked example 7: the hidden discontinuity trap

Evaluate $\int_{-1}^1 \frac{1}{x^2}\,dx$.

If you ignore the problem at $x = 0$ and plug in blindly, you get $\left[-\frac1x\right]_{-1}^1 = -1 - 1 = -2$. That cannot be right: the integrand is positive everywhere, so the area cannot be negative.

The correct approach is to split at the discontinuity:

$$\int_{-1}^1 \frac{dx}{x^2} = \int_{-1}^0 \frac{dx}{x^2} + \int_0^1 \frac{dx}{x^2}$$

The right half is $\lim_{t\to0^+}\left[-\frac1x\right]_t^1 = \lim_{t\to0^+}\left(-1 + \frac1t\right) = \infty$. Since one half diverges, the whole integral **diverges**.

> **Tip:** before evaluating any definite integral, scan the interval for points where the denominator is zero, a log hits zero or a tangent hits $\frac{\pi}{2}$. The Fundamental Theorem of Calculus only applies when the function is continuous on the whole interval.

## The p-integral rule

The examples above are special cases of one rule worth memorizing. For $p > 0$:

| Integral                         | Converges when | Value               | Diverges when |
| -------------------------------- | -------------- | ------------------- | ------------- |
| $\int_1^\infty \frac{dx}{x^p}$   | $p > 1$        | $\frac{1}{p-1}$     | $p \le 1$     |
| $\int_0^1 \frac{dx}{x^p}$        | $p < 1$        | $\frac{1}{1-p}$     | $p \ge 1$     |

Notice $p = 1$ (the function $\frac1x$) diverges on both intervals. It sits exactly on the boundary.

## The comparison test for improper integrals

Many integrands have no simple antiderivative. You can still decide convergence by comparing them with something you know, usually a p-integral or an exponential. Suppose $0 \le g(x) \le f(x)$ for $x \ge a$:

- If $\int_a^\infty f(x)\,dx$ **converges**, then the smaller $\int_a^\infty g(x)\,dx$ also converges.
- If $\int_a^\infty g(x)\,dx$ **diverges**, then the larger $\int_a^\infty f(x)\,dx$ also diverges.

Think of it as "smaller than finite is finite, bigger than infinite is infinite."

### Worked example 8: comparison to show convergence

Does $\int_1^\infty \frac{2 + \cos x}{x^2}\,dx$ converge?

Since $\cos x \le 1$, the numerator is at most 3, so $0 < \frac{2+\cos x}{x^2} \le \frac{3}{x^2}$. And $\int_1^\infty \frac{3}{x^2}\,dx = 3$ converges (a p-integral with $p = 2$). By comparison, the original integral converges.

### Worked example 9: comparison to show divergence

Does $\int_2^\infty \frac{1}{\ln x}\,dx$ diverge?

For $x \ge 2$, $\ln x < x$, so $\frac{1}{\ln x} > \frac{1}{x}$. Since $\int_2^\infty \frac1x\,dx$ diverges, the larger integral diverges too.

The same idea, applied to sums instead of areas, gives the comparison tests for series. See [convergence tests](/blog/convergence-tests) for how they connect.

## Why improper integrals matter

Improper integrals are not just a textbook curiosity. They appear wherever a quantity accumulates over an unlimited range:

- **Probability.** A probability density must have total area 1 over the whole real line. The famous bell curve relies on $\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}$.
- **Physics.** The work needed to move a rocket infinitely far from Earth is an integral of $\frac{1}{r^2}$ out to infinity, and it converges. That finite value is what makes escape velocity possible.
- **Series.** The integral test decides whether a sum like $\sum \frac{1}{n^2}$ converges by checking the matching improper integral.

## Common improper integral mistakes

1. **Missing an interior discontinuity.** As example 7 shows, this gives a finite answer to a divergent integral.
2. **Treating $\infty$ as a number.** Write the limit. Expressions like $-\frac{1}{\infty}$ are shorthand at best, and they hide mistakes.
3. **Splitting $\int_{-\infty}^\infty$ with one limit.** $\lim_{b\to\infty}\int_{-b}^b f(x)\,dx$ is not the definition. Odd functions like $x$ give 0 that way, but $\int_{-\infty}^\infty x\,dx$ diverges.
4. **Comparing in the wrong direction.** Being smaller than a divergent integral proves nothing, and neither does being bigger than a convergent one.
5. **Forgetting that the p-rule flips on $[0, 1]$.** $\int_0^1 \frac{dx}{x^2}$ diverges even though $\int_1^\infty \frac{dx}{x^2}$ converges.

## Practice spotting convergence

Improper integrals become intuitive once you have seen enough of them: you start to sense that $\frac{1}{x^2}$ settles and $\frac1x$ does not before you write a single limit. The interactive lesson below walks you through each type with instant feedback, so you build that instinct along with the technique.

## Frequently asked questions

### What makes an integral improper?

An integral is improper if one of its limits of integration is infinite, like $\int_1^\infty \frac{1}{x^2}\,dx$, or if the integrand becomes infinite somewhere on the interval, like $\int_0^1 \frac{1}{\sqrt x}\,dx$ at $x = 0$. Either way, the ordinary definite integral does not apply directly.

### How do you know if an improper integral converges?

Rewrite it as a limit and evaluate. If the limit is a finite number, it converges to that number. When you cannot find an antiderivative, compare the integrand to a simpler function, such as a p-integral, whose behavior you already know.

### Why does the integral of 1/x² converge but 1/x diverge?

Both curves approach zero, but $\frac{1}{x^2}$ does so much faster. The area under $\frac1x$ from 1 to $b$ is $\ln b$, which grows without bound, while the area under $\frac{1}{x^2}$ is $1 - \frac1b$, which levels off at 1.

### What is the p-test for improper integrals?

For $p > 0$, $\int_1^\infty \frac{1}{x^p}\,dx$ converges to $\frac{1}{p-1}$ when $p > 1$ and diverges when $p \le 1$. On the interval $[0, 1]$ the condition flips: $\int_0^1 \frac{1}{x^p}\,dx$ converges to $\frac{1}{1-p}$ when $p < 1$ and diverges when $p \ge 1$.

### Can an improper integral have an infinite region but finite area?

Yes. The region under $y = \frac{1}{x^2}$ from $x = 1$ to infinity stretches forever, yet its total area is exactly 1. Convergence depends on how fast the function shrinks, not on whether the region is bounded.
