This is the integral we ultimately want to solve. Your first instinct might be to use substitution,
or integration by parts, or even change of variables as seen in the previous video on
the Jacobian. You can try any combination of these techniques, and you will be able
to do the innermost integral, and possibly even another one, but not really the whole
thing. So since all the standard techniques fail, does that mean this integral is impossible?
Not really, because there is a very clever trick. First, note that the integrand is the distance
between two points, and we integrate over the unit disc. If we add a factor of 1/pi^2 in front,
then this whole expression is the average distance in a unit disc.
If you want more details on how this corresponds to average distance,
check out the first video in this series. But how do we actually compute this average distance?
[TRANSFORMING THE PROBLEM]
The first key insight is to generalise this to a disc of radius R, not just the
unit disc. The answer to this depends on R, so let’s call it some function f of R. However,
this doesn’t actually generalise things TOO much, because if you double the radius, the distance
should also double on average. On the other hand, if you halve the radius, the average
distance will be halved. In fact, we have f(R) to be proportional to R. We ultimately want the
average distance in a unit disc, so we want f(1), which is just the proportionality constant k,
but here is the second key insight - k is also the derivative of f, which means that we want to find
this limit. Side note: if we insist on using the lingo in the previous video,
the numerator is the distance of nearby points after f, and the denominator is the original
distance between two nearby points, so this ratio really is the scaling factor of f near the point
R. But moving on to computation, we will consider this expression only. You might be wondering, why
not this much more common expression of derivative instead? Well, the reason will be clear later on.
Anyway, this suggests that we need to find the relationship between f(R) and f(R - delta R).
[THE CLEVER TRICK]
Let’s consider a disc of radius R, and another slightly smaller one of radius R - delta R,
then we write the average distance on the larger disc by breaking down into cases. Case 1:
the two random points lie in the inner disc. The average distance in this case is by definition
f(R - delta R). Case 2: 1 lies inside the inner disc, but the other is in the outer annulus.
Let’s call the average distance in this case as some function that depends on the two radii.
Finally, case 3: both points are in the outer annulus. Again, we don’t know what the average
distance this is, but let’s say this is some other function that also depends on the two radii.
Now, what we want is an overall average, covering all the possible cases of the two points.
This means that all these averages would still be useful,
but we need to weigh them according to how likely each case will appear.
Applying these weights and adding the products should give us f(R), the overall average distance
in the larger disc. By the way, this weighted average step is usually called the law of
total expectation. We now just need to figure out the probability of each case happening.
In the first case, 2 points are inside the inner disc. The probability of any point being inside is
the proportion of the area of this inner disc, which is the square of the ratio of the radii.
If we need both points to be inside, the probability will be this whole thing squared,
and we get the ratio of the radii to the power 4. We can expand this,
but for reasons that will become clear shortly, we will ignore terms of higher powers of delta R.
Next up, we have the case where 1 is inside the inner disc, and the other in the outer annulus.
The probability of any point being outside is simply 1 minus the probability inside,
and so the probability in this case is the product of these two, and also the factor of 2 here,
because this product simply calculates the probability of the first point inside, and the
second point outside, but we also have the second case! So we do need the factor of 2 here. Anyway,
we expand this a little bit, and it turns out that there is only 1 term that we need to keep track,
so we are left with 4 (delta R)/R plus some higher order terms, which we ignore as in the first case.
The final case is where we have both points outside the inner disc. The probability in
this case is the probability of 1 point outside squared, which we can again do some algebraic
manipulation to expand, but in this case, all the terms are of higher powers of delta R,
so we will ignore all the terms here and say that this probability is approximately 0. So
we can fill in the table now. The first case has probability approximately equal to 1 - 4(delta
R)/R, the second case having probability 4(delta R)/R, and the final case is so unlikely
that its probability is negligible. Finally, we apply the weights and add them up,
and we get that the overall average f(R) is this expression here at the top. But
we wanted something slightly different, which can be obtained in just a few steps from now.
[ARRIVING AT CROFTON’S DIFFERENTIAL EQUATION]
First off, we move f(R-delta R) to the left side of the equation, then divide both sides by delta
R to get this. Finally, we let delta R tend to 0. The left side, as we discussed in the beginning,
goes to f’(R), and for the right side, we pretty much just eliminate delta R from the terms
due to continuity. Note that this is now an equal sign, because if we really add all the terms back,
the terms that we ignored are all like these - some constant unrelated to delta R,
some positive power of delta R, which tends to 0 as delta R does, and a bounded function in delta
R, so in the limit, all these will disappear, and we are safe to ignore them. This is usually called
Crofton’s differential equation. Let’s take a bit of a break and appreciate how incredibly powerful
this is. First, we reduced the problem to finding g instead of f, which is usually much easier.
Secondly, this whole derivation only relies on the law of total expectation,
and some simple algebraic manipulations, which is quite elegant. Finally, this can be generalised to
way more general situations. In fact, this is the most general form of the differential equation.
The nu at the bottom denotes the measure of the region, generalising the notion of lengths,
areas, and volumes, which in this case, is simply the area of the region pi R^2.
mu refers to some sort of average quantity we are after. In this particular case,
we want the average distance f(R), but it can be an average of a lot of quantities you want,
distance is just one of them. It can be distance squared if you want, and in general, it can be a
quantity that depends on n different points, but this quantity is subject to some restrictions.
It needs to be symmetric, so if I swap any pair of points, the quantity is still unchanged. Distance,
for example, would be symmetric, because swapping two points doesn’t change the
distance between them. The second restriction is that the quantity is bounded. As long as the
quantity we take the average of fulfils these two criteria, this differential equation would hold.
n here denotes the number of points that the quantity depends on,
so n equals to 2 in our case. Finally, we have mu_1, which basically generalises the idea of g,
something that we will be tackling very shortly, but before that, I think it’s
important to note that this supposedly much more general differential equation can be derived
using pretty much the exact same argument, and I highly encourage you to flesh out the
details of the derivation, perhaps in the comments below. Anyway, let’s finish this up by finding g.
[CALCULATING g(R,R)]
Let’s recall how we defined g in the first place. It is the average distance when a
point is inside the inner disc, and the other is outside. When delta R becomes smaller and smaller,
the inner disc expands, so the point supposedly outside has to move towards the circumference to
stay outside. So in the limit, g(R,R) refers to the average distance where 1 point is inside the
disc, and the other lies on the circumference. One last thing before we do any computation:
by the rotational symmetry of the setup, we can always rotate so that the point on
the circumference is on the horizontal axis. So now, there is only 1 point free to move.
We then set up a new coordinate system with the leftmost point as the origin, and now we’re ready.
The average distance is by definition this integral. Again, this definition has been
established in the first video in the series. Anyway, U denotes the domain we want to take the
average over, and in this case, it is the unit disc, so the measure of this region is pi R^2,
but how do we tackle this integral over the unit disc? We specifically chose this coordinate system
because the distance is actually distance from the origin. Normally, I would denote this to be little
r, but there are enough r’s in this video already, so let’s call it rho instead to avoid confusion,
and yes, we will be using polar coordinates to perform the integral, so that now the distance
is simply rho. However, because we will be using polar coordinates, we will need to add the
Jacobian determinant, so this is what we are going to integrate, but we don’t know the limits yet.
Recall that in the previous video, to evaluate a double integral, we can either integrate with
respect to y first, then to x, in which case, the inner upper and lower limits would depend on x,
because for each strip, the upper and lower limits are different. However, the outer limits
are constants, referring to limits of what values x can take. And of course, we can also integrate
with respect to x first, then y, and the limits are analogous to the previous case. It turns out
that in this case, it is easier to integrate with respect to rho, then theta. The upper and lower
limits of theta is the easier part, because the points in the disc take angles that run from -pi/2
to +pi/2. The slightly more difficult part is determining the limits of rho given theta.
Given an angle theta, the point has to lie on this line. It is easy to see that the lower
limit is just 0, but the upper limit requires a bit of work. We simply use this triangle,
and note that these lengths are R, and then by slicing this isosceles triangle in half and a
bit of trigonometry, we have 2 copies of R cos theta, and so this is our upper limit of rho
given theta. Going back to our integral, we substitute our limits, and we can now proceed.
However, what we just calculated is still just g(R,R), not the original f(R) that we want.
We would need to solve this differential equation, and you could do that using
some standard techniques, but we have f(R) = kR, where k is the ultimate answer we want.
Now substitute these into the differential equation.
So here we have it, the average distance in a unit disc is 128/45pi. So the quadruple integral
is 128/45 pi, but this is the version with the 1/pi^2 factor in front, so if we want the
quadruple integral in the thumbnail, it would be 128 pi /45. But wait, it doesn’t end here!
[GENERALISING TO HIGHER DIMENSIONS] What we have just done is the average
distance in the unit disc, but what about in a unit ball? If you know spherical polars,
I highly encourage you to repeat the exact same argument in this video as an exercise,
and leave the details in the comments. The answer you should get is 36/35. What about
the average distance in an n-dimensional ball? The general formula is quite complicated, depending
on whether n is odd or even, but all these can be computed using the same argument as we have seen,
and if we plot these average distances, we can see that when n increases, the average
distance increases, but in the limit, it goes to sqrt(2). If you want more details,
there is a link in the description which is the paper that I based this video series on.
Thank you to these patrons, and as always, like,
share, subscribe with notifications on, and leave a comment. Bye-bye!