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:

enter image description here

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


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


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.

  • $\begingroup$ Add a point where BC intersects AD, call it G. Now, CG is the radius of the cone, EM is the radius of the sphere, and CEM and CGM are both right triangles with right angles at E and G, respectively. $\endgroup$ Jun 3, 2017 at 16:33
  • $\begingroup$ How do you know that? $\endgroup$
    – Parseval
    Jun 3, 2017 at 16:34
  • $\begingroup$ When a circle is tangent to a line, the line must be perpendicular to the radius drawn from the center of the circle to the point of tangency $\endgroup$ Jun 3, 2017 at 16:34
  • $\begingroup$ Yes of course. Will use your tips and try. thanks! $\endgroup$
    – Parseval
    Jun 3, 2017 at 16:35
  • $\begingroup$ Good luck :) $\,$ $\endgroup$ Jun 3, 2017 at 16:35

4 Answers 4


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.

  • $\begingroup$ By this answer, I take it that the angle $\angle BAC$ of the cone will not affect the ratio at all? $\endgroup$
    – Parseval
    Jun 8, 2017 at 10:48
  • $\begingroup$ The value of $t$ depends on that angle: $t=\cot(\angle BAC/2)$. $\endgroup$ Jun 8, 2017 at 11:08
  • $\begingroup$ How did you deduce the height of the spherical cap $h$ and the constraints on $x$? $\endgroup$
    – Parseval
    Jun 8, 2017 at 11:49
  • $\begingroup$ I added some more details to my answer. $\endgroup$ Jun 10, 2017 at 20:11
  • $\begingroup$ Wonderful! I Awarded you my 50 bounty :) $\endgroup$
    – Parseval
    Jun 10, 2017 at 21:15

This answer has been revised from its original version in order to take into account the following comment on the question:

The problem is to maximize all cones and spheres forming an ice cream like this.

Let's suppose we are permitted to vary the size of the sphere and the size and shape of the cone as much as we want, with the goal of achieving the maximum ratio of the volume $\newcommand{Vcap}{V_\text{cap}}\Vcap$ of the portion of the sphere inside the cone (which is a spherical cap) to the volume $\newcommand{Vcone}{V_\text{cone}}\Vcone$ of the entire cone.

Note that this a very different thing from saying "the cone is fixed." A fixed cone means we can only vary the size of the sphere, not any property of the cone.

The size and shape of the cone can be completely described by two variables. There are several plausible options for which two variables to use, but they all describe the same range of sizes and shapes. I'll use the angle $\theta = \angle BAG$ and the height of the cone, $y = AG.$ The sphere can only vary in size, which is completely determined by its radius, $r.$ So we now have three variables to play with, and the volumes of the cone and the spherical cap can be expressed as functions of these variables: $\Vcone(\theta, y)$ and $\Vcap(\theta, y, r).$

The problem comes with some restrictions on the three variables. The cone and the spherical cap must both have positive volume, for otherwise $\Vcap/\Vcone$ is zero or undefined. Positive volume of the cone implies that $0 < \theta < \frac\pi2$ and $y > 0.$ Positive volume of the spherical cap implies that $r > 0$ and $y > x - r,$ where $x = r\csc\theta$ is the distance from the vertex of the cone to the center of the sphere.

But notice that if we multiply $y$ and $r$ by some factor (the same factor for both) and don't change $\theta,$ the volumes of the cone, the sphere, and the spherical cap all increase or decrease by a common factor. For example, if we double the lengths $r$ and $y,$ all the volumes increase by a factor of $8.$ The ratios of the volumes do not change. This implies that the maximum of $\Vcap(\theta, y, r)/\Vcone(\theta, y),$ if there is a maximum, can be achieved at any value of either $y$ or $r$ that we want. To do this, take any combination of $\theta,$ $y,$ and $r$ that maximizes $\Vcap(\theta, y, r)/\Vcone(\theta, y),$ and scale it up or down so that the value of $y$ (or $r$) is the value we want.

So we could assume, for example, that $y = 1$ and then maximize $\Vcap(\theta, 1, r)/\Vcone(\theta, 1)$ over all $\theta$ and $r.$ Alternatively, we could suppose that $r = 1$ and then maximize $\Vcap(\theta, 1, r)/\Vcone(\theta, 1)$ over all $\theta$ and $y.$ Having tried both, I'll assume $r = 1,$ since the formulas seem not to get messy quite as quickly that way.

We now have a function of two variables that we wish to maximize, $$ f(\theta, y) = \frac{\Vcap(\theta, y, 1)}{\Vcone(\theta, y)}, $$ where $0 < \theta < \frac\pi2$ and $y > \csc\theta - 1.$

There is a widely-used method to maximize a function of two variables, setting both partial derivatives of the function simultaneously to zero in order to find the critical points of the function. This method assumes that the domain of the function is a closed set, however, and our domain is not closed. Moreover, it turns out not to be possible to to reduce the problem to a maximization over a closed domain.

An alternative method is illustrated in an answer to another question. We can follow a similar line of reasoning as follows:

First we define a function $g(\theta)$ for $0 < \theta < \frac\pi2$: $$ g(\theta) = \max_{y > \csc\theta - 1} f(\theta, y). $$ We must show that this function actually is defined (that is, a maximum is achieved) for every $\theta$ such that $0 < \theta < \frac\pi2.$ We then maximize $g(\theta)$ over $0 < \theta < \frac\pi2$: $$ M = \max_{0 < \theta < \frac\pi2} g(\theta). $$ If this maximum value exists, then $M = g(\theta_1) = f(\theta_1,y_1)$ for some $\theta_1$ and $y_1$ such that $0 < \theta_1 < \frac\pi2$ and $y_1 > \csc\theta_1 - 1.$ Then for any $(\theta_2, y_2)$ for which $f(\theta_2, y_2)$ is defined, we have $0 < \theta_2 < \frac\pi2,$ $y_2 > \csc\theta_2 - 1,$ and $$ M = g(\theta_1) \geq g(\theta_2) \geq f(\theta_2, y_2). $$ Therefore $M = f(\theta_1,y_1)$ is the maximum of $f$ over its entire domain.

In order to find the function $g(\theta),$ we (temporarily) assume an arbitrary fixed value of $\theta$ such that $0 < \theta_2 < \frac\pi2,$ and then maximize $\Vcap(\theta, y, 1)/\Vcone(\theta, y)$ over all $y > \csc\theta - 1.$

We can reduce the domain of the maximization by observing that if $y > \csc\theta + 1,$ then $\Vcap(\theta, y, 1) = \Vcap(\theta, \csc\theta + 1, 1)$ but $\Vcone(\theta, y) > \Vcone(\theta, \csc\theta + 1).$ Hence $f(\theta, y) < f(\theta, \csc\theta + 1).$ The maximum of $f,$ if there is one, must occur when $y \leq \csc\theta + 1.$

Assuming $x - 1 < y \leq x + 1,$ where $x = \csc\theta,$ the height of the spherical cap is $h = r + y - x = y + (1 - x).$ We can use the formula $ \Vcap(\theta,y,r) = \frac13\pi h^2(3r - h), $ adapted from Wolfram Mathworld. This gives us \begin{align} \Vcap(\theta, y) &= \frac13\pi (y + (1 - x))^2(3-(y + (1 - x))) \\ & = \frac13\pi (x^3 - 3x + 2 + (3-3x^2)y + 3xy^2 - y^3) \\ \end{align} Observing that this function is zero when $y = x - 1,$ we can take the maximum over $x - 1 \leq y \leq x + 1,$ knowing that the maximum will always be achieved somewhere in that interval other than at $y = x - 1.$

The volume of the cone is $$ \Vcone = \frac13 \pi R^2 y = \frac13\pi y^3 \tan^2\theta $$ where $R = y\tan\theta$ is the radius of the base of the cone. So \begin{align} f(\theta, y) & = \frac{\frac13\pi (x^3 - 3x + 2 + (3-3x^2)y + 3xy^2 - y^3)} {\frac13\pi y^3 \tan^2\theta} \\ & = \left(\frac{x^3 - 3x + 2}{y^3} + \frac{3(1-x^2)}{y^2} + \frac{3x}{y} - 1\right)\cot^2\theta \end{align} for $x-1 \leq y \leq x+1.$ This is maximized either when $y = x-1,$ when $y=x+1,$ or when \begin{align} 0 &= \frac{\partial}{\partial y} f(\theta, y) \\ & = \left(-3\frac{x^3 - 3x + 2}{y^4} + -2\frac{3(1-x^2)}{y^3} - \frac{3x}{y^2}\right)\cot^2\theta \\ &= -\frac{3\cot^2\theta}{y^4} (xy^2 + 2(1-x^2)y + x^3 - 3x + 2) \end{align} (keeping in mind that $x$ is a function of $\theta$ but not a function of $y.$)

We can rule out a maximum at $y = x-1$ (because $f = 0$) or $y=x+1$ (because $\partial f/\partial y < 0$), so the maximum occurs when $xy^2 + 2(1-x^2)y + x^3 - 3x + 2 = 0.$ This is a quadratic equation in $y$ with roots $y = x - 1$ and $y = x - \frac2x + 1.$ We have already ruled out $y = x - 1,$ so the maximum must occur at $$ y = x - \frac2x + 1 = \csc\theta - 2\sin\theta + 1. $$

This implies that $h = 2 - 2\sin\theta$ and $$ g(\theta) = \frac{h^2(3r - h)}{y^3 \tan^2\theta} = \frac{(2 - 2\sin\theta)^2(2\sin\theta + 1)}{(\csc\theta - 2\sin\theta + 1)^3} \cot^2\theta. $$

After this point the calculations get increasingly ugly. Appealing to Wolfram Alpha to plot this function and to find the zeros of its derivative, it looks as if the global maximum in the region $0 < \theta < \frac\pi2$ would occur near $\theta = \frac\pi2,$ except that the function (at least in the form written above) is not actually defined at $\theta = \frac\pi2.$ Instead, $g(\theta)$ is increasing over the entire interval $0 < \theta < \frac\pi2,$ with $$ \lim_{\theta\to\pi/2} g(\theta) = \frac{8}{9}. $$ This is therefore the upper bound of $\Vcap/\Vcone,$ approached by a very wide, short cone containing a wide, thin spherical cap.

This result agrees with the calculations in another answer to this question.

For reference (because of numerous comments below which would not make sense without this context), here is my previous answer, which assumed the size and shape of the cone were fixed:

Let $x$ be the distance $AM,$ initially unknown to you. By examining the dimensions of the cone (as suggested in comments) you can determine the constant ratio $k = EM/AM = r/x,$ where $r$ is the radius of the sphere. Then $r = kx.$

The portion of the sphere inside the cone is a spherical cap (defined as the part of the sphere on one side of a plane, in this case the part below the plane of the cone's base). This spherical cap has a height $h$ (the distance from the bottom of the sphere to the base of the cone); in fact, $h$ is the sum of the sphere's radius $r$ plus the distance from $M$ upward to the base of the cone. (If $M$ is above the base of the cone then the distance "upward" from $M$ to the base is negative.)

If you put all this together, replacing $r$ with the appropriate multiple of $x,$ you should be able to write an equation of the form $h = px + q.$

You can now use one of the formulas for the volume of a spherical cap; in particular this formula should be a nice one: $$ V = \frac13\pi h^2(3r - h). $$

Since $r=kx$ and $h = px+ q,$ plugging in these values we can rewrite $\frac13\pi h^2(3r - h)$ as an expression in which the only unknown value is $x.$ That expression will be a cubic polynomial.

You can then apply the usual single-variable calculus approach to maximizing the value of a function. That is, to find the maximum volume $V,$ take the derivative of the polynomial (which is a quadratic in $x$) and set it to zero. The maximum volume occurs either at a value of $x$ for which the derivative of the volume is zero or at the minimum or maximum possible value of $x$ (in this case, $x=0$ or $x$ so large that the sphere is just tangent to the cone at the circle around the base of the cone).

  • $\begingroup$ I can't express $h=px+q$. How would you do this? $\endgroup$
    – Parseval
    Jun 4, 2017 at 11:56
  • $\begingroup$ I can't make sense of this. what is $p$ and $q$? $\endgroup$
    – Parseval
    Jun 4, 2017 at 12:40
  • $\begingroup$ "Of the form $h=px+q$" means that after you work out all the details in the previous paragraph, you'll be able to write an equation with $h$ on the left and some formula involving $x$ on the right, and you can simplify the formula until it's just something times $x$ plus something else. The first "something" is $p$ and the second "something" is $q.$ You don't actually ever have to write the symbols $p$ and $q$; they're just a kind shorthand for "something" and "something else". $\endgroup$
    – David K
    Jun 4, 2017 at 13:08
  • $\begingroup$ Yes, I understood that p and q were just arbitrary numbers. But I still don't see how to write it in that form. $\endgroup$
    – Parseval
    Jun 4, 2017 at 13:13
  • $\begingroup$ In my calculations, I've been using $r=$ sphere radius and $R=$ cone base radius. So now I have $r=kx$ for an arbitrary constant $k$. You also say that $h=r+MG$ which I understand. But how can I express $MG$? $\endgroup$
    – Parseval
    Jun 4, 2017 at 13:27

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.

  • $\begingroup$ How much is $2\theta$? Okay, assume the cone has fixed parameters, how does one solve this problem? $\endgroup$
    – Parseval
    Jun 4, 2017 at 18:50
  • $\begingroup$ And yes, you can trim the cone or mage $r$ larger to increase the ratio, but you can't increase it infinitely. The ratio will be between 0 and 1. But for what values will it be maximum? My point is that, there does exist a shape of a cone, such that when a sphere is placed on top of it, the volume of the sphere below the rim-plane is occupies the largest possible volume of the cone. $\endgroup$
    – Parseval
    Jun 4, 2017 at 18:56

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 )

  • $\begingroup$ Yes $\angle CAB$ changes as well. No, nothing is constant, all parameters are subject to variation. I've tried to do this in 2D as well but I feel there are too many variables and I can't express all variables in terms of only one and differentiate. Single variable differentiation should suffice to solve this problem. $\endgroup$
    – Parseval
    Jun 5, 2017 at 19:54
  • $\begingroup$ Well if you find what happens in 2D then you just rotate that shape and create the 3D object $\endgroup$ Jun 5, 2017 at 20:07
  • $\begingroup$ Also are the sides of the cone constant ?? $\endgroup$ Jun 5, 2017 at 20:09
  • $\begingroup$ When I say side I mean if (AC) remains constant $\endgroup$ Jun 5, 2017 at 20:11
  • $\begingroup$ No, AC can vary. So there should exist a particular shape of cone such that, a sphere placed on top of it should take up as much volume as possible from the cone. What is this maximum percentage of voulme of the cone that the part of the sphere can take up? $\endgroup$
    – Parseval
    Jun 5, 2017 at 20:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .