How chocolate companies use derivatives to make money.

Hitesh Pandharkar
5 min readNov 19, 2020

When I studied differential calculus for the first time I had trouble finding any of it’s practical applications. I mean I knew it was a great tool to calculate variations in a system over a time, space, etc. But to me, a normal boy it was just a mathematical machinery I had to use to pass the exam and it wasn’t noticeable in my day-to-day life.

But one day I noticed it, not on a paper but in a wrapper!

Thanks to Cadbury Dairy Milk!

Get ready…!

Cadbury Dairy Milk, the chocolate bar has shrunk in size(rectangular cross section area) over time. If you’d be able to go back in time and see a bar of Dairy Milk from ten years ago. You will see it used to be bigger in size than the one we get today, the difference would be apparent. But if you take a bar from a month ago we wouldn’t be able to tell if it has shrunk just by having a cursory glance over it, because the makers of the thing decrease it’s size by a just the amount(which they know) we won’t be able to notice.

But how exactly do they pull it off?

Let’s find out!

Say we have a bar we got yesterday and another a from a month ago.

We see that there is a decrease in it’s weight so the size has to go down,

i.e the length and the breadth must have decreased(the thickness of the bar has been assumed constant in this case). Let’s call the current length and breadth of the bar, f(x) and g(x) respectively, and let’s draw the outline of the bar.

Note:- The ‘x’ represents time here you can replace it with ‘t’ if you want, I’m using ‘x’ since that is what we generally see when see it for the first time.

Fig. 1

Now place the bar from the past month on top of the figure and draw it as well. Let’s now call the change in length and breadth as f(Δx) and g(Δx).

Fig. 2

So, now we have to figure out a general case for how the length and breadth change over(a continuous interval) time. We see decrease in area of the rectangle. Since,

Area = f(x)⋅g(x)

From the above figure,

ΔArea = vertical rectangle + horizontal rectangle + the small rectangle

ΔArea = g(x)⋅f(Δx) + f(x)⋅g(Δx) + f(Δx)⋅g(Δx)

Since, we want the change over time we divide both sides by Δx. This will give us the change(slope of the curve at that point) in length and breadth of the bar during a particular time stamp Δx.

So, we’ve got what we wanted. Or have we?

As Δx — >0 the last term goes to zero very quickly so we can ignore it. And you can confirm this for yourself, by putting in any three numbers very close to zero for f(Δx), g(Δx) and Δx. So the Equation becomes the following.

The left hand side is the derivative of Area with respect to time and so is the case on the right hand side, we have a couple of derivatives.

Since,

So the final equation becomes,

Substituting f(x)⋅g(x) for Area in the above equation gives:-

And BOOM we got the product rule for differentiation which is one of the first things taught in any calculus class.

Let’s dig deep and see why it is the way it is and not the other(expected) way. Look carefully the first term finds what would be the change in size if the breadth would have been constant. So imagine stretching the chocolate bar along the length keeping the breadth constant(making it tall). The second term finds what would be the change in size if the length would have been constant, stretching the chocolate bar along the breadth keeping the length constant(making it fat).

Since, both length and breadth change simultaneously we add both the terms.

The equation says that the change in the size(Rectangular Cross Section Area) of the bar is the area of the rectangle formed by the change in length(first term in the equation) plus the area of the rectangle formed by the change in breadth(second term in the equation).

This also shows why the derivative of the product of two functions is not the product of the derivatives of the functions involved. In other words why differentiation is not distributive over multiplication like it is over addition.

But there is a case where it is possible and differentiation distributes over multiplication but I won’t tell you, let’s keep it a curiosity for the curious and let the curious find it for themselves.

So, finally we have an equation for the change in size and we also have the equations for the length and breadth at any point in time.

But how do we find the required change in the length and breadth so that no one realizes we’ve decreased the size of the chocolate bar? There one more law involved here called Weber–Fechner law it shows how humans perceive things and changes in their environment.

Hope this helps in understanding calculus a bit and the cruel, cruel trick that these chocolate companies play on you.

--

--