A particle is subjected to the potential $V (x) = −F x$, where $F$ is a constant. The particle travels from $x = 0$ to $x = a$ in a time interval $t_0 $. Assume the motion of the particle can be expressed in the form $x(t) = A + B t + C t^2$. Find the values of $A, B$ and $C$ such that the action is a minimum.
I was thinking it can solved using Lagrangian rather than Hamilton. There's no frictional force.
$$L=\frac{1}{2}m\dot{x}^2+Fx$$
$$\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{x}}\right)-\frac{\partial L}{\partial x}=0\implies m\ddot{x}=F\implies \ddot{x}=\frac{F}{m}$$
Differentiate $x(t)$ twice. $$2C=\frac{F}{m}\implies C=\frac{F}{2m}$$
For finding B I was thinking to integrate $\ddot{x}$ once. $$\dot{x}=\int \ddot{x} \mathrm dt =\ddot{x}t$$
initial position is 0 so, not writing constant.
$$\dot{x}=\frac{F}{m}$$
Differentiate $x(t)$ once.
$$B+2Ct=\frac{F}{m}$$
$$\implies B=\frac{F}{m}-\frac{2Ft}{2m}=-\frac{Ft}{2m}$$
Again, going to integrate $\ddot{x}$ twice.
$$x=\iint \ddot{x} dt dt=\frac{\ddot{x}t^2}{2}$$
initial velocity and initial position is 0.
$$x=\frac{Ft^2}{2m}$$
$$A+Bt+Ct^2=\frac{Ft^2}{2m}$$
$$A=\frac{Ft^2+Ft-F}{2m}$$
According to my, I think that C is the minimum (I think B is cause, B is negative; negative is less than positive). And, A is maximum.
A person were saying that "It asked you to minimise the action; it told you the particle moved from $0$ to $a$ in time $t_0$; it gave you the equation of the trajectory."
In my work where should I put the interval?