What are the dimensions $(r,h)$ of a cylinder with maximum surface area bounded inside a sphere of radius $R$?
I need to maximize: $S(r,h)=2\pi rh+2 \pi r^2$.
And I understand that $4r^2+h^2=4R^2$.
I made the substitutions but when I set the derivative to zero I get an equation I cant solve. Can someone help me?
We start by getting rid of one variable:
$$h=2\sqrt{R^2-r^2}$$
$$S(r)=2 \pi r (r+2\sqrt{R^2-r^2})$$
Now we use the derivative as usual:
$$S'=2\pi \left(r+2\sqrt{R^2-r^2}+r-2 \frac{r^2}{\sqrt{R^2-r^2}} \right)$$
$$r+\frac{R^2-2r^2}{\sqrt{R^2-r^2}}=0$$
$$r\sqrt{R^2-r^2}=2r^2-R^2$$
$$r^2(R^2-r^2)=4r^4-4R^2r^2+R^4$$
$$5r^4-5R^2r^2+R^4=0$$
$$x^4-x^2+\frac{1}{5}=0$$
Positive solutions:
$$x=\sqrt{\frac{1}{2} \pm \frac{1}{2 \sqrt{5}}}$$
$$r_{1,2}=R\sqrt{\frac{1}{2} \pm \frac{1}{2 \sqrt{5}}}$$
We need to check which of those solutions is a minimum and which is a maximum. Instead of computing second derivative, we'll just substitute them into the function:
$$S_1 =2 \pi r_1 (r_1 + 2 \sqrt{ R^2-r_1^2})=2 \pi R^2 \cdot 1.61803398874 \dots$$
$$S_2 =2 \pi r_2 (r_2 + 2 \sqrt{ R^2-r_2^2})=2 \pi R^2 \cdot 1.17082039324 \dots$$
So, the first root is the maximum point, and we write:
$$r_0=R\sqrt{\frac{1}{2} + \frac{1}{2 \sqrt{5}}}=R \cdot 0.85065080835204 \dots$$
$$h_0=2 \sqrt{R^2-r_0^2}=R \cdot 1.051462224238267 \dots$$