Mathematical disagreement with inverse square law?

  • #1
enslay
8
0
TL;DR Summary
Inverse cube "law" appears in my probability density functions. I either did something wrong or somehow something "cancels" to make it squared.
Hello,
This is my first post. For background, I have asked Ask The Physicist who has posted our correspondences and answers here:
https://www.askthephysicist.com/ask_phys_q&a.html

Search "My question is with regard to an apparent mathematical disagreement" or something like that to find the correspondence. Which reminds me, I ought to donate to that guy for spending his time answering my dumb question.

So, imagine you have a point-source positioned at (x_0,y_0,z_0) emitting photons in uniform random 3D directions and imagine you have a detector surface. It could be something like a plane, a cylinder, heck I've even derived it for a sphere. The probability density functions characterizing where photons strike the detector surface always seems to have a 1/r^3 in it. And this has been a great source of controversy with some physicists I work with!

So for a vertical plane positioned at x=R, you derive something like Bivariate Cauchy (Lorentz) distribution which takes this form:
$$\rho(y,z) = \frac{1}{4\pi} \frac{|R - x_0|}{r^3}$$
Where $$r= \sqrt{(R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}$$
NOTE: This "density" function integrates to 1/2 which reflects the fact that only half 1/2 the photons will hit the plane (the other 1/2 are going away from the plane). On paper, I end up with ##\frac{1}{2\pi}## but this isn't right in reality.

And for a cylinder of radius R and infinite length centered at (0,0,0) where circle cross sections are on the x-y plane... you get this:
$$\rho(z,\phi) = \frac{R}{4\pi} \frac{|R - x_0 \cos \phi - y_0 \sin\phi|}{r^3}$$
Where $$r = \sqrt{(R\cos\phi - x_0)^2 + (R\sin\phi - y_0)^2 + (z-z_0)^2}$$

Whenever I see inverse square law visually depicted, I always see this expanding surface of a sphere with points in some partition of the sphere, so I thought maybe the plane or cylinder geometry caused the 1/r^3 to appear. So it should be 1/r^2 in the spherical density function, right?

Unfortunately not. Here's what I get for the probability density function in a sphere of radius R centered at (0,0,0):
$$\rho(\theta,\phi) = \frac{R^2}{4\pi} \frac{|R - x_0 \sin\theta\cos\phi - y_0 \sin\theta\sin\phi - z_0\cos\theta| \sin\theta}{r^3}$$
Where $$r = \sqrt{(R\sin\theta\cos\phi - x_0)^2 + (R\sin\theta\sin\phi - y_0)^2 + (R\cos\theta - z_0)^2}$$
Here $$0 \leq \theta \leq \pi,\ -\pi \leq \phi < \pi$$

OK, well, I thought maybe probability density functions don't actually reflect the behavior of binning the photons like in those visual depictions you see of inverse square law... until I figured out a trick to accurately simulate what a detector histogram would look like directly from the density function. And it matches some simple Monte Carlo simulations!
If you have your histogram bin centered at ##\theta,\ \phi## and the histogram bin dimensions are ##\Delta \theta## and ##\Delta \phi##... then simply scaling the density function by ##N \Delta \theta \Delta \phi \rho(\theta,\phi)##, where ##N## is the total number of photons emitted, gives you something that looks a lot like a Monte Carlo simulation's histogram.

So what the heck? Why is there is a 1/r^3 in all of these density functions? What am I missing? Ask The Physicist suggests something cancels to give 1/r^2... what cancels? How? What am I missing? I'm doing something wrong or misinterpreting something.

There may be errors. Sorry. Hopefully I can edit mistakes later.

EDIT: Editing for LaTeX.
 
Last edited:
Physics news on Phys.org
  • #2
Your post is largely unreadable to me. You'll need to learn Latex to post your equations:

https://www.physicsforums.com/help/latexhelp/

You have to be careful with probability density in polar coordinates. For example, pick a point in the unit circle at random by choosing an angle uniformly on ##[0, 2\pi)## and a radius uniformly on ##[0, 1]##. The probability that the point lies in the circle with radius ##\frac 1 2## is ##0.5##. This is, therefore, a different distribution from the distribution obtained by choosing uniformly based on area.

I don't know if that helps.

My other observation (although I wasn't sure how to interpret that link - were all those your questions?) is that you would be better served learning some actual physics. The responses from Ask The Physicist are watered down for the layperson and contain serious inaccuracies in terms of the actual phyisics. The first answer, using the HUP to explain Hawking radiation, is really just a fairy story!
 
  • #3
PeroK said:
Your post is largely unreadable to me. You'll need to learn Latex to post your equations:
Done. This is the first forum I have ever seen that supports LaTeX. I didn't even know it was an option.

PeroK said:
You have to be careful with probability density in polar coordinates. For example, pick a point in the unit circle at random by choosing an angle uniformly on [0,2π) and a radius uniformly on [0,1]. The probability that the point lies in the circle with radius 12 is 0.5. This is, therefore, a different distribution from the distribution obtained by choosing uniformly based on area.
Yep, it's definitely a gotcha! And I did make that mistake in the past. I do properly account for this. I love the below site and it even visually shows you the difference between the correct and incorrect sampling.
https://mathworld.wolfram.com/SpherePointPicking.html

PeroK said:
My other observation (although I wasn't sure how to interpret that link - were all those your questions?) is that you would be better served learning some actual physics. The responses from Ask The Physicist are watered down for the layperson and contain serious inaccuracies in terms of the actual phyisics. The first answer, using the HUP to explain Hawking radiation, is really just a fairy story!
No, only that one thread of discussion. I guess he just anonymizes the questions. And I'm definitely a layperson w.r.t. to Physics.
 
  • #4
enslay said:
Yep, it's definitely a gotcha! And I did make that mistake in the past. I do properly account for this. I love the below site and it even visually shows you the difference between the correct and incorrect sampling.
https://mathworld.wolfram.com/SpherePointPicking.html


No, only that one thread of discussion. I guess he just anonymizes the questions. And I'm definitely a layperson w.r.t. to Physics.
What physical model are you using for light? Photons are the quanta of the quantized EM field. They don't have classical trajectories in the first place. A better model for light impacting a screen at some distance from the source is classical electromagnetism.

In any case, what physical assumptions do you make to derive something like this?

enslay said:
So for a vertical plane positioned at x=R, you derive something like Bivariate Cauchy (Lorentz) distribution which takes this form:
$$\rho(y,z) = \frac{1}{4\pi} \frac{|R - x_0|}{r^3}$$
Where $$r= \sqrt{(R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}$$
NOTE: This "density" function integrates to 1/2 which reflects the fact that only half 1/2 the photons will hit the plane (the other 1/2 are going away from the plane). On paper, I end up with ##\frac{1}{2\pi}## but this isn't right in reality.
 
  • #5
PeroK said:
What physical model are you using for light? Photons are the quanta of the quantized EM field. They don't have classical trajectories in the first place. A better model for light impacting a screen at some distance from the source is classical electromagnetism.

In any case, what physical assumptions do you make to derive something like this?
Perhaps I misspoke. I only call the purely mathematical objects "photons". There is no explicit physics in the derivation. I guess you could say I'm assuming discrete objects traveling in a uniform random 3D direction from ##(x_0,y_0,z_0)## which I guess I erroneously call "photons". Sorry.

Here's a hand-written derivation for the planar detector. It has the incorrect normalizing constant which should be ##\frac{1}{4 \pi}##. And I have a tidbit at the end with normalizing over a finite length which is also wrong since many such discrete mathematical objects wouldn't hit a finite sized plane (and only half would hit an infinite sized plane).

I guess the derivation exploits conditional probabilities. First I derive the 2D line detector and then expand this to the plane detector. Everything starts with discrete mathematical objects going in uniform random 3D directions from ##(x_0,y_0,z_0)##. I embarrassingly call conditional probabilities "Bayes' theorem". Anyway, there's my derivation with all its flaws. You can see the written (and unwritten) assumptions. If you see anything blatantly wrong... also, poke fun of it :)
 

Attachments

  • LineDetector.pdf
    285.1 KB · Views: 2
  • PlanarDetector.pdf
    384 KB · Views: 1
  • #6
Should you not expect a 1/R^2 dependency, instead of a 1/r^2 dependency?

Moving the plane away from the origin (changing R), is different from changing r by moving along a plane which is at a fixed distance R to the origin. The angle at which the photons strike the surface changes differently in those two cases.

What is the dependency on R at points where the photons strike the surfaces perpendicularly? Note that at those points you have r=R so your expressions should simplify.
 
  • Like
Likes SammyS
  • #7
Let's do this properly for the line detector at a distance ##R## from the source:
$$y = R\tan \theta$$$$\Delta y = R(\tan(\theta + \Delta \theta) - \tan \theta) \approx R (1 + \tan^2 \theta)\Delta \theta$$If we take a constant density per unit angle of ##\rho##, then:
$$\rho(y) = \frac{\rho \Delta \theta}{\Delta y} = \frac{\rho}{R(1 + \tan^2 \theta)} = \frac{\rho}{R(1 + y^2/R^2)} = \frac{\rho R}{y^2 + R^2}$$That gives us the correct linear density as a function of ##y##:
$$\rho(y) = \frac{\rho R}{y^2 + R^2}$$Finally:
$$\int_{-\infty}^{+\infty}\frac{\rho R}{y^2 + R^2}dy = \rho R\bigg [\frac 1 R \tan^{-1}\frac y R \bigg]_{-\infty}^{+\infty} = \rho \pi$$As expected! Since:
$$\int_{-\frac \pi 2}^{+\frac \pi 2}\rho d\theta = \rho \pi$$
 
  • Like
Likes Dale
  • #8
enslay said:
Here's a hand-written derivation for the planar detector. It has the incorrect normalizing constant which should be ##\frac{1}{4 \pi}##. And I have a tidbit at the end with normalizing over a finite length which is also wrong since many such discrete mathematical objects wouldn't hit a finite sized plane (and only half would hit an infinite sized plane).
What you are really trying to do is to calculate the solid angle at any point on the y-z plane at some coordinate x. That would give you the density of detections on any small rectangular detector so aligned, where the emission from the origin has a constant density per unit solid angle. Integrating this over the plane should then give you half the total number of emissions.

This was easy to do for a linear detector, as above, but is probably quite tricky for the rectangular case.

If you look online, you'll find some resources for finding solid angles. The ones I found for rectangles simply have the rectangle centred on the x-axis (which is the simplest case).

https://math.stackexchange.com/ques...ngle-of-a-rectangular-detector-of-20cm-x-10cm

And here's a derivation using the z-axis (may or may not be correct!):

https://wiki.kern.phys.au.dk/mathar20051002.pdf

You might find something for the general differential case.

There were also resources for finding the solid angle for a cylinder etc.
 
  • #9
Oh my, I didn't get any e-mail notifications about these responses. Apologies for the delayed response.

PeroK said:
Let's do this properly for the line detector at a distance ##R## from the source:
$$y = R\tan \theta$$$$\Delta y = R(\tan(\theta + \Delta \theta) - \tan \theta) \approx R (1 + \tan^2 \theta)\Delta \theta$$If we take a constant density per unit angle of ##\rho##, then:
$$\rho(y) = \frac{\rho \Delta \theta}{\Delta y} = \frac{\rho}{R(1 + \tan^2 \theta)} = \frac{\rho}{R(1 + y^2/R^2)} = \frac{\rho R}{y^2 + R^2}$$That gives us the correct linear density as a function of ##y##:
$$\rho(y) = \frac{\rho R}{y^2 + R^2}$$Finally:
$$\int_{-\infty}^{+\infty}\frac{\rho R}{y^2 + R^2}dy = \rho R\bigg [\frac 1 R \tan^{-1}\frac y R \bigg]_{-\infty}^{+\infty} = \rho \pi$$As expected! Since:
$$\int_{-\frac \pi 2}^{+\frac \pi 2}\rho d\theta = \rho \pi$$
OK, but we're not in a 2D world. The 2D detector densities always seem to have the expected 1/r^2. It's only when you go into 3D detector densities that you get these odd 1/r^3. Worse yet, it matches Monte Carlo simulations more accurately than 1/r^2.

This is my conundrum: The physicists I work with try to derive the detector densities as a function of 1/r^2 and insist that's the way. But the math and simulation do not match that as well in 3D. But inverse square law is true. I know that for sure! So how do I reconcile the 1/r^3 in the math to the inverse square law in the physics?

PeroK said:
What you are really trying to do is to calculate the solid angle at any point on the y-z plane at some coordinate x. That would give you the density of detections on any small rectangular detector so aligned, where the emission from the origin has a constant density per unit solid angle. Integrating this over the plane should then give you half the total number of emissions.

This was easy to do for a linear detector, as above, but is probably quite tricky for the rectangular case.

If you look online, you'll find some resources for finding solid angles. The ones I found for rectangles simply have the rectangle centred on the x-axis (which is the simplest case).

https://math.stackexchange.com/ques...ngle-of-a-rectangular-detector-of-20cm-x-10cm

And here's a derivation using the z-axis (may or may not be correct!):

https://wiki.kern.phys.au.dk/mathar20051002.pdf

You might find something for the general differential case.

There were also resources for finding the solid angle for a cylinder etc.
Thanks, I'll have a look. Conditional probability trick works for cylinder and planar detectors. This trick does not work for sphere detector since you cannot decouple the surface parameterization (or at least I couldn't find a way). So, another approach is definitely interesting to me... especially if it's easier! Because the sphere density was tedious for me to derive. I'm sure there has to be an easier way. Maybe this solid angle approach.

A.T. said:
Should you not expect a 1/R^2 dependency, instead of a 1/r^2 dependency?

Moving the plane away from the origin (changing R), is different from changing r by moving along a plane which is at a fixed distance R to the origin. The angle at which the photons strike the surface changes differently in those two cases.

What is the dependency on R at points where the photons strike the surfaces perpendicularly? Note that at those points you have r=R so your expressions should simplify.
Thanks for the reply! I did see this on Friday but needed to think about it more. I did try a ratio of say of densities in the sphere case of 2R to R for off-center point sources. I still don't get the expected 1/4. I think I got 1/2 as the limiting case. More perplexing is what happens when the point source is centered at the origin ##(0,0,0)## of the sphere detector where the density reduces to ##\rho(\theta,\phi) = \frac{1}{4 \pi} \sin \theta## which is independent of R. And that is correct. You should have the uniform random 3D directions as the density if you're centered in the sphere.

One thing I was thinking was the trick I mentioned in OP. If you have N photons (discrete mathematical objects) and you have a histogram bin with dimensions ##\Delta \phi,\ \Delta \theta## centered at ##\theta,\ \phi##, then that histogram bin would have a count of ##\approx N \Delta \phi \Delta \theta \rho(\theta,\phi)##. I was thinking maybe expanding ##\Delta \phi,\ \Delta \theta## in terms of the area they span (which is dependent on R) might give the expected 1/r^2 in the math, but that doesn't seem to work either. I'll have to try again.

But your post was about the planar detector. I didn't try it yet! I will try this with the planar detector as well.
 
  • #10
A.T. said:
Should you not expect a 1/R^2 dependency, instead of a 1/r^2 dependency?

Moving the plane away from the origin (changing R), is different from changing r by moving along a plane which is at a fixed distance R to the origin. The angle at which the photons strike the surface changes differently in those two cases.

What is the dependency on R at points where the photons strike the surfaces perpendicularly? Note that at those points you have r=R so your expressions should simplify.
OK, I think it works out! I just tried the planar detector which is nice and easy. And I think I messed up with the sphere detector over the weekend. I will do it again...

So let's fix the histogram bin size to ##\Delta y,\ \Delta z##. Then for N photons (italics because they are purely mathematical concepts here) emitted, the histogram bin count for a bin centered at ##(y,z)## should be ##\approx N \Delta y \Delta z \rho(y,z)##.

Let ##\rho(y,z;R)## be the density for the vertical planar detector positioned at ##x=R## for a point source emitting photons about ##(x_0, y_0, z_0)##. Then by the inverse square, I would expect the following
$$\begin{align*}
\frac{1}{4} &\approx \frac{N \Delta y \Delta z \rho(y,z;2R)}{N \Delta y \Delta z \rho(y,z;R)} \\
&= \frac{\rho(y,z;2R)}{\rho(y,z;R)}
\end{align*}$$

So that gives
$$\begin{align*}
\frac{\rho(y,z;2R)}{\rho(y,z;R)} &= \frac{|2R - x_0|}{|R - x_0|} \left ( \frac{(R - x_0)^2 + (y - y_0)^2 + (z - z_0)^2}{(2R - x_0)^2 + (y-y_0)^2 + (z-z_0)^2} \right )^{\frac{3}{2}} \\
&= \frac{|2 - \frac{x_0}{R}|}{|1 - \frac{x_0}{R}|} \left ( \frac{(1 - \frac{x_0}{R})^2 + \frac{(y-y_0)^2+(z-z_0)^2}{R^2}}{(2 - \frac{x_0}{R})^2 + \frac{(y-y_0)^2+(z-z_0)^2}{R^2} } \right )^{\frac{3}{2}}
\end{align*}$$
Now let ##R \to \infty## and you get
$$2 \left ( \frac{1}{4} \right )^{\frac{3}{2}} = \frac{1}{4}$$

I'm sure it will be the same for the sphere detector. I guess I goofed. Hopefully this will help reconcile the 1/r^3 in the density with the inverse square law for these physicists.
 
  • #11
TL;DR Is it correct to say that inverse square law is only exactly true for sphere surfaces whenever the point source is centered in the sphere? For other cases, it seems to be only approximate (could be a bad approximation for "small" R) and only asymptotically true. Is this all a correct conclusion?

OK, here's cylinder and sphere detectors.

Cylinder:
I got lucky with planar detector because the histogram bin size already corresponds with the bin's actual lengths. The cylinder detector density is a function of an angle ##\rho(z,\phi;R)## where R is the radius. We're interested in the number of "photons" (purely mathematical concepts) passing through a fixed area. So for the radius R and radius 2*R case I would get the below histogram lengths.

Case: radius = R
Length z = ##\Delta z##
Length ##\phi = \Delta \phi R##
Area = ##R \Delta z \Delta \phi##

Case: radius = 2*R
Length z = ##\Delta z##
Length ##\phi = 2 \Delta \phi R##
Area = ##2 R \Delta z \Delta \phi##

So when doubling the radius, I need to half the ##\Delta \phi## to keep the areas the same. So suppose the histogram bin is centered at ##(z,\phi)## and suppose I emit N "photons" from point source position ##(x_0,y_0,z_0)##. I would expect
$$\begin{align*}
\frac{1}{4} &\approx \frac{N \Delta z \frac{\Delta \phi}{2} \rho(z,\phi;2R)}{N \Delta z \Delta \phi \rho(z,\phi;R)} \\
&= \frac{1}{2} \frac{\rho(z,\phi;2R)}{\rho(z,\phi;R)}
\end{align*}$$

So expanding this:
$$
\begin{align*}
\frac{1}{2} \frac{\rho(z,\phi;2R)}{\rho(z,\phi;R)} &= \frac{1}{2} \frac{2R}{R} \frac{|2R - x_0 \cos \phi - y_0 \sin \phi|}{|R - x_0 \cos \phi - y_0 \sin \phi|} \left ( \frac{(R\cos \phi - x_0)^2 + (R \sin \phi - y_0)^2 + (z-z_0)^2}{(2R\cos \phi - x_0)^2 + (2R \sin \phi - y_0)^2 + (z-z_0)^2} \right )^{\frac{3}{2}} \\
&= \frac{\left | 2 - \frac{x_0 \cos \phi + y_0 \sin \phi}{R} \right |}{ \left | 1 - \frac{x_0 \cos \phi + y_0 \sin \phi}{R} \right | } \left ( \frac{\left (\cos \phi - \frac{x_0}{R} \right )^2 + \left (\sin \phi - \frac{y_0}{R} \right )^2 + \frac{(z-z_0)^2}{R^2}}{\left (2 \cos \phi - \frac{x_0}{R} \right )^2 + \left (2 \sin \phi - \frac{y_0}{R} \right )^2 + \frac{(z-z_0)^2}{R^2}} \right )^{\frac{3}{2}}
\end{align*}
$$

And letting ##R \to \infty## gives
$$
2 \left ( \frac{1}{4} \right )^{\frac{3}{2}} = \frac{1}{4}
$$
And if you did similar for 3R, you should get 1/9 and so forth.

Sphere:
For a histogram bin centered at ##(\theta,\phi)##, here are the following cases

Case: radius = R
Length ##\theta = \Delta \theta R##
Length ##\phi \approx \Delta \phi R \sin \theta##
Area ##\approx R^2 \Delta \theta \Delta \phi \sin \theta##

Case: radius = 2*R
Length ##\theta = 2 \Delta \theta R##
Length ##\phi \approx 2 \Delta \phi R \sin \theta##
Area ##\approx 4 R^2 \Delta \theta \Delta \phi \sin \theta##

So when doubling the radius, I need to half both ##\Delta \phi,\ \Delta \theta## to keep the areas the same.

Again, I expect this inverse square law to give this
$$\begin{align*}
\frac{1}{4} &\approx \frac{N \frac{\Delta \phi}{2} \frac{\Delta \theta}{2} \rho(\theta,\phi;2R)}{N \Delta \phi \Delta \theta \rho(\theta,\phi;R)} \\
&= \frac{1}{4} \frac{\rho(\theta,\phi;2R)}{\rho(\theta,\phi;R)}
\end{align*}$$

Expanding this:
$$
{\scriptsize
\begin{align*}
&\frac{1}{4} \frac{\rho(\theta,\phi;2R)}{\rho(\theta,\phi;R)} \\
&= \frac{1}{4} \frac{4 R^2}{R^2} \frac{|2R - x_0 \sin\theta \cos\phi - y_0 \sin\theta \sin\phi - z_0 \cos \theta|}{|R - x_0 \sin\theta \cos\phi - y_0 \sin\theta \sin\phi - z_0 \cos \theta|}
\left ( \frac{(R \sin \theta \cos \phi - x_0)^2 + (R \sin \theta \sin \phi - y_0)^2 + (R \cos \theta - z_0)^2}{(2R \sin \theta \cos \phi - x_0)^2 + (2R \sin \theta \sin \phi - y_0)^2 + (2R \cos \theta - z_0)^2} \right )^{\frac{3}{2}} \\
&= \frac{\left |2 - \frac{x_0 \sin \theta \cos \phi + y_0 \sin \theta \sin \phi + z_0 \cos \theta}{R} \right |}{\left |1 - \frac{x_0 \sin \theta \cos \phi + y_0 \sin \theta \sin \phi + z_0 \cos \theta}{R} \right |}
\left ( \frac{\left (\sin \theta \cos \phi - \frac{x_0}{R} \right )^2 + \left (\sin \theta \sin \phi - \frac{y_0}{R} \right )^2 + \left (\cos \theta - \frac{z_0}{R} \right)^2}{\left (2 \sin \theta \cos \phi - \frac{x_0}{R} \right )^2 + \left (2 \sin \theta \sin \phi - \frac{y_0}{R} \right )^2 + \left (2\cos \theta - \frac{z_0}{R} \right)^2} \right )^{\frac{3}{2}}
\end{align*}
}
$$

Letting ##R \to \infty## gives
$$
2 \left ( \frac{1}{4} \right )^{\frac{3}{2}} = \frac{1}{4}
$$

Notably, when ##(x_0,y_0,z_0) = (0,0,0)##, the inverse square law is exact for any R.

Is it correct to say that inverse square law is only exactly true for sphere surfaces whenever the point source is centered in the sphere? For other cases, it seems to be only approximate (could be a bad approximation for "small" R) and only asymptotically true. Is this all a correction conclusion?

Thanks for all your comments and ideas. It seems like this thread has completed (unless I've made mistakes of course!). I posted all of this in case some other clueless Physics newbie like me gets stuck on this.
 
  • #12
enslay said:
TL;DR Is it correct to say that inverse square law is only exactly true for sphere surfaces whenever the point source is centered in the sphere? For other cases, it seems to be only approximate (could be a bad approximation for "small" R) and only asymptotically true. Is this all a correct conclusion?
It's a completely false conclusion. First, the mathematics is clear and simple. Second, the inverse square law has been experimentally verified.

That you can make mathematical errors by over-elaboration is not going to change the physics of our universe.

You have things completely the wrong way round. If your mathematics leads you to a conclusion that does not agree with experiment, then your mathematics is wrong.
 
  • #13
PeroK said:
It's a completely false conclusion. First, the mathematics is clear and simple. Second, the inverse square law has been experimentally verified.

That you can make mathematical errors by over-elaboration is not going to change the physics of our universe.

You have things completely the wrong way round. If your mathematics leads you to a conclusion that does not agree with experiment, then your mathematics is wrong.
I don't think I contradicted the inverse square law, did I? I know it's been experimentally verified, but it's also (usually) trivial to transform a uniform random direction density into a density describing how "photons" hit a surface. So the math is straightforward for that too. That's the conundrum. Unbeknownst to me at the time, the planar density is known by a name: Cauchy distribution and describes the same phenomenon. The 3D plane version just has that weird 1/r^3 term in it. Why is that?

Alright, which one is more accurate in this simple Monte Carlo experiment (code attached)? The theoretical density or 1/r^2? The experiment has a point source at ##(x_0,y_0,z_0) = (-1,-2,-3)## emitting "photons" at a vertical plane positioned at ##x = R = 1##. I construct a 100x100 histogram and the histogram describes a 3D y-z plane ranging from ##-5 \leq y \leq 5## and ##-5 \leq z \leq 5##.

Theoretical density would be:
$$\rho(y,z) = \frac{1}{4 \pi} \frac{|R - x_0|}{\left ( (R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2 \right )^{\frac{3}{2}}}$$

I don't know what the 1/r^2 density would be. I just use 1/r^2.
$$
\rho_{\text{sq}}(y,z) = \frac{1}{(R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}
$$

To do these comparisons (and deal potentially with missing terms in 1/r^2 density), I normalize all of them to sum to 1. I compute MSE and I compute Kullback-Leibler (KL) divergence which measures the difference between two distributions.

$$\begin{array}{|c|c|c|c|c|}
\hline
N & \text{MSE } \frac{1}{r^3} & \text{MSE } \frac{1}{r^2} & \text{KL } \frac{1}{r^3} & \text{KL } \frac{1}{r^2} \\
\hline
1000 & 3.58 \times 10^{-7} & 3.61 \times 10^{-7} & 2.94 & 3.01 \\
10000 & 3.43 \times 10^{-8} & 3.64 \times 10^{-8} & 1.02 & 1.08 \\
100000 & 3.46 \times 10^{-9} & 6.04 \times 10^{-9} & 0.18 & 0.25 \\
1000000 & 3.54 \times 10 ^{-10} & 2.81 \times 10^{-9} & 0.02 & 0.08 \\
10000000 & 3.60 \times 10^{-11} & 2.53 \times 10^{-9} & 0.002 & 0.068 \\
100000000 & 3.49 \times 10^{-12} & 2.49 \times 10^{-9} & 0.0002 & 0.066 \\
\hline
\end{array}$$

If you see anything wrong, let me know!
 

Attachments

  • run_planar.txt
    3.1 KB · Views: 1
  • #14
PeroK said:
What you are really trying to do is to calculate the solid angle at any point on the y-z plane at some coordinate x. That would give you the density of detections on any small rectangular detector so aligned, where the emission from the origin has a constant density per unit solid angle. Integrating this over the plane should then give you half the total number of emissions.

This was easy to do for a linear detector, as above, but is probably quite tricky for the rectangular case.

If you look online, you'll find some resources for finding solid angles. The ones I found for rectangles simply have the rectangle centred on the x-axis (which is the simplest case).

https://math.stackexchange.com/ques...ngle-of-a-rectangular-detector-of-20cm-x-10cm

And here's a derivation using the z-axis (may or may not be correct!):

https://wiki.kern.phys.au.dk/mathar20051002.pdf

You might find something for the general differential case.

There were also resources for finding the solid angle for a cylinder etc.
I was thinking of deriving everything with solid angles for you to make you happy. It should give the same exact result. And wow, that article is not very nice to read. It's even more complicated than deriving the sphere density. I think I'll stick with using conditional probabilities (where I can) as there is nothing wrong with this approach! Unless you can point out an error somewhere?

Luckily, Wolfram already derives the solid angle of one of the faces of a cube here:
https://mathworld.wolfram.com/SolidAngle.html

And in equation (7), I see that weird 1/r^3 again. But, again, I don't think this contradicts the inverse-square law. The inverse square law seems to be only approximate for a plane. And it's pretty good as you can see in my table above! But it's just not as accurate as the Cauchy distribution at describing the distribution of "photons" hitting a plane.
 
  • #15
enslay said:
Luckily, Wolfram already derives the solid angle of one of the faces of a cube here:
https://mathworld.wolfram.com/SolidAngle.html

And in equation (7), I see that weird 1/r^3 again. But, again, I don't think this contradicts the inverse-square law. The inverse square law seems to be only approximate for a plane. And it's pretty good as you can see in my table above! But it's just not as accurate as the Cauchy distribution at describing the distribution of "photons" hitting a plane.
In the inverse square law, ##r## represents the distance from a source to a point in space. If you have a detector where not all the points on the detector are the same distance from the source, then the inverse square law applies (for varying ##r##) across the detector. If the inverse square law did not apply, then you would get a different answer for the detector.

In a real experiment, the finite size of the detector and the finite size of the source may be relevant if you wanted an extremely accurate prediction. None of that contradicts or undermines the underlying inverse square law - which you are effectively using to derive your calculation for a finite rectangular detector.
 
Last edited:
  • Like
Likes weirdoguy
  • #16
enslay said:
The inverse square law seems to be only approximate for a plane.

enslay said:
TL;DR Is it correct to say that inverse square law is only exactly true for sphere surfaces...
No, you can stop right there. The inverse square law is not concerned with finite areas, it applies to an infinitessimal surface orthogonal to the incident radiation. If you want to calculate the total radiation over a finite area you must integrate over that surface using the projection of each infinitessimal element onto a locally orthogonal plane (which is what you have done).

Of course a spherical surface is everywhere orthogonal to its centre, but the inverse square law is not about the total radiation through an enclosing sphere: perhaps you are confusing it with Gauss's law?
 
  • Like
Likes PeroK
  • #17
Quick question: the Sun feels warmer at the equator than it does at the poles yet the difference in their distance from the Sun is negligible. Does this mean the inverse square law is wrong?
 

Similar threads

Replies
3
Views
2K
Replies
10
Views
577
Replies
9
Views
1K
Replies
4
Views
2K
Replies
5
Views
2K
Replies
1
Views
756
Replies
30
Views
2K
Back
Top