# Why don't both equivalent forms of this delta function give the correct answer?

I am a bit confused on a basic problem involving a Dirac delta function being integrated over in a multiple integral.

The original problem is to find the probability distribution in position-momentum $(z,p)$ space of a ball bouncing up and down, given that the ball reaches a maximum height of $z=h$. Now, a basic conservation of energy argument gives us that $p(z) = \pm m \sqrt{2g(h-z)}$ where $m$ is mass and $g$ is gravitational acceleration. We also know that the probability density of finding the ball at $z$ is inversely proportional to the velocity of the ball at $z$, namely $p(z)/m$. So, the probability distribution is

$$P(z,p) = \frac{C}{\sqrt{2g(h-z)}}\left[ \delta(p-m\sqrt{2g(h-z)})+\delta(p+m\sqrt{2g(h-z)}) \right]$$

where $C$ is a normalization factor. To find $C$, we can simply integrate $P$ over $z$ and $p$ and set the result equal to $1$, using the delta functions to do the $p$ integral and integrating $z$ from $0$ to $h$, and we get the correct answer. My question is, why does this strategy not work if we write $$P(z,p) = \frac{D}{|p|} \delta(z-h+p^2/(2m^2g))?$$ In this case, when we attempt to find the normalization $D$, if we try getting rid of the delta function by integrating over $z$ and then we integrate over the appropriate range of $p$, we fail because the $1/|p|$ integral diverges, whereas the $1/\sqrt{2g(h-z)}$ integral converges. What am I missing here?

For the second case you want to divide by the force, not the velocity.

You are basically computing what fraction of the time you spend at a particular point in phase space.

However what you have is a probability density. So $P(z,p)$ is something you multiply by a volume in phase space to get a probability.

A correct way to get it would be to consider a whole period (e.g. time from top to top or from bottom to bottom or from any point in phase space to itself).

A Dirac delta has units. It has units of one over the argument so since $\int \delta (x) dx=1$ then $\delta (x)$ has units of inverse distance and $\int \delta (p) dp=1$ then $\delta (p)$ has units of inverse momentum.

When you integrate over momentum you get a probability density for position. This has units that you multiply by a distance to get a probability of being in that range of distance.

These probability densities over positions are the ones where it is inversely proportional to velocity. So indeed after you integrate over momentum you have a probability per unit length and probabilities per unit length are inversely proportional to velocity. So it should work.

However if you integrate over position then you have a probability density for momentum. This is something that you multiply by a range of momentums to get a probability of having momentum in that range. There is no rule that this kind of a density is inversely proportional to velocity. And it isn't, it is inversely proportional to force.

This is similar to how energy density is different for frequency and for wave length because each is something you multiply by a range of things to get the actual amount of stuff. See my answer at https://physics.stackexchange.com/a/165256 if you need more details about densities in different united domains.

Let's review where that inversely proportional to velocity rule came from. As a simplification during a time interval $\Delta t$ you might travel a distance $\Delta z$ = $v\Delta t$ And really the probability you are computing is $\Delta t/T$ where $T$ is that period I mentioned.

So the probability you are in a region of width $\Delta z$ is proportional to the amount of time $\Delta t$ you spend in there. Thus inversely proportional to velocity, in fact it is $\Delta z/(vT).$ So the spatial density is $1/(vT).$ And this rule doesn't apply if you are asking how much time something spends in a region of size $\Delta p.$ So don't divide by velocity if you want a probability density of being within a range of momentums of width $\Delta p.$

To do the probability density for momentum intervals, use $\Delta p$ = $F\Delta t$ then the probability is $\Delta t/T$ = $\Delta p/(FT)$ so the probability density for momentum intervals is $1/(FT).$

So a density is just like the Dirac delta it is something you integrate to get the probability but it needs to be a per interval of distance or a per interval of momentum for it to be something you can integrate.

And the momentum version should give you pause since you generally need to correctly account for the force when it turns around at the ground. So over counting is an issue to consider.

TL;DR: Substitution inside the delta function yields a Jacobian factor

$$\tag{1} \delta(f(v))~=~ \sum_{v_{(0)},f(v_{(0)})=0 }\frac{1}{| f^{\prime}(v_{(0)})|} \delta(v-v_{(0)}).$$

Here the sum is over the zeroes $v_{(0)}$ of the function $f(v)$.

Let us for simplicity consider velocity $v$ rather than momentum $p=mv$. So energy conservation

$$\tag{2} \frac{1}{2}v^2+gz ~=~gh, \qquad 0\leq z\leq h, \qquad |v|~\leq~\sqrt{2gh},$$

yields a parabola in the $(v,z)$ plane. If we define a function

$$\tag{3} f(v)~:=~z-h +\frac{v^2}{2g},$$

then eq. (1) becomes

$$\tag{4} \delta(z-h +\frac{v^2}{2g}) ~=~\frac{g}{|v|}\sum_{\pm} \delta(v\pm \sqrt{2g(h-z)}).$$

Note in particular that the factor $\frac{1}{|v|}$ on the right-hand side of eq. (4) does not appear on the left-hand side.