An open-topped cylindrical glass jar is to have a given capacity. Find the ratio of height to diameter if the area of glass is a minimum.
You need surface area in terms of a single variable, in order to easily differentiate,
so we can write h "in terms of" r.
The jar volume is $\displaystyle V={\pi}r^2h\ \Rightarrow\ h=\frac{V}{{\pi}r^2}$
It's surface area is $\displaystyle {\pi}r^2+2{\pi}rh={\pi}r^2+\frac{2{\pi}rV}{{\pi}r^ 2}={\pi}r^2+\frac{2V}{r}$
To find the minimum surface area, differentiate surface area with respect to r
and set it to zero.
$\displaystyle \frac{d}{dr}\left({\pi}r^2+2Vr^{-1}\right)=2{\pi}r-\frac{2V}{r^2}$
If this is zero then
$\displaystyle 2{\pi}r=\frac{2V}{r^2}$
$\displaystyle {\pi}r^3=V={\pi}r^2h$
$\displaystyle {\pi}r^2(r-h)=0$
$\displaystyle r=0$ corresponds to the jar being unrealistically stretched
into an "invisible" line.
$\displaystyle h=r$
$\displaystyle \frac{h}{2r}=\frac{h}{2h}=\frac{1}{2}$