Height/Radius ratio for maximum volume cylinder of given surface area

Solution 1:

Let $r$ be the radius & $h$ be the height of the cylinder having its total surface area $A$ (constant) since cylindrical container is closed at the top (circular) then its surface area (constant\fixed) is given as $$=\text{(area of lateral surface)}+2\text{(area of circular top/bottom)}$$$$A=2\pi rh+2\pi r^2$$ $$h=\frac{A-2\pi r^2}{2\pi r}=\frac{A}{2\pi r}-r\tag 1$$

Now, the volume of the cylinder $$V=\pi r^2h=\pi r^2\left(\frac{A}{2\pi r}-r\right)=\frac{A}{2}r-\pi r^3$$ differentiating $V$ w.r.t. $r$, we get $$\frac{dV}{dr}=\frac{A}{2}-3\pi r^2$$ $$\frac{d^2V}{dr^2}=-6\pi r<0\ \ (\forall\ \ r>0)$$ Hence, the volume is maximum, now, setting $\frac{dV}{dr}=0$ for maxima $$\frac{A}{2}-3\pi r^2=0\implies \color{red}{r}=\color{red}{\sqrt{\frac{A}{6\pi}}}$$ Setting value of $r$ in (1), we get $$\color{red}{h}=\frac{A}{2\pi\sqrt{\frac{A}{6\pi}}}-\sqrt{\frac{A}{6\pi}}=\left(\sqrt{\frac{3}{2}}-\frac{1}{\sqrt 6}\right)\sqrt{\frac{A}{\pi}}=\color{red}{\sqrt{\frac{2A}{3\pi}}}$$ Hence, the ratio of height $(h)$ to the radius $(r)$ is given as $$\color{}{\frac{h}{r}}=\frac{\sqrt{\frac{2A}{3\pi}}}{\sqrt{\frac{A}{6\pi}}}=\sqrt{\frac{12\pi A}{3\pi A}}=2$$ $$\bbox[5pt, border:2.5pt solid #FF0000]{\color{blue}{\frac{h}{r}=2}}$$

Solution 2:

The surface area $S=2\pi r^2+2\pi rh$ is constant,

so $\displaystyle\frac{dS}{dr}=4\pi r+2\pi r\frac{dh}{dr}+2\pi h=0\implies 2r + r\frac{dh}{dr}+h=0$.

When the volume $V=\pi r^2h$ is a maximum,

$\;\;\;\displaystyle\frac{dV}{dr}=\pi r^2\frac{dh}{dr}+2\pi rh=0\implies r\frac{dh}{dr}=-2h$.

Therefore the volume is a maximum when $2r-2h+h=0,\;$ so $h=2r$ and $\displaystyle\frac{h}{r}=2$.