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 (strict) super-level set:

The layer cake representation follows easily from observing that
![{\displaystyle 1_{L(f,t)}(x)=1_{[0,f(x)]}(t)\;\;\;{{\text{or}}\;1_{L(f,t)}(x)=1_{[0,f(x))}(t)}}](./_assets_/eb734a37dd21ce173a46342d1cc64c92/2bf7c5d39c46014cb188451dff966441d89aabeb.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.