# Classical square well

1. Nov 7, 2013

### jjustinn

My understanding is that a classical idealized particle, moving in one dimension, with momentum p and kinetic energy T comes into contact with an infinite step-function potential V, there will be an (instantaneous) elastic collision - the particle's momentum becomes -p, so its energy remains constant ( momentum is conserved by transferring 2p additional momentum to the barrier, but if its mass is taken to be infinite, this will not change its velocity/energy).
Further, if I'm not mistaken, the same thing will happen with any finite V, where V > T.

First: are both of those statements accurate?

If so , I'm having trouble showing it in Hamiltonian form.

As I understand it, the whole system, where the barrier is at x=0, should be describable by

H = p2/2m - Vθ(x)

Where θ(x) is the unit step function (x<0 θ(x)=0; x>=0 θ(x)=1), and V is a constant > p2/2m.

So, Hamilton's equations give

∂H/∂p = dx/dt = p/m
-∂H/∂x = dp/dt = -Vδ(x)

Differentiating the first and setting it equal to the second gives us a Newtonian-style F=ma equation (F = dp/dt; a = d2x/dt2):

m a= -Vδ(x)

However, this can't be right, because as far as I can tell, the force at x=0 is proportional to V -- specifically, the total change in momentum between x-dx and x+dx is exactly V...while for an elastic collision, it would be -2p -- so I'm apparently missing something.

Any ideas?

2. Nov 8, 2013

### BruceW

you've got a Dirac-Delta function there. So the force at x=0 is not proportional to V, the force is infinite there.

edit: well, I guess it is proportional to V. But I don't fully understand where the problem is. The particle will approach the Dirac-Delta function, but at some point will lose all its kinetic energy (before it gets to x=0), and it will turn around. And when it gets back to the same position it started at, it will have the same kinetic energy, but opposite momentum, right? So I don't see the problem.

3. Nov 8, 2013

### jjustinn

Right -- it's a really trivial problem to solve with conservation of energy/momentum or Newton's laws...but I can't get it to come out right in Hamiltonian form.

4. Nov 8, 2013

### BruceW

what are you having problems with?

5. Nov 8, 2013

### jjustinn

If I use the Hamiltonian given above, the equations of motion don't come out right, because the force is proportional to the height of the well...so as far as I can tell, energy/momentum isn't even conserved.

So, I'm trying to figure out if my assumptions are wrong, if the Hamiltonian is wrong, or if my subsequent math was wrong.

6. Nov 8, 2013

### BruceW

If you have a potential that depends explicitly on the spatial variables of the particle, then momentum is not conserved. Energy is conserved because the potential is not dependent on time. This is well-known physics, momentum is not supposed to be conserved in this case.

As another example, if we have a potential energy like mgh (object falling through gravitational potential), then momentum in the vertical direction is not conserved.

edit: so what I'm saying is that it's OK that momentum is not conserved.

7. Nov 8, 2013

### jjustinn

Ah, right -- hadn't thought of that...but that's really the problem then, because in the equations of motion that we know this system produces, momentum *is* conserved (at least if the barrier is taken to have infinite mass -- and in any case, energy is conserved).

Also, it isn't just momentum that's not conserved, but energy, too (since dp/dt is proportional to V, the *only* way for energy to be conserved is if V exactly reverses the momentum, which is does not in general)-- and the Hamiltonian does NOT explicitly depend on the time.

And in any case, the lack of conservation isn't a "reasonable" amount here, either: for an infinite well, the change in momentum (and hence energy) is infinite...

Edit: by "the change", I mean total change (integral of dp/dt over t-dt ... t+dt), NOT dp/dt, which of course would be infinite (a delta function at t) in the correct case as well.

8. Nov 8, 2013

### BruceW

well (as example), if we want to model a ball falling (but we don't care about how much the Earth moves up towards the ball), then we can use V=mgh and momentum is not conserved. This is fine. This makes a reasonable model to test experiments against.

But yeah, if you want a system that does conserve momentum, then you would need some kind of object with mass that causes a force on the particle. And so an object at x=0 with extremely large mass would give you this kind of system. (And the potential is now a function of the relative position of the two objects, which explains why momentum is conserved in this case).

So now going back to the system with a potential and just one particle. yes, I think it does conserve energy. The potential does exactly reverse the momentum.

well, if we allow the particle to end up at exactly x=0 then yes we will have a problem, because the force here is a Dirac-Delta function. The problem is caused by the fact that the potential is not continuous. If the potential was continuous, yet very steep, then we would get a very large force, but things would still be OK. So physically, a very steep potential might be more realistic than a completely vertical potential.

9. Nov 8, 2013

### jjustinn

Any help showing this? I get dp/dt=-∂H/∂x, which is depends on V, not the momentum...so how does it reverse it (eg total change = -2p)?

But in the Newtonian case, this is exactly what happens, without any issue: the momentum at x=-dx is p, at x=+dx it's -p, so the force (dp/dt) is -2pδ(x)...

10. Nov 8, 2013

### jjustinn

11. Nov 8, 2013

### BruceW

your equation is m a= -Vδ(x) So... yeah there's not much you can do with it as it is here because the Dirac-Delta function does not help us at all. But, if you use the limiting approximation of a Dirac-Delta function, then you can see what happens for a very sharp change in potential (not a vertical potential). We can use a Gaussian function, centered on x=0 as an approximate Dirac-Delta function, in the limit of the width of the Gaussian function being very small and the integral of the Gaussian over all space being equal to 1. So, now we have m a = -Vf(x) where f(x) is an actual function (the Gaussian function). So now, the particle will initially be moving towards x=0 and then at some point close to x=0, the particle will lose all its velocity, and turn around, and when it gets back to the same initial point, it will have regained its initial momentum, but in the opposite direction.

So to show this, we have $mdv/dt = -Vf(x)$ and since $d/dt=vd/dx$ we get $mvdv/dx=-Vf(x)$ and now integrating both sides with respect to x we have $0.5mv_f^2-0.5mv_i^2= -V \int f(x) dx$ So if we say the particle returns to the same place, then the right hand side of the equation will equal zero. Therefore $v_i^2=v_f^2$, i.e. the magnitude of velocity is the same. And since the particle is now returning from being near the potential, we know the particle now has equal and opposite momentum to what it had before.

12. Nov 8, 2013

### BruceW

After looking at your other threads, I see that what you are looking for is an equation for completely elastic collision. hmm. I know that for 'hard spheres', physicists use a potential that is infinite inside the sphere and zero outside. So yeah, this would be similar to your equation, except V should be infinite. (I guess this is to make sure that no particle has enough momentum to break through into the hard sphere).

http://en.wikipedia.org/wiki/Hard_spheres

edit: I guess maybe you are still worried about whether the collision is elastic or not. Well, if we say elastic collision is simply conservation of energy, then that's easy since as long as the Hamiltonian is not explicitly time-dependent, then we have conservation of energy. But, if we say elastic collision is conservation of kinetic energy (and this is the most common definition I think), then it is a bit more complicated. Well, maybe the most common definition is that elastic collision means that the kinetic energy once the particles get far enough away from each other that they become effectively free again, that the kinetic energy is again the same as it initially was. So in this definition, you'd need to make sure that the potential energy isn't being stored in some other weird way. But luckily, since you are creating the exact form of the potential yourself, it is easy to check where the potential energy is being stored, since you can just look at the terms of the equation that you've written.

Last edited: Nov 8, 2013
13. Nov 8, 2013

### jjustinn

Correct -- well, specifically, the Hamiltonian for it; the equations of motion, and the force, are trivial. I just cannot find a Hamiltonian that gives them.
I started by looking for the hard-sphere interaction for N particles in 3D, but as I ran into frustration after frustration, I started looking for simpler problems : first point particles, then just two particles , then restricting to 1D, and finally settling for the simplest non-trivial physics problem there is: a single point particle bouncing off of a perfect wall, once, in one dimension, with no external forces.

Using the hard-sphere potential is almost identical to what we've been discussing -- in particular, it has the same problem whereby the infinite potential leads not only to an infinite force ( which any discontinuous potential would), but an infinite change in momentum -- the difference being that the interaction is a step function (theta((x - y)^2 - r^2), rather than a delta function (delta(x - y))..

I'm worried that when I take the derivative of the infinite step function, I get an infinite change in momentum...if V = Kstep(x), then dV/dx = Kdelta(x), so the final momentum will be the initial momentum minus K...and if K is infinite, then the momentum is negative infinity...if K = 2p, then you do get an elastic collision, but it doesnt make sense to me that the potential would depend on p (not to mention every site I've seen agrees with you).

That's the definition I'm using; but again, unless I'm making a mistake, energy won't be conserved, even though the Hamiltonian isn't explicitly time-dependent....as mentioned above, the final momentum will be minus infinity, and the kinetic energy is p^2/2m. I know that can't be right, but I can't get it to work -- do you get a different result?

14. Nov 8, 2013

### jjustinn

Sorry, missed this earlier. This looks just like the normal newtonian derivation, except with the delta function replaced with a gaussian...I don't quite follow what you mean by the delta function not helping -- since it's both exactly what we want (instantaneous localized force) and easier to integrate (Δp = ∫dp/dt dx = ∫-Vδ(x)dx = -V)...but for argument sake, how would you put your equations into Hamiltonian form? Maybe we can then take the limit and get the delta version?

15. Nov 9, 2013

### MisterX

It's important to make a distinction between force with t as the dependent variable, and force with x as the dependent variable. Both should be delta functions. However, the one with time as the dependent variable will not be multiplied by V, unlike the one with x as a dependent variable.

The delta function itself is a difficulty here. The delta function of x integrates to one, but the object in question does not fully go through it. So it seems easier to think of this as the limit of a sequence of functions. The rectangle definition for a Dirac delta may be easier to use than the Gaussian one.

16. Nov 9, 2013

### jjustinn

I think we might be getting somewhere; that's where a lot of my technical difficulty has come in -- dealing with x/t...particularly since in the elastic case, dp/dt = -2p(t)δ(x(t))...I couldn't figure out how to integrate that without having the explicit form of x(t).

I tried to skip around it by looking instead at dp/dt = -∂V/∂x, so V = ∫2pδ(x)dx = 2pθ(x), but that obviously doesn't match the requirements (e.g. V being an infinite, momentm-independent step function).

I still don't quite see how the various approximate dekta functions could solve/simplify this problem, though, since it seems that as long as dp/dt = -∂V/∂x integrates to a momentum-independent quantity -- no matter how fast/slow -- you cannot end up with an elastic collision.

17. Nov 9, 2013

### jjustinn

Interesting: this reference seems to have found something very similar to what I've been saying: http://books.google.com/books?id=xV...=lagrangian "step function potential"&f=false

It's using a continuous step function rather than a true step, but for all practical purposes it's the same (the reasons for choosing a continuous one were for numerical simulation) -- they find that to get a proper "reflection", the step has to be exactly -2 times the initial momentum...in other words, contrary to virtually everything else I've seen (including e.g. Huang's Statistical Mechanics), they say an infinite potential wall will *not* give an elastic (energy and momentum conserving) collision (even though the potential does not depend explicitly on time)...

18. Nov 9, 2013

### BruceW

eh? what do you mean by 'interaction' ? In your case, the potential energy is a step function, and in the case of hard spheres, the potential energy is also a step function. The only difference is that they use a step function with infinite height. This is a bit weird, I admit. So you could instead say that the step function has height at least as large as the kinetic energy of the approaching particle, so that the particle does not pass into the hard-sphere. This should give the same result.

Think about a very high and very narrow Gaussian function as an 'approximate' Dirac Delta function. The particle will travel along, and will encounter this Gaussian potential. The particle will only keep moving as long as its initial kinetic energy is greater than the potential at the point where it is. In other words, it will never get to the point of infinite potential, or infinite force. It will turn around as soon as it has converted its kinetic energy into potential energy, and when it comes back down the potential 'hill', it will turn this potential energy back into kinetic energy.

19. Nov 9, 2013

### BruceW

You are integrating from one side of the step function, over to the other side. But this is not what you want. This is like saying how much momentum does the particle have when it has gone inside the hard sphere (or wall or whatever). But you don't want the particle to go inside the wall, you want the particle to be reflected by the wall. Therefore you should not be integrating from one side to the other. And I guess now you see the problem with the Dirac Delta function, is that since you are not integrating over it, it is not really useful to you. So if you use a gaussian instead, you can say that the particle gets close to x=0 but never actually reaches x=0, and the particle turns around, and goes in the opposite direction. So, in Hamiltonian form, the potential would be the error function. This looks like an s-shape. And we can take the limit of a very narrow Gaussian, then the error function will look almost like a step function, but it will be continuous. Or you can use some other function that has a roughly s-shape, and take the limit that the curve is very sharp. But the error function is the potential which would give a Gaussian as a force, i.e. an approximate Dirac-Delta function as the force, which is what you wanted.

20. Nov 9, 2013

### BruceW

This reference is saying that you can use an 'approximately' step function which has height V0. And to get a proper reflection, V0 simply needs to be greater than the initial kinetic energy of the particle. They do not say that V0 has to be twice the initial kinetic energy for the collision to be elastic. The collision is elastic for any value of V0. What they were saying is that the particle will exactly reach the point x=0 and turn around if V0 is twice the initial kinetic energy. And so if V0 is slightly more than twice the kinetic energy, then the particle will will turn around before it gets to the point x=0.

It is the same for my 'error function' potential. If the kinetic energy is exactly half the height of the approximate step function, then the particle will turn around at exactly x=0. And If the kinetic energy is less than half of the height of the approximate step function, then the particle will turn around before x=0. But the collision will be still be elastic. And the fact that we take the limit that the approximate step function is very steep, i.e. almost vertical but not quite, this means that even though the particle turns around before x=0, it will turn around at some point very close to x=0. And as long as it turns around at approximately x=0, we don't really care that it actually turns around at some point which is very close to zero, but not actually zero.

21. Nov 9, 2013

### jjustinn

Sorry, I was mixing topics -- for "interaction" there I meant for two particles, rather than a particle and a wall (hence the delta function for point particles and a two-sided step function for spheres). It was off-topic, but I included it for context,

Yes! That's what I thought, too (and what just about everyone says without actually showing how it works). But, when I do the math, I don't get conserved energy *or* momentum unless the "height" is *exactly* twice the momentum at the time of the collision.
I was convinced I had to be wrong, but then I found this: http://books.google.com/books?id=xV...=lagrangian "step function potential"&f=false -- and the author seems to have found the same thing...with the added bonus that he got the same result not with a delta/step function, but with a continuous one.

Right -- and it works if you do a conservation of energy (or momentum) argument like that, but I just cannot find a hamiltonian that gives the correct results (even using the double momentum as the height doesn't work, because that then changes the ∂H/∂p = dx/dt, because it's no longer just the kinetic energy that contains the momentum, as was assumed to find that value.

22. Nov 9, 2013

### jjustinn

You're right. I should have integrated over t surrounding the collision time...if x=0 at t=t0, then the integral would be any interval containing t0 -- eg t0-dt...t0+dt. The end result us still the same -- energy is only conserved for a specific momentum-dependent height (whether that height is distributed over a gaussian, triangle, atanh, or step)...the delta function just lets us use t0+/-dt, rather than needing to figure out where the potential starts/stops (unless I'm missing something)

23. Nov 9, 2013

### BruceW

no, that is not what the author is saying. The author is saying that energy is conserved for a potential with any height. please read it again.

The hamiltonian given by the author of the book you were looking at is a hamiltonian that conserves energy. And it conserves energy for any height. It does not conserve momentum because it is not supposed to conserve momentum. If instead you introduce another particle with mass, and say that the potential depends on the relative distance between the two particles, then momentum would also be conserved.

24. Nov 10, 2013

### jjustinn

So I tried working this out from scratch...starting with two particles, then taking the mass of the second to be infinite to get an immobile wall, and confirmed that only if the condition on the height of the barrier is met is energy conserved -- and in that case, the correct Newtonian equations are reproduced... So I was hoping someone might see where I went wrong.

Variables
D := diameter of particle
K := height of "wall" (nonzero; assumed by most references to be a constant, often infinite, but always greater than the maximum kinetic energy; this derivation only assumes that it is position-independent)
$m_i$ := mass of particle i (for a wall, $m_2 → ∞$)
$x_1, x_2, p_1, p_2$ := coordinates and momenta of particles
$H = T + U$
$U(r) = Kθ(D - r)$
$T = p_1^2/2m + p_2^2/2m$

Definitions / abbreviations
$ε(x) := sign(x)$
$θ(x) := step(x)$
$r = |x_1 - x_2|$

$∂r/∂x_1 = ε(x_1 - x_2)$
$∂r/∂x_2 = -ε(x_1 - x_2)$
$∂θ/∂x = δ(x)$

Derivation

(0) Hamilton's equations:
$∂H/∂x_1 = -dp_1/dt = ∂U/∂x_1$
$∂H/∂x_2 = -dp_2/dt = ∂U/∂x_2$

(1) Chain rule (prime means differentiation wrt appropriate x):
$∂U/∂x_1 = Kθ'(D - r)(-r') = -Kδ(D - |x_1 - x_2|)ε(x_1 - x_2)$
$∂U/∂x_2 = Kθ'(D - r)(-r') = Kδ(D - |x1_ - x_2|)ε(x_1 - x_2)$

(2) note that the derivatives are equal/opposite
$-∂U/∂x_1 = dp_1/dt = -dp_2/dt = ∂U/∂x_2$

(3) find total change in momenta $ΔP_i$ (and final momenta $p_i(t_2)$)
Let $t_1$ := the time where $x_1 - x_2 = +d$; let $t_0 := t_1 - dt, t_2 := t_1 + dt$
Let $p_1(t_1) = P_1, p_2(t_1) = P_2$
Let $ΔP_1 := ∫(dp_1/dt)dt$ from $t_0...t_2 = K = -ΔP_2$
Then $p_1(t_2) = P_1 + K; p_2(t_2) = P_2 - K$

(4) But, energy must be conserved: $T(p_i) = T(p_i + ΔP_i)$
$(P_1 + K)^2/2m_1 + (P_2 - K)^2/2m_2 = P_1^2/2m_1 + P_2^2/2m_2$
$(P_1^2 + 2KP_1 + K^2)/2m_1 + (P_2^2 - 2KP_2 + K^2)/2m_2 = P_1^2/2m_1 + P_2^2/2m_2$
$(2KP_1 + K^2)/2m_1 + (-2KP_2 + K^2)/2m_2 = 0$

Multiply through by $2m_1m_2$

$(2KP_1 + K^2)m_2 + (-2KP_2 + K^2)m_1 = 0$
$2K(m_2 P_1 + 1/2 K m_2 - m_1 P_2 + 1/2K m_1) = 0$

(5) By definition, |K| > 0. So,

$m_2 P_1 - m_1 P_2 + 1/2K(m_1 + m_2) = 0$

Conclusion:
$K = 2(m_1 P_2 - m_2 P_1)/(m_1 + m_2)$
So to conserve kinetic energy, K (and hence U) must depend on the momentum.

(6)
In the special case where $m_2 -> infinity$:
$1/2K = (m_1 P_2)/(m_1 + m_2) - (m_2 P_1)/(m_1 + m_2)$
$1/2K = (m_1 P_2)/(m_2) - (m_2 P_1)/(m_2)$
$1/2K = 0 - P_1, K = -2P_1$, as expected.

(7)
However, since the potential now depends on the momenta, $dx_i/dt$ is no longer simply $p_i/2m_i$; we have

$H = p_1^2/2m_1 + p_2^2/2m_2 + 2(m_1 P_2 - m_2 P_1)θ(D - r)/(m_1 + m_2)$

$∂H/∂p_1 = dx_1/dt = p_1/m_1 - 2m_2θ(D - r)/(m_1 + m_2)$
$∂H/∂p_2 = dx_2/dt = p_2/m_2 + 2m_1θ(D - r)/(m_1 + m_2)$

(8)
Or in the special case of the wall,
$H = p_1^2/2m_1 + p_2^2/2m_2 -2 P_1θ(D - r)$
$∂H/∂p_1 = dx_1/dt = p_1/m_1 - 2P_1 θ(D - r)$
$∂H/∂p_2 = dx_2/dt = p_2/m_2 + 2P_1θ(D - r)$

...which is zero outside of the barrier, but there is ambiguity in the definition of the step function at zero; we can retain the normal equations of motion only if θ(0) = 0.

Last edited: Nov 10, 2013
25. Nov 10, 2013

### BruceW

I think that should be $dp_1/dt = -dp_2/dt = - ∂U/∂x_1$. I think this is just a mis-type. It looks like you have it the correct way in the rest of the derivation.

where does this step come from? why does $∫(dp_1/dt)dt$ from $t_0...t_2$ equal K ?

p.s. your derivation is really nicely written out. Thanks. It makes it a lot easier to read when people do that :)