The Calculus of Hot Chocolate Pouring!

Words
942
Reading
5 min
Listen
Play
9y

Who doesn't love a cup of hot chocolate on a cold winter's night in front of a glowing fire? What could be more instantly gratifying than pressing a button on the Barista machine and watching that cup fill up with all of that goodness?

West-Blend-Hot-Cocoa-Machine-.jpg
Image Source

Suppose a paper cup manufacturer wants to put its product to the test and determine if the dimensions of its cup are just right. For whatever reason, they would like to know if there's an equation that could tell them exactly the level of a liquid that is being poured into their cup at anytime (from the start of pouring).

They manufacture cups in the shape of a truncated cone (called a "frustum") as shown in Figure 1.

i1.png

Figure 1.

A barista machine dispenses hot chocolate at a constant rate, such that the increase in the volume of the liquid in the cup over time is constant. That is...

i18.png

Now, if the cup was cylindrical, or any uniform shape, the volume can generally be expressed as Area of its base by the height...

i2.png

Unfortunately, our hot chocolate cup is not a cylinder. It is tapered, and as such, the cross-sectional area of the liquid contained in it changes with height h. Which, to use a cliche, puts a bit of a spanner in the works.

Let's take small cross-sectional slices of the liquid volume of a very small height i3.png, such that the volume is divided into many thin disks i4.png, as shown in Figure 2.

i11.png
Figure 2.

As these disks are so thin, the taper has a negligible effect on their volume, which can be expressed as...

i5.png

Then taking the limit as i15.png, we have the derivative (or rate of change) of the cup volume with respect to height as...

i16.png

Now, the area of the cross-section at any height is a circle, and can be expressed as...

i6.png

... as the radius of the circle depends on h. From Figure 2, we can use a little trigonometry to work out i7.png.

i12.png

i13.png

i14.png

Substituting the expression for i34.png in to (1), we have...

i17.png

Ok, so we know that the volume increases in the cup at a constant rate K, and we also know that the volume also depends on the height of the liquid. So by the chain-rule...

i19.png

And thus substituting (2), the expression for dV/dh, we have...

i20.png

Now equation (3) is a separable, first-order, non-linear ODE...

i21.png

Integrating both sides...

i22.png

We can use the method of u-substitution to evaluate the integral on the right-hand side...

i23.png

...and so the integral becomes...

i24.png

Now rearranging (5) to solve for h...

i25.png

where...

i26.png

since i27.png, K and C are constants, then i35.png and i36.png are also constants. So, continuing on...

i28.png

Equation (6) is the general solution. We can find the particular solution by applying the initial values. At the start of the pour, when t = 0, the liquid level in the cup h = 0...

i29.png

And finally, we have...

i30.png

Now, here's a selection of cup sizes from this manufacturer...


Image Source

Let's test our solution on the "340mL" cup, which has the following parameters...

  • height H = 97mm
  • a = 59mm
  • b = 89mm

Suppose that the machine we are using pours hot chocolate at a rate of dV/dt = 30mL /s = 30 000mm3/s, we can find the value for i35.png...

i31.png

Substituting all of the other numerical values into equation (7), we have...

i32.png

A plot of this relationship between h and t is shown in Figure 3. As you can see, the increase in height of the liquid gradually slows down with time as the cup is filled. This would be straight line relationship if the cup was a cylinder.

desmos-graph.png
Figure 3.

Now exactly how long does it take to fill the cup to the brim, given its height of 97mm?

i33.png

So it takes about 14s to fill the cup, which sounds very reasonable. How do we know this result is accurate?

Well, the manufacturer claims this cup has a volume of 340mL, which if we're pouring at 30mL/s, should only take just over 11s. If we check the volume of the cup against the formula for calculating the volume of a frustum...

i37.png

...it turns out the volume of this "340mL" cup is actually about 423mL (they may have specified 340mL to prevent people from over pouring into the cup), which does indeed require 14s to fill at a rate 30mL/s.


Credits:

All equations in this tutorial were created with QuickLatex

All graphs were created with www.desmos.com/calculator


Below is a list of tutorials I've created so far on the subject of First Order Differential Equations:

  1. Introduction to Differential Equations - Part 1

  2. Differential Equations: Order and Linearity

  3. First-Order Differential Equations with Separable Variables - Example 1

  4. Separable Differential Equations - Example 2

  5. Modelling Exponential Growth of Bacteria with dy/dx = ky

  6. Modelling the Decay of Nuclear Medicine with dy/dx = -ky

  7. Exponential Decay: The mathematics behind your Camping Torch with dy/dx = -ky

  8. Mixing Salt & Water with Separable Differential Equations

  9. How Newton's Law of Cooling cools your Champagne

  10. The Logistic Model for Population Growth

  11. Predicting World Population Growth with the Logistic Model - Part 1

  12. Predicting World Population Growth with the Logistic Model - Part 2

  13. There's a hole in my bucket! Let's turn it into a cool Math problem!
  14. The Calculus of Hot Chocolate Pouring!

Please give me an Upvote and Resteem if you have found this tutorial helpful.

Please ask me a maths question by commenting below and I will try to help you in future videos.

I would really appreciate any small donation which will help me to help more math students of the world.

Tip me some DogeCoin: A4f3URZSWDoJCkWhVttbR3RjGHRSuLpaP3

Tip me at PayPal: https://paypal.me/MasterWu

The Calculus of Hot Chocolate Pouring! | Ecency