Find the ratio of the radius r to the height h of a cylinder which maximizes its total surface area subject to the constraint that its volume is constant.
The volume V = πr²h and area A = 2πrh + 2πr², so we consider the function F given by
F = A + λV, (C.92)
and solve
\frac{∂F }{∂h} = 2πr + λπr² = 0 , (C.93)
\frac{∂F }{∂r} = 2πh + 4πr + 2λπrh = 0 , (C.94)
which yields λ = −2/r and hence h = 2 r.