Is there an accepted Lagrangian for the transport equation? Perhaps because it is so simple, I have not seen a lagrangian form of the transport equation
$$(\partial_t + a \partial_x)q = 0.$$
This equation is first order, which makes obtaining it from the Euler-Lagrange equation a bit tricky.
It would appear that the lagrangian $\frac{m}{2}q_{t}^2 + \frac{T}{2}q_{xt}$  yields $q_{tt} + \frac{T}{m}q_{xt}=0$, which in turn yields the transport equation with constant forcing
$$q_t + \frac{T}{m}q_x + c =0$$
after integrating with respect to $t$ (the constant c comes from here).
Alternatively we might consider the lagrangian $q^2(q_{tt} + q_{xx}) + q(q_t^2 + q_x^2)$, which via the Euler-Lagrange equations yields
$$-q_t^2  - q_x^2 = 0 $$
which factors into the two transport equations describing motion in opposite directions.
Is there some classic approach or equation that I am missing?
 A: OP considers the equation of motion (EOM)$^1$
$$(\partial_t + a \partial_x)\psi(x,t)~\approx~0\tag{1}$$

*

*By a linear coordinate transformation in spacetime we may assume$^2$ w.l.o.g. that $\partial_t + a \partial_x$ is $\partial_t$. This is a reminiscence of Aristotelian mechanics (AM), cf. this Phys.SE post.

OP is asking for a Lagrangian formulation of EOM (1).

*

*If $\psi$ is a complex variable then we can choose $${\cal L}~=~\psi^{\ast}(x,t)(\partial_t + a \partial_x)\psi(x,t).\tag{2}$$


*If a Lagrange multiplier field $\lambda(x,t)$ is allowed then we can choose $${\cal L}~=~\lambda(x,t)(\partial_t + a \partial_x)\psi(x,t).\tag{3}$$
--
$^1$ The $\approx$ symbol means equality modulo EOM.
$^2$ Boundary conditions could become more complicated.
A: I don't know of any  simple way to get the equation $(\partial_t+c\partial_t)\phi=0$ from an action principle.
I belive that the  best one can do is to use the action integral for a chiral boson field, which is usually taken to be
$$
S= \frac 12 \int dx dt\left( \pm \partial_x \phi \partial_t \phi - c(\partial_x \phi)^2\right).
$$ From this we get
$$
\delta S= \int \delta \phi(x,t) \left( \mp  \partial^2_{xt} \phi + c\partial^2_{xx}  \phi\right)dxdt,
$$
which gives
$$
\partial_x(\partial_t\pm c\partial x)\phi=0.
$$
The latter equation has solution $\phi(x,t) = f(x\mp ct)+h(t)$ where $f$ and $h$ are arbitrary.  The function  $h(t)$ is a kind of gauge ambiguity, and in the theory of chiral bosons physical variables are required to be things like  $\partial_x\phi $ which are insensitive to $h(t)$.
A: I may be wrong, but it seems to me, that lagrangian, satisfying this equation is not possible in principle, at least classically.
Consider the Euler-Lagrange equation:
$$
\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{x}}\right) -\frac{\partial L}{\partial x} = 0
$$
Note, that it is invariant under the time reversal $t \rightarrow -t$.
The advection equation is by itself not invariant under the time reversal. The Lagrangian, producing the wave equation incorporates right and left moving wave as well.
Higher order Lagrangians of form $L(x, \dot{x}, \ddot{x}, \ldots)$, will be invariant under the time reversal, because the signs in the $\frac{d}{dt}$ and $\ddot{x}$ will cancel each other.
