# Does the improper integral converge?

Evaluates integrals over infinite intervals or with an infinite end, or shows that they diverge, checked numerically.

- Page: https://www.acalculator.org/math/improper-integral-calculator
- JSON spec: https://www.acalculator.org/math/improper-integral-calculator.json
- Version: 4b84f34cf490

## Default answer

Example with the default inputs (Function f(x) 1/x^2, Lower limit a 1, Upper limit b inf): The integral of 1/x^2 from 1 to inf is 1.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x) | The integrand, typed like 1/x^2, e^(-x) or 1/sqrt(4 - x). |
| a | Lower limit a | A number, a constant such as pi, or -inf. |
| b | Upper limit b | A number, a constant such as pi, or inf. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| verdict | The integral | Converges (a finite value) or diverges. |
| value | Value | The integral of f from a to b, to 10 significant figures. |
| exact | Exact value | The integral written exactly. |

## Method

∫ from a to ∞ of f = lim (R → ∞) ∫ from a to R of f, and alike at −∞ or at an end where f is infinite. A computer algebra system finds the antiderivative and its limits; each value is checked by numeric integration.

## Assumptions

- The variable is x; angles are in radians; ln is the natural logarithm.
- f has no pole strictly between a and b.
- An answer that fails its check is not shown.

## Worked examples

1. f = pi/x^2, a = 1, b = inf gives verdict = Converges, value = 3.141593, exact = π. Source: OpenStax, Calculus Volume 2, section 3.7 Improper Integrals, Example 3.48. https://openstax.org/books/calculus-volume-2/pages/3-7-improper-integrals.
2. f = 1/(x^2 + 4), a = -inf, b = 0 gives verdict = Converges, value = 0.785398.
3. f = 1/sqrt(4 - x), a = 0, b = 4 gives verdict = Converges, value = 4, exact = 4.
4. f = 1/x, a = 1, b = inf gives verdict = Diverges.

## FAQ

### What is an improper integral?

A definite integral where an end is infinite, as in ∫ from 1 to ∞ of 1/x² dx, or where the function is infinite at an end, as in ∫ from 0 to 4 of 1/√(4 − x) dx. It is defined as a limit: ∫ from 1 to ∞ of f = lim (t → ∞) ∫ from 1 to t of f.

### When does an improper integral converge?

When that limit is a finite number. ∫ from 1 to ∞ of 1/x² dx = lim (1 − 1/t) = 1 converges. ∫ from 1 to ∞ of 1/x dx = lim ln(t) is infinite, so it diverges. The integral of 1/xᵖ from 1 to ∞ converges exactly when p > 1.

### How do I type infinity?

Type inf for ∞ and -inf for −∞ (infinity, ∞ and oo also work). For an integral over the whole line, such as that of 1/(1 + x²), use -inf and inf.

### What if the function is infinite inside the interval?

Then the integral must be split at that point into two improper integrals, and it converges only if both do. The page takes infinite values at the ends but not inside: for 1/x³ from −1 to 1 it says the function has a pole between a and b. Enter the two halves separately, from −1 to 0 and from 0 to 1.

### Why is the exact value sometimes long?

The page adds the exact values of up to three pieces (see How it works) and simplifies the sum when the algebra keeps it exact. When it cannot, the sum stays as it is, such as atan(2)/2 − atan(−1/2)/2 for π/4; the decimal is the same.

### How is the answer checked?

Each piece is a definite integral whose value is compared with a numeric integral of the function; an antiderivative is checked by differentiating it numerically at 20 points. If a check fails, the page says "No verified answer".

## Sources

- OpenStax, Calculus Volume 2, section 3.7 Improper Integrals: https://openstax.org/books/calculus-volume-2/pages/3-7-improper-integrals
