# Lagrange momentum for position change

After the tremendous help from @hft on my previous question, after thinking, new question popped up.

I want to compare how things behave when we do: $$\frac{\partial S}{\partial t_2}$$ and $$\frac{\partial S}{\partial x_2}$$. One is with respect to position and one with time.

It's easy to see that changing $$\delta t_2$$ results in new classical path, from which I understand the derivation. The more interesting question is, what happens when changing $$x_2$$? It should still cause a path change - even though time endpoints is the same, if $$x_2$$ changed, then in the same time, object should cover different distance - definitely path changing.

So by following the logic I said, I got:

$$S_2 - S_1 = \delta S = \delta x_b \frac{\partial L}{\partial x}(t_b) = p_2.$$

This was derived by $$S1$$ (original action) - $$S2$$ (new resulting path action). ofc, in this way, $$t2$$ was fixed.

Now, I wonder, how do I derive $$\frac{\partial S}{\partial x} = p$$? This is different since this is the formula for any point of $$x$$. The difficulty I have is if we change any $$x$$ on our path, ofc, this results in a new classical path, but I can't do anymore:

$$S_2 - S_1 = \delta S = \int_{t_1}^{t_2} [L(r, r') - L(r - \eta, r' - \eta')] dt$$

and I seem to be struggling now, I could solve it when for change of $$x2$$, but for change of any $$x$$, I'm stuck.

Also, my second question would be that feynman says that changing time endpoint results in a new classical path, but doesn't say the same when changing position endpoint. Why? changing position endpoint still results in a new classical path even though time endpoint is fixed.

1. On one hand, the variation of the on-shell action $$S(q_f,t_f;q_i,t_i)$$ wrt. the endpoint positions $$q_i$$ and $$q_f$$ is actually the simplest as the proof only involves vertical variation $$\delta q$$ with no horizontal variation $$\delta t=0$$, cf. eq. (11) in my Phys.SE answer here.
2. On the other hand, the variation of the on-shell action $$S(q_f,t_f;q_i,t_i)$$ wrt. the endpoint times $$t_i$$ and $$t_f$$ is more challenging as the proof involves both vertical and horizontal variations, cf. eq. (12) in my Phys.SE answer here.