improper integral
The ordinary Riemann integral needs a bounded function on a bounded interval. An improper integral stretches the idea to the two cases the definition forbids: an interval running off to infinity, or a function blowing up at an endpoint. The trick is the same in both cases — integrate over a safe finite, bounded piece and then take a limit as the piece expands toward the forbidden region.
For an unbounded domain, the integral of f from a to infinity is defined as the limit, as b -> infinity, of the integral of f from a to b, when that limit exists and is finite. For an unbounded integrand with a singularity at b, the integral of f from a to b is the limit, as c -> b from below, of the integral of f from a to c. If the relevant limit exists we say the improper integral converges; otherwise it diverges.
Convergence depends on how fast f decays or blows up. The integral of 1/x^p from 1 to infinity converges exactly when p > 1, while the integral of 1/x^p from 0 to 1 converges exactly when p < 1 — the cutoffs are mirror images. One must also beware integrals that converge only conditionally: the integral of (sin x)/x from 0 to infinity converges, but the integral of its absolute value diverges, so the value depends delicately on cancellation rather than on absolute size.
Integral of 1/x^2 from 1 to infinity = limit as b -> infinity of [-1/x] from 1 to b = limit (1 - 1/b) = 1, so it converges. But integral of 1/x from 1 to infinity = limit of ln b = infinity, so it diverges.
1/x^2 decays fast enough to enclose finite area; 1/x decays too slowly and the area is infinite.
The Lebesgue integral handles unboundedness directly and requires absolute convergence, so (sin x)/x is not Lebesgue integrable on (0, infinity) even though its improper Riemann integral exists. Improper integration and Lebesgue integration genuinely diverge on conditionally convergent cases.