In mathematics, the layer cake representation of a non-negative, real-valued measurable function  defined on a measure space
 defined on a measure space  is the formula
 is the formula
 
for all  , where
, where  denotes the indicator function of a subset
 denotes the indicator function of a subset  and
 and  denotes the (
 denotes the ( ) super-level set:
) 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"
 as the sum of contributions from the "layers"  : "layers"/values
: "layers"/values  below
 below  contribute to the integral, while values
 contribute to the integral, while values  above
 above  do not.
It is a generalization of Cavalieri's principle and is also known under this name.: cor. 2.2.34
 do not.
It is a generalization of Cavalieri's principle and is also known under this name.: cor. 2.2.34