In general, an Improper Integral is a definite integral over an infinite area. It's a definite integral that doesn't meet the criteria for definite integrals.
An integral is improper if it has any of the following boundary conditions (remember: a definite integral is the bounded area between the curve of $f(x)$ and the x-axis):
Type I: Infinite Integration Limits
Type II: Discontinuous Integrands
$f(x)$ isn't bounded in $[a, b]$
Typically, this means that $f(x)$ has one or more vertical asymptotes in $[a, b]$
The general approach to integrating improper integrals uses limits to work around the discontinuities in the integrand's boundary.
In general, you follow these steps:
Specific techniques for integrating improper integrals are described in the next note,
7.8 Improper Integration Techniques.
When you insert a margin between the area under the $f(x)$ curve and the discontinuity, and then take the limit as the width of the margin shrinks to zero, one of two things will happen:
Only convergent integrals have a finite area. All divergent integrals have infinite area, which cannot be measured.
The problem [convergence vs divergence] centers around whether $h\to 0$ faster than $f(c\pm h)\to\infty$.
--Prof Herbert Gross, Calculus Revisited
MIT OpenCourseware
To handle an integrand $f(x)$ which is continuous over the entire interval of integration, but has $\pm \infty$ as one of both of the integration limits:
To handle an integral which has a discontinuity at either end, $x = a$ or $x = b$ (assume $\int_a^bf(x)dx$ has a vertical asymptate at $a$ here:
If $f(x)$ is unbounded for $x$ near $a$ only: $$\int_a^b f(x) dx = \lim_{h\to 0} \int_{a+h}^b f(x) dx$$
If $f(x)$ is unbounded for $x$ near $b$ only: $$\int_a^b f(x) dx = \lim_{h\to 0} \int_a^{b+h} f(x) dx$$
More comprehensive techniques, including consideration for particular types of functions is in: 7.8 Improper Integration Techniques.
Consider the integral $$\int_0^1 \frac{1}{x}dx$$
It is improper because it has a vertical asymptote at $x = 0$. So, use the algorithm for discontinuous integrands:
$$\int_0^1 \frac{1}{x} dx = \lim_{\varepsilon \to 0^+} \int_\varepsilon^1 \frac{1}{x} dx = \lim_{\varepsilon\to 0^+} \left\{\ln|x|\right\}_{\varepsilon}^1$$$$= \lim_{\varepsilon\to 0^+} \left[ \ln(1) - \ln(\varepsilon) \right] = \infty$$
In [8]:
%matplotlib inline
import numpy as np
from matplotlib import pyplot as plt
x = np.linspace(0, 10, 50)
f = (1/x)
plt.grid(True)
plt.plot(x, f, 'g-')
plt.show()
In [ ]: