Self nerd-sniping with macaroni cheese

18 minute read

The other day I baked macaroni cheese in an oval-shaped oven dish and ended up going down quite the rabbit hole when wanting to divide it into eight equal portions. This is the story of that journey.

Danger! This deep dive involves calculus, trigonometry, and Numerical Recipes in Fortran 77.

Baked macaroni cheese in an ellipsoidal baking dish; overlaid with a
diagram showing the ellipse's minor and major axes as well as the area to
integrate to obtain one-eighth of the total.
Be careful when baking macaroni cheese: you might think too much and nerd-snipe yourself.

Cutting up baking: a mathematical approach

Have you ever nerd-sniped yourself?

That happened to me the other day after I made some macaroni cheese.1 As is my wont, I made a double recipe and fortunately, the baking dish was sufficiently large. Once baked, I realised that the baking dish was oval–and hence roughly elliptical–and I wanted to cut the final result into eight equal-sized pieces. How to do this accurately?

Because the dish had roughly vertical sides, this meant the problem reduced to dividing the ellipse formed by the dish’s shape into eight portions of equal area. That can’t be that hard to work out, can it?2 After all, the area of an ellipse is well known and cutting the dish into four equal parts is easy: just use the axes of the ellipse. One would think that cutting everything into eight equal pieces must be doable as well.

To cut it into eight equal pieces (each being roughly rectagonal-ish), I only need to integrate the function of an ellipse for the top, right-hand quadrant starting from zero up to an unknown upper bound and then set the result of the integral equal to one-eighth of the area of an ellipse. Then I can solve for the unknown upper bound. This will be how far along the semi-major axis I need to make the vertical cuts in the macaroni cheese, to have eight, nice, equal portions.

That must be reasonably easy, right? After all, describing the situation only took a fairly long and convoluted paragraph.

Oh.

Maybe this wasn’t such a brilliant idea after all?

Diving in

Let’s have a go anyway. Here’s the situation up close:

… where my wife had already taken a piece out of the dish before I could take a photo or work out how much an eighth would be. Oh well.

Our task is to try and work out what the value \(w\) is so that the area of the shaded region is 1/8th of the area of the ellipse formed by the outline of the baking dish.

The parameters shown in the diagram above are:

  • \(a\), the ellipse’s semi-major axis,
  • \(b\), the ellipse’s semi-minor axis, and
  • \(w\), the distance from the \(y\) axis to where we should make the vertical cut to ensure each piece is one-eighth of the total.

To work out the area of the shaded region, we have to integrate the function for an ellipse in the top, right-hand quadrant (where both \(a\) and \(b\) are positive; this is a handy property to have) from \(x=0\) up to \(x=w\). Then we’ll set this value equal to 1/8th of the known equation for the area of an ellipse which will eventually allow us to solve for \(w\).

Let’s dive in!

Reformulating the above sentences into a mathematical statement, we get this:

\begin{equation} \frac{A_\text{ellipse}}{8} = \int_0^w y(x)\ dx; \quad \text{find $w$,} \label{eq:general_integral_form} \end{equation}

where \(y(x)\) is the equation for an ellipse in terms of \(x\).

We know that the area of an ellipse is

\begin{equation} A_\text{ellipse} = \pi a b. \label{eq:ellipse_area} \end{equation}

We also know that the standard equation of an ellipse is

\begin{equation} \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1. \end{equation}

Thus, we can rewrite \(y\) in terms of \(x\), which is what we need for the integration, i.e.:

\[\begin{align} \frac{x^2}{a^2} + \frac{y^2}{b^2} &= 1\\ \Rightarrow \frac{y^2}{b^2} &= 1 - \frac{x^2}{a^2}\\ \Rightarrow y^2 &= b^2 \left( 1 - \frac{x^2}{a^2} \right)\\ \Rightarrow y(x) &= b \sqrt{ 1 - \frac{x^2}{a^2}}.\label{eq:ellipse_function} \end{align}\]

Substituting Equations (\(\ref{eq:ellipse_area}\)) and (\(\ref{eq:ellipse_function}\)) into Equation (\(\ref{eq:general_integral_form}\)) we get

\begin{equation} \frac{\pi a b}{8} = \int_0^w b \sqrt{1 - \frac{x^2}{a^2}}\ dx \label{eq:integral_over_x} \end{equation}

which is the general form of the problem we’re trying to solve.

The hard part here is evaluating the integral on the right-hand side, so let’s concentrate on that first. Also, we’ll ignore the integration limits for now and focus instead on only the indefinite integral:

\begin{equation} \int b \sqrt{1 - \frac{x^2}{a^2}}\ dx. \label{eq:indefinite_integral_over_x} \end{equation}

Integrating over a variable within a square root is a bit tricky, so we’ll introduce a change of variables to make our lives easier. But how?

It won’t be immediately obvious, but if you squint at the expression

\begin{equation} \sqrt{1 - \frac{x^2}{a^2}} \end{equation}

in just the right way, you can work out that it’s one side of a right-angled triangle. Consider a right-angled triangle where the hypotenuse is set to \(1\) and one of the other sides is set to \(\frac{x}{a}\). Then (due to Pythagoras) you’ll see that the remaining side of the triangle is \(\sqrt{1 - \frac{x^2}{a^2}}\).

It’s easiest to see this in a diagram:

Right-angle triangle with sides related to change of variables to aid in
integration

If we then consider an angle \(\theta\) chosen so that the side \(\frac{x}{a}\) is opposite the angle and \(\sqrt{1 - \frac{x^2}{a^2}}\) is adjacent to the angle, then we obtain some useful relations:

\[\begin{align} \sin \theta &= \frac{x}{a}, \label{eq:opposite_side_relation}\\ \cos \theta &= \sqrt{1 - \frac{x^2}{a^2}}. \label{eq:adjacent_side_relation} \end{align}\]

These relationships mean we can rewrite the integral in terms of \(\theta\), which will make things easier to calculate. For instance, we can replace the \(\sqrt{1 - \frac{x^2}{a^2}}\) term with \(\cos \theta\) which simplifies things nicely.

Note that the angle \(\theta\) is not strictly related to an angle in our diagram overlaid onto the macaroni cheese image. We’re mapping the problem into a different set of variables to make the integration easier. These variables aren’t necessarily related to the original problem space.

We’ve got one more piece of the puzzle to work out before we can complete the change of variables in the integral in Equation (\(\ref{eq:indefinite_integral_over_x}\)): what do we do with the \(dx\)?

Let’s rearrange Equation (\(\ref{eq:opposite_side_relation}\)) to get an equation for \(x\):

\[\begin{align} \sin \theta &= \frac{x}{a}\\ \Rightarrow x &= a \sin \theta. \end{align}\]

Since this is an equation of \(x\) in terms of \(\theta\), we can differentiate both sides with respect to \(\theta\) like so:

\[\begin{align} \frac{dx}{d \theta} &= \frac{d}{d \theta} a \sin \theta\\ \Rightarrow \frac{dx}{d \theta} &= a \cos \theta. \end{align}\]

Now, because we can sometimes treat differentials as behaving like fractions,3 we can rearrange this for \(dx\), giving

\begin{equation} dx = a \cos \theta\ d \theta, \end{equation}

which we can substitute into Equation (\(\ref{eq:indefinite_integral_over_x}\)), thus completing the substitution of variables. In other words, we transform this integral

\begin{equation} \int b \sqrt{1 - \frac{x^2}{a^2}}\ dx \end{equation}

into

\begin{equation} \int b \cos \theta \cdot a \cos \theta\ d\theta. \end{equation}

Simplifying things a bit gives

\begin{equation} a b \int \cos^2 \theta\ d\theta. \label{eq:integral_over_theta} \end{equation}

This managed to get rid of the icky square root, but the \(\cos^2\) also doesn’t look that easy to integrate, does it? This is where trigonometric identities come in handy.4

Using the power-reduction formulae, we have the identity:

\begin{equation} \cos^2 \theta = \frac{\cos (2\theta) + 1}{2}. \end{equation}

Thus, we can rewrite Equation (\(\ref{eq:integral_over_theta}\)) as

\begin{equation} \frac{a b}{2} \int \left( \cos (2 \theta) + 1 \right)\ d\theta. \end{equation}

All right! This we can integrate!

Expanding the brackets (so that we can concentrate on individual terms) gives

\begin{equation} \frac{a b}{2} \int \cos (2 \theta)\ d\theta + \frac{a b}{2} \int \ d\theta. \label{eq:simplified_integral_over_theta} \end{equation}

The first term’s a bit odd because we’ve got \(2 \theta\) within the cosine, however if we consider that \(\sin \theta\) differentiates to \(\cos \theta\) and we remember the chain rule for differentiation, we can see that

\begin{equation} \frac{d}{d \theta} \frac{1}{2} \sin (2\theta) = \frac{1}{2} \cdot 2 \cdot \cos (2\theta) = \cos (2\theta). \end{equation}

This result implies that

\begin{equation} \int \cos(2\theta) = \frac{1}{2} \sin(2\theta). \label{eq:integral_cos_2_theta} \end{equation}

Therefore, we can find the integral for this term in Equation (\(\ref{eq:simplified_integral_over_theta}\)), which is

\[\begin{align} \frac{a b}{2} \int \cos (2 \theta)\ d\theta &+ \frac{a b}{2} \int \ d\theta\\ = \frac{a b}{4} \sin (2\theta) &+ \frac{a b}{2} \theta + c, \end{align}\]

where \(c\) is the integration constant because we’ve not yet used the integration limits from Equation (\(\ref{eq:integral_over_x}\)).

That \(\sin (2\theta)\) term looks like it could cause problems and I’d like to write everything only in terms of \(\theta\), so let’s use another trigonometric identity. Yay!

For instance, we know that

\begin{equation} \sin (2\theta) = 2 \sin\theta \cos\theta. \end{equation}

This implies that we can rewrite our integration result as

\[\begin{align} \frac{a b}{4} \cdot 2 \sin\theta \cos\theta &+ \frac{a b}{2} \theta + c\\ = \frac{a b}{2} \sin\theta \cos\theta &+ \frac{a b}{2} \theta + c, \end{align}\]

which doesn’t use any multiples of \(\theta\) within sines or cosines. This not only looks nicer but also should be a bit easier to work with.

Inserting the integration limits from Equation (\(\ref{eq:integral_over_x}\)), we have:

\begin{equation} \left. \frac{a b}{2} \sin\theta \cos\theta \right|_0^w + \left. \frac{a b}{2} \theta \right|_0^w. \label{eq:definite_integral_over_theta} %__ \end{equation}

Hrm, we’ve got a problem. The variable \(w\) is in our original parameter space (i.e. in terms of \(x\)) and isn’t easy to express within the current parameter space (the one in terms of \(\theta\)). Thus, we have to map our variables back into the original parameter space to complete the integral.

We can map our integration result back into the original parameter space by recalling the equations relating \(x\) and \(\theta\) to one another:

\[\begin{align} \sin \theta &= \frac{x}{a}, \label{eq:sin_theta_x_relation}\\ \cos \theta &= \sqrt{1 - \frac{x^2}{a^2}}. \label{eq:cos_theta_x_relation} \end{align}\]

We can insert both of these relations into the first term in Equation (\(\ref{eq:definite_integral_over_theta}\)) directly. For the second term, we can solve for \(\theta\) in Equation (\(\ref{eq:sin_theta_x_relation}\)) by taking the inverse sine, like so:

\begin{equation} \theta = \sin^{-1} \left(\frac{x}{a}\right). \end{equation}

Thus, Equation (\(\ref{eq:definite_integral_over_theta}\)) becomes

\begin{equation} \left. \frac{a b}{2} \frac{x}{a} \sqrt{1 - \frac{x^2}{a^2}} \right|_0^w + \left. \frac{a b}{2} \sin^{-1} \left(\frac{x}{a}\right) \right|_0^w. \label{eq:definite_integral_over_x} %__ \end{equation}

Now we have the same parameter space for all variables and now we can evaluate the integral for the given integration limits, which is

\[\begin{align*} &\frac{a b}{2} \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}}\\ &- \Biggl[\frac{a b}{2} \frac{0}{a} \sqrt{1 - \frac{0^2}{a^2}} \Biggr]\\ &+ \frac{a b}{2} \sin^{-1} \biggl(\frac{w}{a}\biggr)\\ &- \Biggl[ \frac{a b}{2} \sin^{-1} \biggl(\frac{0}{a}\biggr) \Biggr]. \end{align*}\]

Since the second term in this expression contains a product with zero and because \(\sin^{-1}(0) = 0\) we can reduce this to:

\begin{equation} \frac{a b}{2} \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}} + \frac{a b}{2} \sin^{-1} \biggl(\frac{w}{a}\biggr). \label{eq:evaluated_limits_in_w} \end{equation}

This is our expression for the area in the shaded region in the diagram at the very beginning.

Since we want this area to be equal to 1/8th of the area of an ellipse, we have this relationship:

\begin{equation} \frac{\pi a b}{8} = \frac{a b}{2} \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}} + \frac{a b}{2} \sin^{-1} \biggl(\frac{w}{a}\biggr) \end{equation}

which (after some manipulations) gives us a function of \(w\):

\[\begin{align} \frac{\pi}{8} &= \frac{1}{2} \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}} + \frac{1}{2} \sin^{-1} \biggl(\frac{w}{a}\biggr)\\ \Rightarrow \frac{\pi}{4} &= \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}} + \sin^{-1} \biggl(\frac{w}{a}\biggr)\\ \Rightarrow f(w) = 0 &= \frac{w}{a} \sqrt{1 - \frac{w^2}{a^2}} + \sin^{-1} \biggl(\frac{w}{a}\biggr) - \frac{\pi}{4}. \label{eq:area_as_function_of_w} \end{align}\]

Because this function is equal to zero, finding its root (for \(w\) between 0 and \(a\)) will give us an analytical expression for \(w\) corresponding to one-eighth of the area of an ellipse.

Oh.

Oh dear.

This is the kind of “Oh” where you realise that you’re simply not bright enough to find an analytic result. That’s how it was for me, anyway. Bummer!

Let’s not let this stand in our way, though. Surely, we can find a value for \(w\) by some other means, right? Of course we can. But before we give that a go, let’s check our work so far.

Verifying the current path

Does the result make sense? Can we somehow verify that we’re on the right track? Definitely! If we integrate all the way from 0 to \(a\), we should arrive at an expression for a quarter of the area of an ellipse. Let’s see that now.

If, instead of using \(w\) as the upper integration limit in Equation (\(\ref{eq:definite_integral_over_x}\)), we use \(a\), we have this situation:

\begin{equation} \left. \frac{a b}{2} \frac{x}{a} \sqrt{1 - \frac{x^2}{a^2}} \right|_0^a + \left. \frac{a b}{2} \sin^{-1} \left(\frac{x}{a}\right) \right|_0^a. %__ \end{equation}

Evaluating the integration limits (and noting that the values at the lower limits are both zero as mentioned earlier when deriving Equation (\(\ref{eq:evaluated_limits_in_w}\))), we arrive at this result for the area, \(A\):

\[\begin{align} A &= \frac{a b}{2} \frac{a}{a} \sqrt{1 - \frac{a^2}{a^2}} + \frac{a b}{2} \sin^{-1} \left(\frac{a}{a}\right)\\ &= \frac{a b}{2} \sqrt{1 - 1} + \frac{a b}{2} \sin^{-1} (1)\\ &= \frac{a b}{2} \sin^{-1} (1). \end{align}\]

We know that

\begin{equation} \sin^{-1} (1) = \frac{\pi}{2}, \end{equation}

so the equation for \(A\) reduces further to

\[\begin{align} A &= \frac{a b}{2} \frac{\pi}{2}\\ &= \frac{\pi a b}{4} \end{align}\]

which, when we compare this result with Equation (\(\ref{eq:ellipse_area}\)), we see that this is one-quarter of the area of an ellipse. This is the result we expect when integrating only the top right-hand quadrant of the ellipse. We can now be more sure that we’ve not done anything really silly when calculating the integral for the smaller area up to the value of \(w\).

Symbolic maths to the rescue?

Now that we’re more sure we’re on the right path, is there some other way to find the value of \(w\)? What about if we use a symbolic maths system like SageMath? Maybe that can come with a closed form for \(w\). Let’s have a look.

Setting up the equation and telling SageMath to solve for \(w\) when \(f(w) = 0\):

a = var('a')
w = var('w')
f = (w/a)*sqrt(1 - w^2/a^2) + asin(w/a) - pi/4

(f == 0).solve(w)

gives this result:

[w == 1/4*(pi*a - 4*a*arcsin(w/a))/sqrt((a^2 - w^2)/a^2)]

This is a solution for \(w\) in terms of \(w\). Well, that’s not right… That’s not even wrong!

Strangely enough, Wolfram Alpha didn’t even want to attempt a solution at all. What to do?

Visual understanding

Ok, it seems that symbolic maths software isn’t getting us very far. What’s the next thing we can try? Well, we could always try plotting the function for \(w\) between \(0\) and \(a\) and seeing what it looks like.

Continuing with what we’d entered into SageMath before, we can plot the function like so:

plot(f(a=17), (w, 0, 17), axes_labels=['$x$', '$y$'])

where I’ve used the fact that the semi-major axis of my baking dish is equal to \(17 \text{cm}\).

The plot SageMath generates looks like this:

Function for area of 8th of an ellipse plotted from 0 to 17 for the case of a=17

and shows us that there is only one root of Equation (\(\ref{eq:area_as_function_of_w}\)) over the range \(w \in [0,a]\) and that it’s at approximately \(w = 7 \text{cm}\). That’s a usable value for \(w\)! Awesome!

What I find interesting about this graph is that the function is practically linear over most of the range from \(w=0\) up to \(a\). This suggests that we should be able to find a linear form for \(f(w)\) in Equation (\(\ref{eq:area_as_function_of_w}\)). Finding a linear form means we might be able find an analytical expression for \(w\) after all!

A Taylor-made solution

If the function is roughly linear around the root, that means we can find a Taylor series expansion of \(f(w)\) around the approximate value of our root. Then, if we only use linear terms from the Taylor series expansion, we can find something like an analytical closed form for the root \(w\).

To find a Taylor series for a function about a given point in SageMath, one calls the .taylor() method on the function. For the function being discussed here, the code looks like this:

f(a=17).taylor(w, 7)

where the arguments to the .taylor() method mean to find a Taylor series expansion in terms of \(w\) around the point \(w=7\). This gives the following expression:

-1/4*pi - 90887/891813888000000*sqrt(15)*(w - 7)^7 -
7441/4777574400000*sqrt(15)*(w - 7)^6 - 97/3317760000*sqrt(15)*(w - 7)^5 -
7/13824000*sqrt(15)*(w - 7)^4 - 1/43200*sqrt(15)*(w - 7)^3 -
7/17340*sqrt(15)*(w - 7)^2 + 8/289*sqrt(15)*(w - 7) + 28/289*sqrt(15) +
arctan(7/60*sqrt(15)).

This is way too much information and we know that we’re only interested in linear terms. Thus, we set the optional “degree” argument to 1 in the .taylor() method. This makes the method return a polynomial only up to degree 1, i.e. we keep only linear terms in \(w\).

Applying this change we get this code:

t = f(a=17).taylor(w, 7, 1)

which gives

-1/4*pi + 8/289*sqrt(15)*(w - 7) + 28/289*sqrt(15) + arctan(7/60*sqrt(15)).

We’ve set this expression equal to the (unimaginatively named) variable t so that we can more easily solve for \(w\) when this expression is equal to zero and thus find a value for the root. In other words, we enter the following into SageMath:

sol = (t == 0).solve(w)

which gives

[w == 1/480*sqrt(15)*(289*pi + 112*sqrt(15) - 1156*arctan(7/60*sqrt(15)))].

We can find a numerical value for this result like so:

w_num = sol[0].rhs().n()

which gives

6.86728285769022

Does this value make sense? Well, if we evaluate \(f(w)\) at this value then we should get a number close to zero. Doing this in our SageMath session

f(a=17,w=w_num).n()

gives

-0.0000273300559212597

That’s pretty good!

The result for \(w\) tells me that I should make the vertical cut in my macaroni cheese at 6.86728285769022 cm away from the minor axis to get each piece equal to 1/8th of the whole. Somehow I don’t think I need to be quite that precise.5 This result is a more accurate and precise value for where I should make the vertical cut than my initial guess of 7cm. The value for \(w\) also makes intuitive sense because, if we look carefully at the graph from the previous section, we observe that the curve cuts the \(x\)-axis just below 7.

Numerical baking

Taking the linear component of a Taylor series expansion about a rough value of the root is still only an approximation. Can we use another technique to get a better value? We sure can. We can find the root numerically. And, because the function is quite well-behaved around the root, we don’t need anything fancy; we can use a simple bisection method.

To find the root numerically, I adapted the algorithm described on pages 346-347 of Numerical Recipes in Fortran 77 (Second Edition).6 I chose to rewrite the rtbis function from page 347 in Python because numerical performance isn’t a priority here (we only need a few iterations to get a good value) and Python provides some more flexibility than the original Fortran 77 code.

Here’s the Python script:

# -*- coding: utf-8 -*-

import numpy as np


def func(*, w, a=34/2.):
    return (w/a)*np.sqrt(1 - w**2/a**2) + np.arcsin(w/a) - np.pi/4.


def main():
    x1 = 6  # lower bound of root
    x2 = 8  # upper bound of root
    x_accuracy = 1e-6  # accuracy in x-direction
    max_iterations = 40  # maximum number of iterations

    # ensure that we are stepping towards the root from a negative function
    # value
    f_lower = func(w=x1)
    if f_lower < 0:
        guess = x1
        dx = x2 - x1
    else:
        guess = x2
        dx = x1 - x2

    # iteratively search for root via bisection
    for iter_num in range(1, max_iterations):
        dx = dx/2.
        x_mid = guess + dx
        f_mid = func(w=x_mid)

        # if f(w) is negative, update our guess with current midpoint
        if f_mid < 0:
            guess = x_mid

        # accuracy is good enough, report our best guess
        if np.abs(dx) < x_accuracy or f_mid == 0.:
            msg = (
                f"After {iter_num} bisections, the best approximation\n"
                f"for the root of the function is: {guess}"
            )
            print(msg)
            break


if __name__ == "__main__":
    main()

# vim: expandtab shiftwidth=4 softtabstop=4

To run this code, you’ll need to install numpy.

Running this code gives the following output:

After 21 bisections, the best approximation
for the root of the function is: 6.867536544799805

Comparing the result from the linear Taylor series expansion with the numerical bisection method, we get:

6.86728285769022 - 6.867536544799805  = -0.000253687109585066

In other words, the results are within ~3/10000 ths of each other, the numerical result being slightly larger.

What does this tell us? Well, the results are consistent with one another, so we can trust them better. Also, this tells us that the linear approximation wasn’t too bad after all. Further, it tells us that we can make the vertical cut in the macaroni cheese at 6.87cm (rounded to 2dp for safety) which is better than the precision on my ruler at home. I think using a value of 6.8cm is probably going to be good enough for my purposes!

Brilliant! Now, when I make macaroni cheese next, I’ll know how to cut it into nice, equal portions.

Wrapping up

Why go to all this trouble? Well, I’m thorough and stubborn (in a good way!).7 But also, I’m someone who finds such things interesting. I mean, a problem has presented itself and–at first glance–it seemed to be easily solvable. The fact that, in the end, it wasn’t so easy to solve made it all the more interesting. There was also so much here to learn!

Note that I didn’t go through all this work before actually cutting the macaroni cheese into portions. I would have been very hungry had I done so! No, in the end I approximated (so that I could have breakfast) and ended up making the vertical cut \(7.5 \text{cm}\) from the minor axis. As we can see from the discussion above, this was a bad approximation. I’ll know better next time. :smile:

  1. Thanks to the Edmond’s cookbook and to Alexei and Nicole for giving it to me. Once a Kiwi, always a Kiwi. 

  2. Famous last words! 

  3. Don’t ask me why or exactly when; I’m a physicist, not a mathematician! Yet it seems to be possible often enough that it’s really handy. 

  4. Looking at the Wikipedia article for trigonometric identities gives a tiny inkling of the immense amount of hard work our forebears have done to work out things like this for us and thus make our lives easier. Consider also the work by Abramowitz and Stegun as well as Gradshteyn and Ryzhik (both of which were a big help during my PhD) to see just how much knowledge has been poured into tools such as Mathematica, SageMath and maths-related AI software. 

  5. Yes, I’m understating. 

  6. Why this particular version? Isn’t it outdated? Well yes, but (a) such algorithms don’t age, (b) I didn’t need anything special to do what I wanted to do, and (c) the book was sitting on my shelf. By the way, the introduction to Chapter 9, Root Finding and Nonlinear Sets of Equations is fun to read. The authors used a very relaxed and amusing writing style which made such a potentially dry subject enjoyable to read. Maybe I’ve just been numbed by years of physics? Dunno. Have a look anyway, you might like it :-) 

  7. If you need someone who is stubbornly thorough, give me a yell! I’m available for freelance Python/Perl backend development and maintenance work. Contact me at paul@peateasea.de and let’s discuss how I can help solve your business’ hairiest problems. 

Support

If you liked this post and want to see more like this, please buy me a coffee!

buy me a coffee logo