Layer cake representation



In mathematics, the layer cake representation of a non-negative, real-valued measurable function $$f$$ defined on a measure space $$(\Omega,\mathcal{A},\mu)$$ is the formula


 * $$f(x) = \int_0^\infty 1_{L(f, t)} (x) \, \mathrm{d}t,$$

for all $$x \in \Omega$$, where $$1_E$$ denotes the indicator function of a subset $$E\subseteq \Omega$$ and $$L(f,t)$$ denotes the super-level set


 * $$L(f, t) = \{ y \in \Omega \mid f(y) \geq t \}.$$

The layer cake representation follows easily from observing that


 * $$ 1_{L(f, t)}(x) = 1_{[0, f(x)]}(t)$$

and then using the formula


 * $$f(x) = \int_0^{f(x)} \,\mathrm{d}t.$$

The layer cake representation takes its name from the representation of the value $$f(x)$$ as the sum of contributions from the "layers" $$L(f,t)$$: "layers"/values $$t$$ below $$f(x)$$ contribute to the integral, while values $$t$$ above $$f(x)$$ do not. It is a generalization of Cavalieri's principle and is also known under this name.

An important consequence of the layer cake representation is the identity

$$\int_\Omega f(x) \, \mathrm{d}\mu(x) = \int_0^{\infty} \mu(\{ x \in \Omega \mid f(x) > t \})\,\mathrm{d}t,$$

which follows from it by applying the Fubini-Tonelli theorem.

An important application is that $$L^p$$ for $$1\leq p<+\infty$$ can be written as follows

$$\int_\Omega |f(x)|^p \, \mathrm{d}\mu(x) = p\int_0^{\infty} s^{p-1}\mu(\{ x \in \Omega \mid\, |f(x)| > s \}) \mathrm{d}s,$$

which follows immediately from the change of variables $$t=s^{p}$$ in the layer cake representation of $$|f(x)|^p$$.

This representation can be used to prove Markov's inequality and Chebyshev's inequality.