Volumes of low-dimensional slabs and sections in the cube

We study the volume of slabs in the 2- and 3-dimensional cube as a function of the width and the defining direction. The variational method yields that there exist surprisingly many local extrema and saddle points of the volume of the slabs. We give several general formula for the volume of sections and slabs of the n-cube.