First, notice that, by the Pythagorean Theorem,

meaning that:

Also, since the volume of a cone with radius r and height h is
we know that the volume of the cone is:
![\frac{1}{3} \pi x^2 (3+y) = \frac{1}{3} \pi (9-y^2)(3+y) = \frac{1}{3} \pi [27+9y-3y^2-y^3]](https://tex.z-dn.net/?f=%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20x%5E2%20%283%2By%29%20%3D%20%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%20%289-y%5E2%29%283%2By%29%20%3D%20%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%5B27%2B9y-3y%5E2-y%5E3%5D)
Therefore, we want to maximize the function
subject to the constraint
.
To find the critical points, we differentiate:
![V'(y)= \frac{1}{3} \pi [9-6y-3y^2] = \pi [3-2y-y^2] = \pi (3+y)(1-y).](https://tex.z-dn.net/?f=V%27%28y%29%3D%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%5B9-6y-3y%5E2%5D%20%3D%20%20%5Cpi%20%5B3-2y-y%5E2%5D%20%3D%20%20%5Cpi%20%283%2By%29%281-y%29.%20)
Therefore,
when

meaning that
or
. Only
is in the interval
so that’s the only critical point we need to concern ourselves with.
Now we evaluate
at the critical point and the endpoints:
![V(0) = \frac{1}{3} \pi [27+9(0) - 3(0)^2] = 9 \pi](https://tex.z-dn.net/?f=V%280%29%20%3D%20%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%20%5B27%2B9%280%29%20-%203%280%29%5E2%5D%20%3D%209%20%5Cpi%20%20)
![V(1) = \frac{1}{3} \pi [27+9(1)-3(1)^2-1^3] = \frac{32 \pi }{3}](https://tex.z-dn.net/?f=V%281%29%20%3D%20%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%20%5B27%2B9%281%29-3%281%29%5E2-1%5E3%5D%20%3D%20%20%20%20%5Cfrac%7B32%20%5Cpi%20%7D%7B3%7D%20)
![V(3) = \frac{1}{3} \pi [27+9(3) - 3(3)^2-3^2] = 0](https://tex.z-dn.net/?f=V%283%29%20%3D%20%5Cfrac%7B1%7D%7B3%7D%20%5Cpi%20%5B27%2B9%283%29%20-%203%283%29%5E2-3%5E2%5D%20%3D%200)
Therefore, the volume of the largest cone that can be inscribed in a sphere of radius 3 is 