Mathematical disagreement with inverse square law?

  • #1
enslay
Gold Member
15
2
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: 10
  • PlanarDetector.pdf
    384 KB · Views: 7
  • #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: 4
  • #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?
 
  • #18
pbuk said:
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?
The story is that I work with physicists who try to derive the density using the inverse square law. The inverse square law is verified and true, right? Seems reasonable. They insist that they can predict the intensity on the detector surface (e.g. a plane, a cylinder) with the inverse square law. Sounds reasonable, right?

When I derive it for 3 different detector geometries, I get a 1/r^3 in the expression, like the Cauchy distribution. And it's not just plane or cylinder, it's even the sphere! I expected a sphere detector geometry to make the 1/r^3 go away. So I am struggling with how to reconcile the inverse square law with what the math and simulation suggest. You apparently cannot just take 1/r^2 and have a density function for any detector geometry.

Not that it matters for our discussion, but the support for planar detector (Cauchy distribution) is the infinite plane. And the support for the cylinder detector is the infinitely long cylinder.
 
  • #19
enslay said:
The story is that I work with physicists who try to derive the density using the inverse square law. The inverse square law is verified and true, right? Seems reasonable. They insist that they can predict the intensity on the detector surface (e.g. a plane, a cylinder) with the inverse square law. Sounds reasonable, right?
There's no physics involved in this thread. There is a mathematical assumption (inverse square distribution of something through space) and a calculation for surfaces of varying distances from the origin - which inevitably leads to more complicated expressions for those particular surfaces.

Everything else is verging on crackpottery.
 
  • Like
Likes weirdoguy
  • #20
PS The inverse square law is

a) a spherically symmetric mathematical function: ##\psi(r) = \frac k {r^2}##, where ##k## is some constant, and ##r## is the distance from the origin.

b) The postulate that a certain physical scenario can be modelled by that function. E.g. the electric field of a stationary point change. Which is effectively Coulomb's law. Or, another example, is Newton's law of gravity.

What you believe you have proved is that a) is mathematically self-contradictory or inconsistent. Which is clearly nonsensical. It has nothing to do with mathematics contradicting physics. Your calculations show mathematics contadicting itself.
 
  • Like
Likes russ_watters
  • #21
PeroK said:
There's no physics involved in this thread. There is a mathematical assumption (inverse square distribution of something through space) and a calculation for surfaces of varying distances from the origin - which inevitably leads to more complicated expressions for those particular surfaces.

Everything else is verging on crackpottery.
This is not helpful and borderline insulting. Where is the crackpottery? I am always open to be corrected. You never correct me though.

So it inevitably leads to more complicated expression right? Alright... so how can I set this right with physicists who try to use the inverse square law to predict the intensity on a detector surface? When I show physicists a density function with a 1/r^3 and it corroborates Monte Carlo simulations even they produced themselves... and they say no, it must be 1/r^2... how do I explain that away?

The only assumption is that a point source emits photons in uniform random directions. Is that right? OK, now it's a purely probabilistic problem. No physics as you suggest. Then the densities are actually as I wrote them. But I have stubborn Physicist colleagues who do not like the 1/r^3 in those expressions because they cite the inverse square law. If you're me, what would you say?

PeroK said:
What you believe you have proved is that a) is mathematically self-contradictory or inconsistent. Which is clearly nonsensical. It has nothing to do with mathematics contradicting physics. Your calculations show mathematics contadicting itself.
What do I believe I have proven?
 
  • #22
enslay said:
The only assumption is that a point source emits photons in uniform random directions. Is that right?
It's nothing to do with photons. But that's largely irrelevant.
enslay said:
OK, now it's a purely probabilistic problem. No physics as you suggest. Then the densities are actually as I wrote them. But I have stubborn Physicist colleagues who do not like the 1/r^3 in those expressions because they cite the inverse square law. If you're me, what would you say?
That's a completely different question. If you calculate the electric field of a uniformly charged disk on the axis through the centre of the disk:

https://www.physics.udel.edu/~watson/phys208/exercises/kevan/efield1.html

In the limit, the electric field approximates that of a single point charge, with an inverse square field far from the disk. That sort of thing should be familiar to most physicists.

This is similar to what I did in an earlier post:

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}$$
That looks like ##\frac 1 R## for small ##y##.

I can't comment on the discussions you have with others, but I don't think the headline that you have ##1/r^3## instead of ##1/r^2## gets you off on the right foot! In the above, we have ##\frac{R}{y^2 + R^2}## instead of the simple ##\frac 1 R## - which should be fairly simple to understand.
 
  • #23
enslay said:
Alright... so how can I set this right with physicists who try to use the inverse square law to predict the intensity on a detector surface?
Of course you can use the inverse square law, but for a surface you also have to take the angle of incidence into account.
 
  • Like
Likes enslay
  • #24
PeroK said:
It's nothing to do with photons. But that's largely irrelevant.

That's a completely different question. If you calculate the electric field of a uniformly charged disk on the axis through the centre of the disk:

https://www.physics.udel.edu/~watson/phys208/exercises/kevan/efield1.html

In the limit, the electric field approximates that of a single point charge, with an inverse square field far from the disk. That sort of thing should be familiar to most physicists.

This is similar to what I did in an earlier post:


That looks like ##\frac 1 R## for small ##y##.

I can't comment on the discussions you have with others, but I don't think the headline that you have ##1/r^3## instead of ##1/r^2## gets you off on the right foot! In the above, we have ##\frac{R}{y^2 + R^2}## instead of the simple ##\frac 1 R## - which should be fairly simple to understand.
Yeah OK, maybe the topic title isn't the greatest. That's a fair point.

I'm not quite sure what you're suggesting with 1/R. Is it that in a 2D world, there is an inverse law and it is approximately true in your density for small y?
 
  • #25
enslay said:
I'm not quite sure what you're suggesting with 1/R. Is it that in a 2D world, there is an inverse law and it is approximately true in your density for small y?
The calculation is much simpler for the 2D scenario, but the same patterns emerge.
 
  • Like
Likes enslay
  • #26
A.T. said:
Of course you can use the inverse square law, but for a surface you also have to take the angle of incidence into account.
OK, I just talked with the a physicist about the angle of incidence and this may be where that extra 1/r comes from. I'll have to play around with the math on the angle incidence and see what I get.

I didn't mean for this to be a heated discussion. I never disputed the inverse square law. I just didn't know how to reconcile the inverse square law with these theoretical density functions.

You all have my gratitude for the discussion.

PeroK said:
The calculation is much simpler for the 2D scenario, but the same patterns emerge.
And you have my apology for missing your point the first time.
 
  • Like
Likes A.T. and PeroK
  • #27
enslay said:
OK, I just talked with the a physicist about the angle of incidence and this may be where that extra 1/r comes from.
Consider a simple example:

At distance 1 from the source you have a small (much less than 1 in size) surface oriented to face the source (angle incidence is 0° so it gets the maximal intensity 1 at this point).

CASE A: You move it radially to distance 2. The intensity is 1/4 according to the inverse square law, and that is what it gets in full, because the angle incidence is still 0°

CASE B: You move it laterally (parallel to the surface) such that it's distance to the source is 2. The intensity is 1/4 according to the inverse square law, but now the angle incidence is 60° meaning the you get only 1/4*cos(60°)=1/8 intensity.

There is your 1/r^3 relationship.
 
  • Like
Likes PeroK and enslay
  • #28
A.T. said:
Consider a simple example:

At distance 1 from the source you have a small (much less than 1 in size) surface oriented to face the source (angle incidence is 0° so it gets the maximal intensity 1 at this point).

CASE A: You move it radially to distance 2. The intensity is 1/4 according to the inverse square law, and that is what it gets in full, because the angle incidence is still 0°

CASE B: You move it laterally (parallel to the surface) such that it's distance to the source is 2. The intensity is 1/4 according to the inverse square law, but now the angle incidence is 60° meaning the you get only 1/4*cos(60°)=1/8 intensity.

There is your 1/r^3 relationship.
I guess in general for a vertical plane at position ##x=R##, you have a surface normal vector in the direction of ##[1,0,0]^T## with the distance of the point source to the plane being ##|R - x_0|##. So if I understand the definition of the angle of incidence ##\theta## correctly (that being the angle between the normal and the direction of the "photon"), then ##\cos \theta = \frac{|R-x_0|}{\sqrt{(R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}} = \frac{|R - x_0|}{r}##

So I guess the intensity then ##= \frac{\cos \theta}{r^2} = \frac{|R-x_0|}{r^3}##? Is that right?
 
  • #29
enslay said:
I guess in general for a vertical plane at position ##x=R##, you have a surface normal vector in the direction of ##[1,0,0]^T## with the distance of the point source to the plane being ##|R - x_0|##. So if I understand the definition of the angle of incidence ##\theta## correctly (that being the angle between the normal and the direction of the "photon"), then ##\cos \theta = \frac{|R-x_0|}{\sqrt{(R-x_0)^2 + (y-y_0)^2 + (z-z_0)^2}} = \frac{|R - x_0|}{r}##

So I guess the intensity then ##= \frac{\cos \theta}{r^2} = \frac{|R-x_0|}{r^3}##? Is that right?
Looks OK.

Note that for the plane point on the x-axis you get the usual 1/r2 dependency when changing R (here R = r).

But when keeping R constant and moving along the plane in yz-directions you get 1/r3 dependency due to the changing angle of incidence (AOI) combined with 1/r2.

And it gets even more complex when the plane point is not on the x-axis but some non-zero fixed yz-coordinates, and you change R. For R=0 you get 0 intensity, because the AOI is 90° and r is non-zero. Then, with increasing R, intensity reaches some maximum value, and for R->∞ it goes to zero again, approaching the 1/r2 dependency, because the AOI approaches 0° and is not changing much anymore.
 
  • Like
Likes enslay
  • #30
enslay said:
So I am struggling with how to reconcile the inverse square law with what the math and simulation suggest. You apparently cannot just take 1/r^2 and have a density function for any detector geometry.
Of course not: I think you may be relying too much on equations here and abandoning common sense. Do you think the amount of radiation detected depends only on the surface area of the director? What if you take a square detector and turn it through 90 degrees so it no longer faces the source?
 
  • Like
Likes enslay
  • #31
A.T. said:
Looks OK.

Note that for the plane point on the x-axis you get the usual 1/r2 dependency when changing R (here R = r).

But when keeping R constant and moving along the plane in yz-directions you get 1/r3 dependency due to the changing angle of incidence (AOI) combined with 1/r2.

And it gets even more complex when the plane point is not on the x-axis but some non-zero fixed yz-coordinates, and you change R. For R=0 you get 0 intensity, because the AOI is 90° and r is non-zero. Then, with increasing R, intensity reaches some maximum value, and for R->∞ it goes to zero again, approaching the 1/r2 dependency, because the AOI approaches 0° and is not changing much anymore.
Sweet! And this is certainly easier to derive than using conditional probabilities. It's neat that I got the same answer though! To deal with the vanishing intensity in ##R \to \infty##, I essentially considered the ratio of the intensities at a location ##(y,z)## for the ##x=2R## and ##x=R## planes. That ratio gives the expected 1/4. But thank goodness for that missing angle incidence term as everything works out exactly now! You're my hero!

pbuk said:
Of course not: I think you may be relying too much on equations here and abandoning common sense. Do you think the amount of radiation detected depends only on the surface area of the director? What if you take a square detector and turn it through 90 degrees so it no longer faces the source?
You're right. I do have a tendency to think of the equations too much. A lot of what I did was very mechanical with the math without a lot of thought of the big picture.

Although, the planar detector here is infinite. You couldn't make it face away from the source. But you could cause some numerical problems by having the source exactly on the plane!

When I first derived the planar detector, I was obsessed with making it a proper probability density function (PDF). Both for the infinite plane and for a finite-sized detector. But this turned out to be a bad idea since, in the case of the infinite plane, only 1/2 of the "photons" hit the infinite plane detector. Well, that is unless you erroneously let "photons" also travel negative distances (which I initially did). So the infinite plane PDF really ought to integrate to 1/2 (which isn't a PDF anymore) reflecting that. And similarly for the finite-sized detector, lots of "photons" will never hit the finite-sized detector. So all my extra cumulative distribution function derivation for normalizing the density was a complete waste of time. The integral of the density function (for the infinite planar detector) over the finite plane then tells you what fraction of "photons" that actually hit that detector. Similar story for the cylinder detector.
 
  • #32
enslay said:
You're right. I do have a tendency to think of the equations too much. A lot of what I did was very mechanical with the math without a lot of thought of the big picture.

Although, the planar detector here is infinite. You couldn't make it face away from the source. But you could cause some numerical problems by having the source exactly on the plane!
You have made exactly the same mistake again - your inappropriate mathematical model has introduced a singularity whereas inspection of the "big picture" should tell you that with true linear dispertion the number of particles that hit a surface parallel to their motion is exactly zero.

enslay said:
The integral of the density function (for the infinite planar detector) over the finite plane then tells you what fraction of "photons" that actually hit that detector.
If you want to know the answer for something finite it is usually better to start with something infinitessimal and work up rather than something infinite and work down.
 
  • #33
pbuk said:
You have made exactly the same mistake again - your inappropriate mathematical model has introduced a singularity whereas inspection of the "big picture" should tell you that with true linear dispertion the number of particles that hit a surface parallel to their motion is exactly zero.
What's inappropriate about starting with a point source emitting "photons" in uniform random 3D directions and transforming that distribution into a distribution of "photons" hitting a parameterized surface? It's not like I chose to have an infinite plane before hand. The infinite support emerges as a consequence of the original distribution... which would actually span an infinite plane (or infinite cylinder), wouldn't it?

pbuk said:
If you want to know the answer for something finite it is usually better to start with something infinitessimal and work up rather than something infinite and work down.
I started with this distribution
$$
1 = \frac{1}{4 \pi} \int_{-\pi}^{\pi} \int_0^{\pi} \sin u du dt
$$
Which transforms into this distribution with infinite support
$$
1 = \frac{1}{2 \pi} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \frac{|R - x_0|}{\left ( (R - x_0)^2 + (y-y_0)^2 + (z-z_0)^2 \right )^{\frac{3}{2}}} dy dz
$$
Directly w.r.t. these conditions
$$
\begin{align*}
R = x &= x_0 + r \sin u \cos t \\
y &= y_0 + r \sin u \sin t \\
z &= z_0 + r \cos u
\end{align*}
$$
where ##u, t## are sampled from the first distribution mentioned above and ##r## is the distance that "photon" travels to the plane ##x = R##.

Now we can integrate the Cauchy PDF and confirm that, say, point source at ##(x_0,y_0,z_0) = (R,0,0)## does not even hit a finite portion of the plane spanned by ##y \in (5,10),\ z \in (5,10)##.
$$
0 = \frac{1}{2 \pi} \int_5^{10} \int_5^{10} \frac{|R-R|}{\left( (R-R)^2 + y^2 + z^2 \right )^{\frac{3}{2}}} dy dz
$$
In the limiting case for the "singularity", the Cauchy PDF, being a PDF, will still integrate to unity over its infinite support.

My issues span from fixating on the math of transforming one PDF into another and missing, firstly, that only half the photons hit an infinite plane (so it should integrate to 1/2). And secondly, an integration over a finite portion of the plane should not be normalized to integrate 1. I was fixated on keeping things as PDFs. It's more useful to be able to integrate the PDF on a finite portion of the plane and know the proportion of "photons" that will hit that finite portion of the plane.

EDIT: Eek, swap du and dt! And now let's substitute ##y_0 = 0, z_0 = 0## too!
 
  • #34
enslay said:
The probability density functions characterizing where photons strike the detector surface always seems to have a 1/r^3 in it.
This claim requires a valid reference. And any such reference should have the math to back up the claim. That is the sort of basis we would need to have a useful discussion of the topic.

In the absence of such a basis, this thread is closed. @enslay if you can find a valid reference, PM me and it can be reviewed.
 

Similar threads

Replies
3
Views
2K
Replies
10
Views
611
Replies
9
Views
1K
Replies
1
Views
1K
Replies
1
Views
696
Replies
5
Views
2K
Replies
4
Views
2K
Back
Top