Why are you allowed to omit the $V^2$ term in the non-inertial frame? I'm trying to find trying to find the Lagrangian and Hamiltonian for a particle in a non-inertial frame, but when I try to do so, I always get a quadratic term, which textbooks like Landau & Lifshitz vol. 1 ignore for a reason I will specify later. Here's what I have:
The Lagrangian in the inertial frame is
$$L = \frac12 m \mathbf{\dot{r}}^2 - U(\mathbf{r})$$
This means, that in the tranformation to a non-inertial frame, where $\mathbf{v}=\mathbf{v'}+\mathbf{V}(t)$,
then we have
\begin{align}
L &=\frac12 m (\mathbf{\dot{r'}}+\mathbf{V})^2 - U(\mathbf{r'})\\
&=\frac12 m \mathbf{\dot{r'}}^2 + \frac12 m\mathbf{V}^2 + m\mathbf{\dot{r'}}\cdot\mathbf{V} - U(\mathbf{r'})
\end{align}
Landau & Lifshitz says the following though:

"$\mathbf{V}^2(t)$ is a given function of time, and can be written as the total derivative with respect to $t$ of some other function; the [$\frac12 m \mathbf{V}^2$] term can therefore be omitted."

Could someone explain this logic to me? I don't see the connection.
 A: *

*It is important that the velocity ${\rm V}(t)$ of the reference frame is a given/prescribed external parameter (as opposed to an active dynamical variable) of the theory. We can then consistently view $\frac{m}{2}{\bf V}^2(t)$ as a total time-derivative. See also e.g. this related Phys.SE post.


*L&L are next relying on the fact that the Euler-Lagrange (EL) equations are not changed if the Lagrangian is changed by a total time derivative, cf. e.g. this Phys.SE post.
A: 
The Lagrangian in the inertial frame is
$$L = \frac12 m \mathbf{\dot{r}}^2 - U(\mathbf{r})$$


... in the transformation to a non-inertial frame... we have
\begin{align}
L &=\frac12 m \mathbf{\dot{r'}}^2 + \frac12 m\mathbf{V}^2 + m\mathbf{\dot{r'}}\cdot\mathbf{V} - U(\mathbf{r'})
\end{align}
Landau & Lifshitz says the following though:


"$\mathbf{V}^2(t)$ is a given function of time, and can be written as the total derivative with respect to $t$ of some other function; the [$\frac12 m \mathbf{V}^2$] term can therefore be omitted."


Could someone explain this logic to me?

In general, if $F=F(q,t)$, we have
$$
\dot F = \frac{dF}{dt} = \frac{\partial F}{\partial q}\dot q + \frac{\partial F}{\partial t}\;,
$$
which means that
$$
\frac{\partial \dot F}{\partial \dot q} = \frac{\partial F}{\partial q}\;.
$$
If we have two Lagrangians that differ by the total time derivative of F:
$$
\bar L = L + \frac{dF}{dt}\;,
$$
then the equations of motion derived from $\bar L$ and $L$ are the same, since
$$
\frac{\partial \bar L}{\partial \dot q} = \frac{\partial L}{\partial \dot q} + \frac{\partial \dot F}{\partial \dot q} = \frac{\partial L}{\partial \dot q} + \frac{\partial F}{\partial q}
$$
and
$$
\frac{\partial \bar L}{\partial q} = \frac{\partial L}{\partial q} + \frac{\partial \dot F}{\partial q} = \frac{\partial L}{\partial q} + \frac{d}{dt}\frac{\partial F}{\partial q}\;.
$$
Such that:
$$
\frac{\partial \bar L}{\partial q} - \frac{d}{dt}\frac{\partial \bar L}{\partial \dot q} = \frac{\partial L}{\partial q} + \frac{d}{dt}\frac{\partial F}{\partial q} - \frac{d}{dt}\left(\frac{\partial L}{\partial \dot q} + \frac{\partial F}{\partial q}\right)
$$
$$
=
\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot q} + \frac{d}{dt}\frac{\partial F}{\partial q} - \frac{d}{dt}\frac{\partial F}{\partial q}
$$
$$
=
\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot q} 
$$

For the more specific case of interest here, $F=F(t)$, is only a function of time (not a function of $q$ and $t$):
$$
F(t) = \int^t dt' \frac{m}{2}V^2(t')
$$
The relation
$$
\frac{\partial \dot F}{\partial \dot q}=\frac{\partial F}{\partial q}
$$
still holds, but is trivial in this case, since both sides of the equation are zero. Nevertheless, since the equation still hold the equations of motion derived from $\bar L$ and $L$ are the same.

Even more specifically, for the case of interest here (note, I write q instead of OP's r', and I write $\bar L$ instead of OP's $L$):
$$
\bar L = L + \frac{dF}{dt} =\frac12 m \mathbf{\dot{q}}^2 + m\mathbf{\dot{q}}\cdot\mathbf{V} - U(\mathbf{q})
+ \frac12 m\mathbf{V}^2 
$$
$$
L = \frac12 m \mathbf{\dot{q}}^2 + m\mathbf{\dot{q}}\cdot\mathbf{V} - U(\mathbf{q})
$$
$$
\frac{\partial \bar L}{\partial \mathbf{q}} = -\nabla U
$$
$$
\frac{\partial L}{\partial \mathbf{q}} = -\nabla U
$$
$$
\frac{\partial \bar L}{\partial \mathbf{\dot q}} 
= m \mathbf{\dot q} + m\mathbf{V}
$$
$$
\frac{\partial L}{\partial \mathbf{\dot q}}
= m \mathbf{\dot q} + m\mathbf{V}
$$
So, regardless of whether you work with $L$ or $\bar L$ you end up with the equations of motion:
$$
m \mathbf{\ddot q} + m\mathbf{\dot V} = -\nabla U\;.
$$
