Aime F. answered 12/11/22
Experienced University Professor of Mathematics & Data Science
The work equals the change in potential energy of each chocolate layer of elevation z, infinitesimal thickness dz, radius r(z) i.e., area a(z) = πr(z)² and hence infinitesimal weight df(z) = gδa(z)dz, If "inverted" means cone apex down at z = 0 < h = cone height then r(z) = r(h)h⁻¹z. The elevation change to get to the top (inverted base) is h–z so the total work to raise a depth 0 < c < h of chocolate is
w(c) = ∫₀c(h – z)df(z)
= gδπ ∫₀c(h – z)r(z)²dz
= gδπr(h)²h⁻² ∫₀c(h – z)z²dz
= gδπr(h)²h⁻²(hc³/3 – c⁴/4)
= gδπr(h)²h²(1/3 – c/4h)(c/h)³
that for 0 < c < h increases monotonically from w(0) = 0 to w(h) = gδπr(h)²h²/12.