Naivety and desperation in mathematical modelling can somewhat push you far

IB
high school math
mathematical modelling
Author

Salman Faris

Published

October 1, 2024

When I was 19, I had to complete the notorious Math HL internal assessment (IA) for the International Baccalaureate (IB) diploma. The assessment is basically an open-ended project and was really a platform for students to explore a topic that interests them, showcasing their creativity. But for the average IB student like me, it was just another difficult assessment to complete so that I can get into a top university.

Math was not really my strong suit back then contrary to what people today thought. I took Math HL – the harder version of math in the IB – because I wanted to do Computer Science at a good university and it was listed out as a requirement; and definitely not because I was good at math. Having been punished with internal exams then, I quickly realized that the final written exams is going to be hard. Luckily for me, the final marks was a weighted sum of the internal assessment and the written exam. So my logic was that if I can score really (and I mean, really) high in the internal assessment, then I would have a good shot at getting a good grade in the diploma.

From there, the focus was clear. How do I make a damn good IA, I asked myself. I am not going to answer this here, but what I can tell you is that I basically just went against most of what my teachers advised me to do; and trusted my gut feelings instead. If you’re interested, however, in gaming the marking metrics, I wrote this Quora post back in 2019. It has accumulated 200k+ views since and I still receive loads of messages from people asking for my IA.

Recalling what was going on in my mind 6 years ago, the equation that I was most proud of has to be:

\nu(Q) = \left\lfloor \frac{1}{2 \pi} \exp \left\{ \omega \left ( \tau_0 \log \left( \frac{1}{K} \log \frac{\Delta Q_S}{Q - Q_a} \right) + \tau_C \right) \right\} \right\rfloor,

and I’m not even going to detail what those variables and constants are. This equation was the final output of my IA research. It describes the number of spoon rotations \nu that one should perform to get the temperature of coffee from a temperature \Delta Q_S + Q_a to Q. You want your coffee to be 45 degrees? Turns out you need 1442 rotations according to the paper I wrote (of course this is assuming a lot of things). It was the culmination of intense thinking and hard work which I am still proud of today, especially because this is the first original work I have done in math, ever.

Mind you I was only exposed to very little math at this point. All I used was basic differential equations and a tiny bit of complex numbers. If only I knew about complex analysis back then… it would have been even more interesting.

While the equation above is indeed cool, it’s not really the star of the paper I wrote. From my perspective today after having done several years of mathematical training, it was how I get to this equation is the remarkable bit. The true star of that paper is when I made this link: view a spoon rotation as a movement on a perfect circle of fixed radius r and forget the cup entirely. Then the spoon moves along this circle exactly like a complex number z(t) = r \exp (i \theta(t)) with angle \theta(t) modulo (-\pi, \pi] which makes a lot of sense. What doesn’t make a lot of sense is what I do next.

Rather than just tracking for the position of spoon on this circle, I want a measure \nu for the total number of distance traversed by this spoon on the circle. Essentially, I want the number of rotations done by the spoon, preferably an integer, but I’m happy taking fractional values as well since we can always floor a rational number. Since we are calculating \theta(t) modulo (-\pi, \pi], we can do this by keeping track how many times we have gone outside of this range. But how can you do this in a single equation?

Back in school, I remembered that a core element of the math HL IA was to use “HL mathematics”. Essentially, this means using mathematics that were taught only in the higher level HL syllabus but not covered in the standard level. This is because it was part of the marking criteria made public by the IBO. My teacher repeatedly reminded the class about this, so I became desperate. Remember, I need to score really high in the IA to offset my downside in the written portion of the exam. And boy, naivety and desperation really brings you far. I decided to model the number of spoon rotations… also using complex numbers, since it was covered only as part of the HL syllabus. So I asked myself, suppose a complex number z(t) equals the number of fractional rotations \nu times the circumference of the circle C, that is, z = \nu C, what happens then?

Any person with some mathematical modelling experience would deem this not a great move. But it worked. This gave the equation I mentioned earlier in the post and it works like a charm then, it still works today. So let’s see why this works.

Putting z = \nu C means equivalently we have \nu = z/C which is what we actually want. As before, write z(t) = r \exp (i \theta (t)), but now forget that \theta is an angle, just view it purely as a function. I’m gonna skip being rigorous for now, like whether \theta is complex-valued or real-valued, let’s just wing it since I’m talking about a high school project anyways. So modelling number of spoon rotations \nu using this equation amounts to getting a sensible \theta(t) function. Now we want \nu to be nonnegative and the number of spoon rotation should grow with increasing t. Thus \theta(t) must admit a form t \mapsto i\theta'(t) for some arbitrary function \theta' to kill i. We don’t really need a negative sign to force the exponent terms to be positive (due to i^2=-1) since it is possible there is a “damping” effect with increasing number of rotations to cool down the coffee.

From here, we can actually stop and see why it works. There is nothing stopping the function \theta' to admit a logarithmic form, killing the exponent and allows z to take virtually any shape. For example, if \theta'(t) is simply t \mapsto -\log(t+k) where k is a constant, then we get z(t) into a linear form.

z(t) = r \exp (i (i (- \log(t+k)))) = r \exp \log(t+k) = rt + rk = rt + k'.

It should be clear from here that the possibilities are indeed endless since \theta' can be almost anything.

What’s funny is that this approach is the exact opposite to Occam’s razor, a philosophy that most modellers would follow. Rather than starting with a simpler model, here you start by opting for a more complex model that can be reduced (in an explainable way) to a simpler model. The only upside is that if the number of spoon rotations is indeed exponential, or requires damping, then we have the right model right away. Occam’s razor advises to do the opposite – start with a simpler model, see whether it breaks, and if it does, see where and how it breaks and improve on that. There is wisdom to be learnt here, however.

For a start, Occam’s razor can fail. Occam’s razor has led me to wrong analysis conclusions so many times in my years of experience as a data scientist, so it is refreshing to see an example where someone not obeying Occam’s razor has something that magically works right off the bat.

Secondly, naivety and desperation can bring you quite far. My math HL IA was my first experience doing mathematical modelling from scratch. I didn’t even know what Occam’s razor was, or how a mathematician would actually do mathematical modelling and my teachers weren’t much of a help honestly. So I just winged it, asked the right questions but tried solutions that I don’t even know was going to work or not. What if the shape z(t) = r \exp (i \theta(t)) was indeed the only right shape for the problem? That would have been viewed as a spectacular (lucky) discovery rather than a goofy approach, no?

So would I do something like this today? Probably not. But I think this is a great counterpoint for why you want to hire fresh juniors sometimes since hungrier people with little training implies a fresh view of the problems you’ve been working on for a long time. Training them is another story though…