# Path of least action subject to an initial and a final conditions

I would like to find the path of least action subject to a initial and final condition. I don't know whether this is possible and meaningful at all, but here goes: Let us say we have a particle moving in a gravitational field near the surface. The Lagrangian of this system can be written as (ignoring the mass factor): $$L=T-V=\dot{x}^2/2+\dot{y}^2/2-mgy.$$ But now I am interested in subjecting this whole thing to two conditions: $$x(0)=x_0,y(0)=y_0 \text{ and } x(T)=x_T, y(T)=y_T.$$ These are just initial and final conditions. Can one solve this problem? I thought of solving this with Lagrange multipliers, the conditions are: $$\phi_1=\delta(t)[x(t)-x_0]+\delta(t-T)[x(t)-x_T]$$ $$\phi_2=\delta(t)[y(t)-x_0]+\delta(t-T)[y(t)-x_T]$$ This leads to the following equation of motion: $$\ddot{x}-mg=\delta(t)\lambda_{11}+\delta(t-T)\lambda_{12}$$ $$\ddot{y}=\delta(t)\lambda_{21}+\delta(t-T)\lambda_{22}$$

But I am not sure how to determine the Lagrange multipliers.

• You use T for kinetic energy and time ?
– Eli
Commented Mar 12, 2022 at 14:15
• @Eli Sorry good point. I use $T$ for kinetic energy as well as a time point. Actually you can forget the kinetic energy, I only use it for that in the beginning. All subsequent $T's$ represent the final point in time. Commented Mar 12, 2022 at 14:39
• I actually had an idea, but I am not sure if it is correct. The last two equations can be laplace-transformed to get two equations in $s$ Then one can solve for the laplace transform of $x(t)$, $\hat{X}(s)$. One then gets equations for , $\hat{X}(s)$ depending on the initial conditions, $s$ and the lagrange multipliers. Then taking the inverse Laplace transform one can get the expressions for $x(t)$ and $y(t)$. Here's my question: Can I now just plug in the final conditions and solve for the laplace multipliers or is this something completely different? Commented Mar 12, 2022 at 14:44

with $$~L=\frac 12 (\dot x^2+\dot y^2)-m\,g\,y~$$ and EL you obtain

$$\ddot x=0\\ \ddot y+m\,g=0$$

the solution $$x(t)=c_1\,t+c_2\\ y(t)=-\frac 12\,g\,t^2+c_3\,t+c4$$

you have four conditions to solve the four constants $$~c_i$$

$$x(0)=x_0~,x(T)=x_T\\ y(0)=y_0~,y(T)=y_T\quad\Rightarrow\\ c_1=-\frac{x_0-x_T}{t}~,c_2=x_0\\ c_3=\frac 12\,{\frac {m\,g\,{T}^{2}-2\,y_{{0}}+2\,y_{{T}}}{T}}~,c_4=y_0$$

• of course, that is much easier to do it this way! I don't know why I didn't think of that. But I have another question: In this example it is quite easy to carry out this analysis, but how would one do it for arbitrary potentials $V(x)$ or even arbitrary Lagrangians? Is there a way to incorporate the initial and final condition in the EL-eqs with the help of Lagrange multipliers? Commented Mar 12, 2022 at 15:47
• your conditions are not constraint conditions, constraint condition can be for example $~x=X(t)~,y=Y(t)~$ where $~X(t),Y(t)~$ are given paths
– Eli
Commented Mar 12, 2022 at 16:07
• so if I had to calculate the path numerically, would I have to calculate the action for every path which ends in the final condition and then choose that one which has the least action? Is there not a simpler way? Commented Mar 12, 2022 at 16:38
• with those constraints your Lagrangian is \begin{align*} &L=\frac 12 (\dot x^2+\dot y^2)-m\,g\,y+\lambda_1\,(x-X(t))+\lambda_2 \,(y-Y(t)) \end{align*} with EL you obtain the EOM's that depending on $~\lambda_1~,\lambda_2~$ to solve the problem you have two additional equations \begin{align*} &\frac{d^2}{dt^2}(x-X(t))=0\\ & \frac{d^2}{dt^2}(y-Y(t))=0 \end{align*} you have now four equations for the unknows $~\ddot x~,\ddot y~,\lambda_1~\lambda_2~$
– Eli
Commented Mar 12, 2022 at 17:42
• Ok i got it now thanks! Commented Mar 12, 2022 at 18:08