# What is the integral of an integral?

It really depends on what you mean by integral.

Consider the indefinite integral of the indefinite intgeral of a function $f$:

$\int \int f \left(x\right) \mathrm{dx} \mathrm{dx}$

If $f \left(x\right) = {g}^{p r i m e} \left(x\right) = {h}^{p r i m e p r i m e} \left(x\right)$, that is, $f$ is a double antiderivative, then, by applying the Fundamental Theorem of Calculus twice:

$\int \int f \left(x\right) \mathrm{dx} \mathrm{dx} = \int \int {g}^{p r i m e} \left(x\right) \mathrm{dx} \mathrm{dx} = \int \left[g \left(x\right) + C\right] \mathrm{dx} = \int \left[{h}^{p r i m e} \left(x\right) + C\right] \mathrm{dx} = \int {h}^{p r i m e} \left(x\right) \mathrm{dx} + \int C \mathrm{dx} = h \left(x\right) + C x + D ,$

where $C$ and $D$ are arbitrary constants.

Now consider the definite integral of the definite integral of a function $f = {g}^{p r i m e} \left(x\right)$. Then, applying the Fundamental Theorem of Calculus again:

${\int}_{c}^{d} {\int}_{a}^{b} f \left(x\right) \mathrm{dx} \mathrm{dx} = {\int}_{c}^{d} {\int}_{a}^{b} {g}^{p r i m e} \left(x\right) \mathrm{dx} \mathrm{dx} = {\int}_{c}^{d} \left[g \left(b\right) - g \left(a\right)\right] \mathrm{dx}$

But $g \left(b\right) - g \left(a\right)$ is simply a real number. For ${\int}_{c}^{d} \left[g \left(b\right) - g \left(a\right)\right] \mathrm{dx}$ to make sense, we must consider $g \left(b\right) - g \left(a\right)$ as a constant function.
Integrating again, we get:

${\int}_{c}^{d} \left[g \left(b\right) - g \left(a\right)\right] \mathrm{dx} = \left[g \left(b\right) - g \left(a\right)\right] x {|}_{c}^{d} = \left[g \left(b\right) - g \left(a\right)\right] \left(d - c\right)$

A third interpretation could also be that of iterated integrals, that appear in multivariable calculus.
Consider the two variable function $f \left(x , y\right)$. There can be two kinds of iterated integrals:

${\int}_{{y}_{1}}^{{y}_{2}} \left[{\int}_{{x}_{1}}^{{x}_{2}} f \left(x , y\right) \mathrm{dx}\right] \mathrm{dy}$

and

${\int}_{{x}_{1}}^{{x}_{2}} \left[{\int}_{{y}_{1}}^{{y}_{2}} f \left(x , y\right) \mathrm{dy}\right] \mathrm{dx}$

If $f \left(x , y\right) = \frac{\partial}{\partial x} {g}_{1} \left(x , y\right)$, ${g}_{1} \left({x}_{1} , y\right) = \frac{d}{\mathrm{dy}} {h}_{1} \left(y\right)$ and ${g}_{1} \left({x}_{2} , y\right) = \frac{d}{\mathrm{dy}} {p}_{1} \left(y\right)$, then we have the following result:

int_(y_1)^(y_2) [ int_(x_1)^(x_2) f(x,y) dx ] dy = int_(y_1)^(y_2) [(g_1(x_2,y)-g_1(x_1,y)] dy = [p_1(y_2)-p_1(y_1)] - [h_1(y_2) - h_1(y_1)]

An analogous result holds for ${\int}_{{x}_{1}}^{{x}_{2}} \left[{\int}_{{y}_{1}}^{{y}_{2}} f \left(x , y\right) \mathrm{dy}\right] \mathrm{dx}$, although, in general,

${\int}_{{y}_{1}}^{{y}_{2}} \left[{\int}_{{x}_{1}}^{{x}_{2}} f \left(x , y\right) \mathrm{dx}\right] \mathrm{dy} \ne {\int}_{{x}_{1}}^{{x}_{2}} \left[{\int}_{{y}_{1}}^{{y}_{2}} f \left(x , y\right) \mathrm{dy}\right] \mathrm{dx}$.