Use the diagram's labels: are horizontal side lengths and is the height of the rectangular parallelepiped. Its four top vertices are at horizontal distance from the axis. Thus the contact constraint and volume areApply a Lagrange multiplier:For positive dimensions, the derivative equations areSubstituting the last equation into the first two givesHence , and the constraint becomes . ThereforeThese are the maximal cylinder and box in an elliptic paraboloid dimensions for the rectangular case. A horizontal rotation of the square footprint gives the same volume by rotational symmetry.