Find the volume of the largest right circular cone that can be inscribed in a sphere of radius r?

I checked this question but didn't fully understand it.

I know that the volume of a right circular cone is $V = \frac{1}{3}\pi x^2h$

I know that I must take the first derivative and set it equal to zero, which will find the maximum.

My problem is how to deal with the variable $h$, the height?

How can I rewrite that in terms of $x$ or $r$.

I have tried to implicitly differentiate this equation, but that wasn't helpful for me.


Image:Diagram

Ok. In the image above, there are two sketches. The one on the left is in 3d, but is kinda hard to refer to. The one on the right is in 2d and easier to see what's going on, so I'm going to use that (just imagine it's a cross-section of the 3d pic).

The secret of the whole problem is to relate $h$ and $b$. This is done using the equation for the right half of the circle: $$x = \sqrt{r^2-y^2}$$

$b$ is the $x$ value when $y$ is offset from the top of the sphere by $h$. Thus, the equation in terms of $b$, $h$, and $r$ is: $$b = \sqrt{r^2 - (r-h)^2}$$

Now to relate to the volume of a cone: $$V_{cone} = \frac\pi 3 \cdot b^2 h$$ $$V_{cone} = \frac\pi 3 \cdot (r^2 - (r - h)^2) h$$ Simplifying: $$V_{cone} = \frac \pi 3 \cdot (2h^2 r-h^3)$$ Differentiate: $$\frac{dV_{cone}}{dh} = \frac \pi 3 \cdot (4r - 3h)h$$ Solve: $$h = \left\{0, \frac{4r}{3}\right\}$$ We want the maximum, which obviously will occur at the second value of $h$. Finding the maximal volume is a simple algebra problem now.


The height $h$ is the distance from the apex to the circular base. It is between $0$ and $2r$ (with $r$ the radius of the sphere), and the radius of the base grows as $h$ increases from $0$ to $r$ and then shrinks again as $h$ increases to $2r$. A diagram may convince you that by Pythagoras $(h-r)^2+x^2=r^2$, where $x$ is the radius of the base. That allows you to eliminate $x^2$ in favour of $2rh-h^2$, so you have $V(h)=\frac13(2rh-h^2)h$ and thus $V'(h)=\frac13(4rh-3h^2)$, which vanishes at $h=\frac43r$ and thus $x=\frac{\sqrt8}3r$, with maximal volume $V=\frac13\pi\frac89r^2\frac43r=\frac{32}{81}\pi r^3=\frac8{27}V_\text s$, where $V_\text s$ is the volume of the sphere.


With given radius r of a sphere let the inscribed cone have height h then remaining length without radius is (h-r) let R be radius of cone then there we get a right angle triangle with r as hypotanious R as adjecent and (h-r) as opposite side. Now by pythagorus theorem ((h-r)^2)+(R^2)=(r^2). Now express R in terms of h and r. We get (R^2)=(2hr-hh). Substitute in the volume of cone equation V=(pi/3)(R^2)h. Now V=(pi/3)(2hr-hh)h. Differentiate wrt h with r as constant because radius cannot be variable and substitute to zero to get maxima. We get h=(4r/3).