*Firefox
(version 31.0, at the time of this writing) does a rather good job,
probably the best of most current browsers.*

*I may also use this page as a test case for
responsive web design.*

We will assume that the can is a uniform cylinder and that we are only concerned
with its center of gravity when it is sitting upright. We will assume that the
gravitational field is constant over the height of the can, so we may consider
the *center of mass* to be equivalent to the *center of gravity*.

$2h=\text{The height of the can,}$

${m}_{b}=\text{The mass of the beer,}$

${m}_{c}=\text{The mass of the can, and}$

$k=\frac{{m}_{b}}{{m}_{c}}$

If we define *x*, where 0 ≤ *x* ≤ 1, as the proportion of beer remaining in the can, and
we define *y*, where 0 ≤ *y* ≤ 1, as the height of the center of mass of the can and the beer
together, as a proportion of the height of the center of mass of the can alone, then

$h=\text{the height of the center of mass of the can,}$

$hx=\text{the height of the center of mass of the beer,}$

$hy=\text{the height of the center of mass of the beer and can, and}$

${m}_{b}x=\text{the mass of the beer remaining in the can.}$

The mass times the distance of the center of mass (from the base of the can, in this case) is sometimes called the "mass moment". The mass moment of the beer and the can together must be equal to the mass moment of the beer plus the mass moment of the can:

$$hy\left({m}_{b}x+{m}_{c}\right)=hx{m}_{b}x+h{m}_{c}$$

That is another way of saying that the height of the center of mass of the beer and can together
is the *mass-weighted average* of the height of the center of mass of the beer and the
height of the center of mass of the can.

Solving for *y*,

$$y\left({m}_{b}x+{m}_{c}\right)={m}_{b}{x}^{2}+{m}_{c}$$

$$y\left(\frac{{m}_{b}}{{m}_{c}}x+1\right)=\frac{{m}_{b}}{{m}_{c}}{x}^{2}+1$$

$$y\left(kx+1\right)=k{x}^{2}+1$$

$$y=\frac{k{x}^{2}+1}{kx+1}$$

That function tells us how the center of mass moves as the beer is consumed.
The shape of the curve depends on the ratio *k* of the initial mass of the beer
to the mass of the can.

*y* reaches a minimum when its derivative goes to zero. Differentiating,

$$\frac{dy}{dx}=\frac{k\left(k{x}^{2}+2x-1\right)}{{\left(kx+1\right)}^{2}}$$

It can be seen that the derivative is zero when
$k{x}^{2}+2x-1=0$.

The positive solution for that polynomial is the proportion of beer left when the
center of mass is at its lowest level. Using the
quadratic formula,

$$x=\frac{-2+\sqrt{4+4k}}{2k}$$

Which simplifies to

$$x=\frac{\sqrt{k+1}-1}{k}$$

For a typical 12-ounce aluminum beer can, the mass of the beer is about 10 times
the mass of the can (*k* = 10), so the center of mass is at its lowest when there is slightly
less than one-quarter of the beer remaining in the can:

$$x=\frac{\sqrt{11}-1}{10}\approx 0.23$$

$$2xh\left({m}_{b}x+{m}_{c}\right)=xh{m}_{b}x+{m}_{c}h$$

and simplify, we get the same polynomial as before, without having to use a derivative:

$$2x\left(kx+1\right)=k{x}^{2}+1$$

$$2k{x}^{2}+2x=k{x}^{2}+1$$

$$k{x}^{2}+2x-1=0$$

Cheers!