In mathematics, the layer cake representation of a non-negative, real-valued measurable function
defined on a measure space
is the formula

for all
, where
denotes the indicator function of a subset
and
denotes the (
) super-level set:

The layer cake representation follows easily from observing that
![{\displaystyle 1_{L(f,t)}(x)=1_{[0,f(x)]}(t)\;\;\;{\color {red}{\text{or}}\;1_{L(f,t)}(x)=1_{[0,f(x))}(t)}}](./b95b115f5b3ab6f9c84ed19118bbb53b4c8ae89a.svg)
where either integrand gives the same integral:

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