We summarise the classical (gas diffusion) theory of decompression, which is an interesting application of elementary differential equations. We show that the derivation of recreational scuba diving tables from this theory is an ill-defined problem in optimisation.