Let’s suppose, for the moment, you’re interested in the function f(x)=πsin(x)x. It’s a perfectly respectable function, defined everywhere except for x=0, where the bottom is 0. The top is also zero there (because sin(0)=0), so its value is, strictly speaking, indeterminate - 00 could, in reality, be anything.

However, if you draw the graph of y=πsin(x)x, you’ll see that near x=0, the value gets closer and closer to π, and it’s the same on either side, so saying πsin(0)0=π seems legit. Unfortunately, we can’t write that, because of the whole dividing by 0 problem, but we can say that as x0 (“x approaches zero”), πsin(0)0π. Our answer gets as close to π as we could possibly want.

One way to show this is to use something called L’Hôpital’s rule, which I’ve always liked because it has two apostrophes and a circumflex. I’ve recently come to appreciate it more, on the ground that L’Hôpital didn’t discover it, Bernoulli did - and L’Hôpital bought the rights.

Here’s what it says:

If u(x0)=0 and v(x0)=0 for some value of x0, and if you can differentiate u(x) and v(x) at x0, then the limit of u(x)v(x) as xx0 is u(x0)v(x0).

I’m not going to go into many of the subtleties of that here, but focus on the main result: if you’ve got a function that gives an indeterminate fraction somewhere, you can find the value that makes sense by dividing the derivatives.

Danger! Danger!

Under no circumstances should you confuse L’Hôpital’s rule with the quotient rule. Different things with different uses. Be careful.

In this case…

So, in this case, we’ve got u(x)=πsin(x), which gives u(x)=πcos(x). Meanwhile, v(x)=x, so v(x)=1.

Divide them to get u(0)v(0)=π×11=π, which is what we wanted. Hooray.

But why?

The pirate proof is very simple, if you know your Taylor series. You know that u(x0+ϵ)u(x0)+ϵu(x0)+, where ϵ is small and everything after that is really small - so small we can ignore it.

Similarly, v(x0+ϵ)v(x0)+ϵv(x0)+, where again ϵ is small and everything else is too small to worry about.

So that means f(x0+ϵ)u(x0)+ϵu(x0)v(x0)+ϵv(x0). However, we also know that u(x0)=v(x0)=0, because f(x) is indeterminate. So, that’s all the same as f(x0+ϵ)=ϵu(x0)+ϵ2(stuff)ϵv(x0)+ϵ2(stuff).

We can divide the top and bottom by ϵ (which, remember, is small):

f(x0+ϵ)u(x0)+ϵ(stuff)v(x0)+ϵ(stuff).

Lastly, we see what happens when we let ϵ approach zero: the “stuff” all becomes zero, so f(x0+ϵ)u(x0)v(x0) as ϵ0 - or, better still:

f(x)u(x0)v(x0) as xx0