Winning isn’t everything, it’s the only thing, Vince Lombardi.
A definite integral is a fundamental concept in calculus used to calculate the exact area under a curve between two fixed limits on the x-axis. It is written or represented by the notation: $\int_{a}^{b} f(x)dx$ where:
Conceptually, the definite integral of a real-valued function $f(x)$ on an interval $[a, b]$ is defined as the net signed area of the region bounded by the function's graph, the x-axis, and the vertical lines $x = a$ and $x = b$ and it is illustrated in Figure 1.a.
The connection between derivatives and integrals is established by the Fundamental Theorem of Calculus. It states that if you have a continuous function $f(x)$ on an closed interval $[a,b]$, the integral of that function is equal to the change in its antiderivative $F(x)$ (where $F'(x) = f(x)$) between the ends of the interval. Mathematically, this is expressed as $\boxed{\int_{a}^{b} f(x)dx = F(b) - F(a) = F(x) \bigg\vert{}_{a}^{b}}$
Standard definite integrals require specific, finite limits of integration and a function that is continuous (and thus bounded) across that entire interval.
Improper integrals break these rules. They arise in two main scenarios:
Because we cannot plug “infinity” directly into an antiderivative, evaluating improper integrals requires rewriting them using limits (as the integration bounds approach infinity or as singularities are approached).
$\boxed{\int_{a}^{\infty} f(x)dx = \lim_{b \to \infty} \int_{a}^{b} f(x)dx}$ (Figure 1.a.).
It is very tempting to calculate integrals blindly using the Fundamental Theorem of Calculus. For example, you might try to evaluate this: $\int_{-1}^{1} \frac{1}{x^2} dx = \left[ -x^{-1} \right]_{-1}^{1} = -1 - (1) = -2 \quad \text{😞😞😞 (WRONG!)}$
Why is this incorrect? Because our area must be positive, yet we got a negative answer. The mistake is that the function $f(x) = \frac{1}{x^2}$ has an infinite discontinuity (a vertical asymptote) at $x = 0$, which lies directly inside our interval $[-1, 1]$.
An improper integral of the second kind arises when the integrand becomes unbounded (approaches $\pm\infty$) either at the endpoints or somewhere within the interval of integration.
To evaluate these integrals, we replace the troublesome boundary with a variable and take a limit. The integral converges if the limit exists as a finite number, and diverges if it does not.
Before diving into complex examples, let’s look at the baseline $p$-series behavior near zero. As $x$ approaches $0^+$, notice how the functions stack up: $\frac{1}{\sqrt{x}} \ll \frac{1}{x} \ll \frac{1}{x^2}$
There is a vertical asymptote at $x = 0$.
$\int_{0}^{1} x^{-1/2} dx = \lim_{a \to 0^+} \int_{a}^{1} x^{-1/2} dx = \lim_{a \to 0^+} \left[ 2x^{1/2} \right]_{a}^{1}$
$= \lim_{a \to 0^+} (2 - 2\sqrt{a}) = 2 - 0 = \mathbf{2}$
The improper integral converges to 2 (Figure 1.b.).
There is an infinite discontinuity at $x = 0$.
$\int_{0}^{1} \frac{1}{x} dx = \lim_{a \to 0^+} \int_{a}^{1} \frac{1}{x} dx = \lim_{a \to 0^+} \left[ \ln\vert{}x\vert{} \right]_{a}^{1}$
$= \lim_{a \to 0^+} (\ln(1) - \ln(a)) = 0 - (-\infty) = \mathbf{\infty}$
This improper integral diverges (Figure 1.c.).
The idea is quite simple, $\frac{1}{x^{1/2}} << \frac{1}{x}<< \frac{1}{x^2}$ as $x \to 0^+$, the first integral is convergent (small enough), but the other two improper integral diverge. Similarly, $\frac{1}{x^{1/2}} >> \frac{1}{x} >> \frac{1}{x^2}$ as $x \to \infty$, the only one that is convergent is the last one.
The denominator factors to $(x-1)(x+2)$, meaning there is an infinite discontinuity at the lower bound $x = 1$.
$\int_{1}^{2} \frac{1}{x^2+x-2} dx = \lim_{a \to 1^+} \int_{a}^{2} \frac{1}{(x-1)(x+2)} dx$
Using partial fractions, we break this into: $\lim_{a \to 1^+} \int_{a}^{2} \left( \frac{1/3}{x-1} - \frac{1/3}{x+2} \right) dx = \lim_{a \to 1^+} \left[ \frac{1}{3}\ln(x-1) - \frac{1}{3}\ln(x+2) \right]_{a}^{2} = \lim_{a \to 1^+} \frac{1}{3} \left[ \ln\left(\frac{x-1}{x+2}\right) \right]_{a}^{2}$
$= \frac{1}{3} \lim_{a \to 1^+} \left( \ln\left(\frac{1}{4}\right) - \ln\left(\frac{a-1}{a+2}\right) \right) = -(-\infty) = \infty$, the integral diverges.
A. Divergent U-Substitution: $\int_{0}^{1} \frac{e^{1/x}}{x^2} dx$
Infinite discontinuity at $x = 0$.
Let $u = \frac{1}{x}$, so $du = -\frac{1}{x^2}dx$. As $x \to a$, $u \to \frac{1}{a}$. As $x \to 1$, $u \to 1$.
$\int_{0}^{1} \frac{e^{1/x}}{x^2} dx = \lim_{a \to 0^+} \int_{a}^{1} \frac{e^{1/x}}{x^2} dx = \lim_{a \to 0^+} \int_{1/a}^{1} -e^u \, du = \lim_{a \to 0^+} \int_{1}^{1/a} e^u \, du = \lim_{a \to 0^+} \left[ e^u \right]_{1}^{1/a}$
$= \lim_{a \to 0^+} \left( e^{1/a} - e \right) = \infty$. The integral diverges.
B. Convergent U-Substitution: $\int_{1}^{e} \frac{1}{x\sqrt{\ln(x)}} dx$
Infinite discontinuity at $x = 1$ because $\ln(1) = 0$.
Let $u = \ln(x)$, $du = \frac{1}{x}dx$. As $x \to a$, $u \to \ln(a)$. As $x \to e$, $u \to 1$.
$\int_{1}^{e} \frac{1}{x\sqrt{\ln(x)}} dx = \lim_{a \to 1^+} \int_{a}^{e} \frac{1}{x\sqrt{\ln(x)}} dx = \lim_{a \to 1^+} \int_{\ln(a)}^{1} \frac{1}{\sqrt{u}} \, du = \lim_{a \to 1^+} \left[ 2\sqrt{u} \right]_{\ln(a)}^{1}$
$= \lim_{a \to 1^+} (2\sqrt{1} - 2\sqrt{\ln(a)}) = 2 - 0 = 2$. The integral converges to $2$.
Asymptotic behavior occurs at $x = 2$, which is inside the bounds. We must split the integral: $\int_{0}^{6} \frac{x}{x-2} dx =\int_{0}^{2} \frac{x}{x-2} dx + \int_{2}^{6} \frac{x}{x-2} dx$
Testing the first half: $\int_{0}^{2} \frac{x}{x-2} dx = \lim_{b \to 2^-} \int_{0}^{b} \frac{x-2+2}{x-2} dx = \lim_{b \to 2^-} \int_{0}^{b} \left( 1 + \frac{2}{x-2} \right) dx$
$= \lim_{b \to 2^-} \left[ x + 2\ln\vert{}x-2\vert{} \right]_{0}^{b} = \lim_{b \to 2^-} (b + 2\ln\vert{}b-2\vert{}) - (0 + 2\ln\vert{}-2\vert{}) = -\infty$
Because the first half diverges, the entire integral diverges. There is no need to test the second half.
This integral has an infinite bound (Type 1) and an infinite discontinuity at $x=3$ (Type 2). It must be split at the asymptote and at another arbitrary point (e.g., $x=5$): $\int_{0}^{\infty} \frac{dx}{(x-3)^2} = \int_{0}^{3}\frac{dx}{(x-3)^2} + \int_{3}^{5}\frac{dx}{(x-3)^2} + \int_{5}^{\infty}\frac{dx}{(x-3)^2}$
$\int_{5}^{\infty} \frac{dx}{(x-3)^2} = \lim_{b \to \infty} \int_{5}^{b} \frac{dx}{(x-3)^2} = \lim_{b \to \infty} \frac{-1}{x-3}\bigg|_{5}^{b} = $
$\lim_{b \to \infty} (\frac{-1}{b-3}+\frac{1}{5-3}) = \frac{1}{2}$. Hence, $\int_{5}^{\infty} \frac{dx}{(x-3)^2}$ converges, and its value is 1/2.
If we test the segment from $0$ to $3$: $\int_{0}^{3}\frac{dx}{(x-3)^2} = \lim_{c \to 3^-} \int_{0}^{c} \frac{dx}{(x-3)^2} = \lim_{c \to 3^-} \left[ \frac{-1}{x-3} \right]_{0}^{c}$
$= \lim_{c \to 3^-} \left( \frac{-1}{c-3} - \frac{-1}{0-3} \right) = \infty$. Because this single piece diverges, the entire integral diverges (Figure 1.d).

Vertical asymptote at $x = 0$.
Use integration by parts: $u = \ln(x)$, $dv = x dx \implies du = \frac{1}{x}dx$, $v = \frac{x^2}{2}$.
$\int_{0}^{1} x \ln(x) dx = \lim_{a \to 0^+} \int_{a}^{1} x \ln(x) dx = \lim_{a \to 0^+} \left( \left[ \frac{x^2\ln(x)}{2} \right]_{a}^{1} - \int_{a}^{1} \frac{x}{2} dx \right)$
$= \lim_{a \to 0^+} \left( \left[ \frac{x^2\ln(x)}{2} \right]_{a}^{1} - \left[ \frac{x^2}{4} \right]_{a}^{1} \right)$
Evaluating at the bounds: $= \lim_{a \to 0^+} \left( \frac{1^2\ln(1)}{2} - \frac{1}{4} - \frac{a^2\ln(a)}{2} + \frac{a^2}{4} \right)= \lim_{a \to 0^+} \left( -\frac{1}{4} - \frac{a^2\ln(a)}{2} + \frac{a^2}{4} \right)$
To evaluate the limit of $a^2 \ln(a)$, rewrite it to use L’Hôpital’s Rule: $\lim_{a \to 0^+} \frac{\ln(a)}{2/a^2} \xrightarrow{L'H} \lim_{a \to 0^+} \frac{1/a}{-4/a^3} = \lim_{a \to 0^+} \frac{-a^2}{4} = 0$
Returning to our limit: $\lim_{a \to 0^+} \left( -\frac{1}{4} - \frac{a^2\ln(a)}{2} + \frac{a^2}{4} \right)= -\frac{1}{4} - 0 + 0 = -\frac{1}{4}$. The integral converges to $-1/4$.
