I'm trying to get some experience with the least action principle, and for this I chose a simple 1-dimensional problem of a particle moving in some field. The least action principle would then look like:
∫t2t1(T(v)−U(x))dt=min
So I discretize time into some points and try to minimize the sum:
n∑i=1(T(vi)−U(xi))Δt.
But I get into some strange results: first, if I don't constrain the system, the sum appears unbounded from below. Well, it's understandable because there can be multiple solutions corresponding to different initial/boundary conditions. OK, I choose some values for x1 and xn as constraints. But even the sum appears unbounded. Well, I then choose to reduce possible range of xi, and the sum finally can be minimized...
But the result appears complete nonsense. Here's the result for n=10, t1=0, t2=1, |xi|<5:
Positions
Velocities
Here velocities don't seem to reflect change in positions.
What am I missing here? Should I add some other constraints, or have I done some simple mistake?
Answer
As said in this answer, velocity and position are not varied independently. Indeed, when deriving Euler-Lagrange equations, we explicitly use the fact that δv=ddtδx.
So, when I add the constraint vi=xi+1−xiΔt, specifying x1 and xn remains the only additional thing to converge to the solution. For example, setting U=x4−4x3+4.5x2, x1=0, xn=2.651 and n=51, I get:
Positions:
Velocities:
Here the last point of velocity is wrong, but it's an artifact of the constraint: I've used a right-hand finite difference derivative, which can't be done for vn. This can be fixed by choosing some other difference scheme, but for the purposes of this answer it's an unimportant implementation detail.
What's more important, is that if we choose xn>2.651 in this example, the action appears unbounded from below even with the correct constraints. I believe this is no longer a problem in the implementation, but rather a result from the fact that the action just has to be stationary, but not minimal, so minimization is not a good enough procedure to obtain a true trajectory.
No comments:
Post a Comment