Sphere on top of a cone. Maximum volume? I received an interesting problem which I can not figure how to solve. It follows: An ice cream has the shape of a sphere and a cone like the image below. What is the maximum volume that the sphere can occupy out of the cone? Note that $M$ is the center of the sphere, not the center of the circle of the base of the cone. I hope you understand my phrasing. 
A rephrasing of the problem statement would be, I believe:  Say you have an arbitrary cone, and you are going to place a sphere on it with radius $r$, what is the maximum volume of the cone the sphere can occupy, provided some part of the sphere-cap is allowed to be above the circular cone base?
This is my drawing of the problem:

Attempt so far: I know that $\bigtriangleup AEM\sim\bigtriangleup ACG$. Denote $AM=x$, $GH=h$, then $GM=h-r.$ By the Pythagoran theorem on $\bigtriangleup ACG$ I get that 
$$AC=\sqrt{(x+h-r)^2+R^2}.$$
Since $R/AC=k$ is a constant, by similar triangles I obtain 
$$\frac{r}{x}=\frac{R}{AC}=k \Leftrightarrow r=kx$$ 
The volume of the cone is
$$V_{cone}=\frac{R^2\pi(x+h-r)}{3}=\frac{R^2\pi(x+h-kx)}{3}.$$ 
Using the formula for a spherical cap, I get that the volume of the sphere that is below the cone base is 
$$V_{s.cap}=\frac{\pi h^2(3r-h)}{3}.$$ 
Thus the ratio is 
$$f(x)=\frac{V_{s.cap}}{V_{cone}}=\frac{\frac{\pi h^2(3r-h)}{3}}{\frac{R^2\pi(x+h-kx)}{3}} = \frac{h^2(3r-h)}{R^2(h+(1-k)x)}.$$
But this does not work.
 A: Let's suppose first of all the cone is given, with base radius $R$ and height $H$, and set $x=r/R$, $t=H/R$.
By similar triangles we have 
$\displaystyle MA={r\over R}AC={r\over R}\sqrt{R^2+H^2}=r\sqrt{1+t^2}$
and the height $h$ of the spherical cap inside the cone can then be written as
$$
h=r+H-MA=H-r\left(\sqrt{1+t^2}-1\right).
$$
Notice that this makes sense as long as $0\le h\le 2r$, which entails:
$$
{\sqrt{1+t^2}-1\over t}\le x \le {\sqrt{1+t^2}+1\over t}.
$$
The ratio between the volume of the spherical cap inside the cone and the volume of the cone can then be written as:
$$
f(x)=\frac{V_{s.cap}}{V_{cone}}= \frac{h^2(3r-h)}{R^2H}
={1\over t}\left(t+x-x\sqrt{1+t^2}\right)^2\left(2x-t+x\sqrt{1+t^2}\right),
$$
where $t$ is fixed and $x$ can vary between the limits given above.
By differentiating this it turns out that $f(x)$ has two stationary points: a local minimum at $x={\sqrt{1+t^2}+1\over t}$ (which is the upper bound for $x$) and a local maximum at
$$
x_\max={t\sqrt{1+t^2}\over \sqrt{1+t^2}-1+t^2},
$$
which is inside the permitted range for $x$.
Plugging this into $f(x)$ we can find the maximum volume ratio $f_\max$ as a function of $t$:
$$
f_\max(t)=\frac{4 \left(\sqrt{t^2+1}(1+t^2)-3t^2+1\right)}
{\left(t^2-3\right)^2}.
$$
By differentiating one finds
$$
f'_\max(t)=-{4t\over\big(2+\sqrt{1+t^2}\big)^3},
$$
which is negative for $t>0$.
It follows that $f_\max(t)$ is a monotonically decreasing function for $t>0$, thus 
$$
f_\max(t)<f_\max(0)={8\over9},
\quad\hbox{for $t>0$}.
$$ 
But of course $t=0$ is a degenerate case, because both volumes vanish as $t\to0$. Hence this maximum value should be regarded as a limiting case: the ratio $V_{s.cap}/V_{cone}$ can never reach $8/9$ but can be as close to it as one wants.
A: If the  the cone (rim radius $R$, opening angle $2\theta$) is given there is no maximum problem to solve. Any ball of radius $r\geq R$ will sit on the rim, and the larger its radius $r$, the larger portion of the volume of the ball is outside of the cone. If you insist that the ball is tangent to the cone at the rim there is no optimization problem left. Just calculate the resulting volume ratio of your choice, given the opening angle $2\theta$. If you allow the ball to touch the cone below the rim then you can always trim the cone (or make $r$ larger) in such a way that the ratio you are looking at (however it is defined) gets larger.
All this is meant to show that you have not set up a clear cut problem.
A: Hint:You can study the problem in 2D and it will still remain the same .also in order to proceed and help you need to specify exactly and very precisely what is known and what you want to find  for example 1) is the radius of the sphere constant ,2) when you say arbitrary cone you mean that CAB angle changes (if it is not  then Christian Blatter is right the position is only one and thus the volume of sphere inside of the cone does not change ) 
