Maxwell equations as Euler-Lagrange equation without electromagnetic potential In (mathematical) physics many equations of motion can be interpreted as Euler-Lagrange (EL) equations. The Maxwell equation for electromagnetic (EM) field (say in vacuum and in absence of charges) seems to me quite unusual in comparison to examples known in classical mechanics. This is a system of first order PDE on 6 components of EM field. To get the Lagrangian density, one takes the first pair of the Maxwell equations and deduces from it existence of electromagnetic potential. Substituting the potential into the second pair of Maxwell equations, one gets second order equations for the potential. They can be presented as EL-equations for the potential.
I am wondering if there is a way to present the Maxwell equations as an EL-equation in terms of electromagnetic field only rather than potential.
I think I can prove that this is impossible if one requires in addition that the Lagrangian density is quadratic in fields and their first derivatives and invariant under the Poincare group.
ADDED 1: By the Maxwell equations I mean
$$\operatorname{div}\vec B=\operatorname{div} \vec E=0,\, \operatorname{rot}\vec E=-\frac{1}{c}\dot{\vec B},\, \operatorname{rot}\vec B=\frac{1}{c}\dot{\vec E}.$$
Thus I am looking for a Lagrangian depending on $\vec E,\vec B$ as independent fields and their derivatives such that the EL-equation is equivalent to all these equations.
ADDED 2: Let me reformulate my question on the language of some of the answers and comments below. The standard approach to interpret Maxwell equations as EL-equation in electrodynamics is as follows. One selects out of 8 Maxwell equations four equations and declares them to be constrains, and the other four - equations of motions. One considers the variations of the action functional $\int L$ only in the class of electromagnetic fields $(\vec B,\vec E)$ satisfying the constrains. Its extrema recover the four equations of motion. This separation of the Maxwell equations into two halves seems to me to be artifical and different from all other examples I know. I am wondering if there is a way to consider all 8 Maxwell equations on equal footing for this purpose.
 A: The nature of the Maxwell equations (including their Lagrangian aspects) can be clarified by viewing these equations as part of a larger family of classical field theories in physics.  For simplicity I will focus on just four theories here:

*

*Vacuum classical Yang-Mills theory;

*Abelian vacuum classical Yang-Mills theory with gauge group $U(1)$, aka the vacuum Maxwell equations;

*The vacuum Einstein equations;

*The vacuum linearised Einstein equations.

However one could vastly generalise the discussion if desired, by adding a source matter term to any of these equations, or by coupling with other field theories to obtain such classical field theories as Maxwell-Klein-Gordon, Maxwell-Chern-Simons, Einstein-Maxwell, Yang-Mills-Higgs, Einstein-Vlasov, nonlinear sigma fields (wave maps), etc..  One can also similarly discuss quantum field theories but I will not attempt to do so here.
These equations all describe the dynamics of one or more underlying geometric objects, expressible in local coordinates by tensors (which I will call the primary fields):

*

*For Yang-Mills the primary field is the connection one-form $A_\alpha$ (whose components take values in a Lie algebra ${\mathfrak g}$).

*For Maxwell the primary field is the vector potential $A_\alpha$ (whose components take values in ${\bf R}$).

*For Einstein the primary field is the metric $g_{\alpha \beta}$.

*For linearised Einstein the primary field is the metric perturbation $h_{\alpha \beta}$.

For coupled systems one could have more than one primary field, but here we focus on simpler models in which there is just one primary field in each theory.  From this primary field one can then create some secondary fields:

*

*For Yang-Mills one can form the curvature tensor $F_{\alpha \beta} = \partial_\alpha A_\beta - \partial_\beta A_\alpha + [A_\alpha, A_\beta]$ (normalisation conventions can vary from author to author here).

*For Maxwell one can form the electromagnetic field $F_{\alpha \beta} = \partial_\alpha A_\beta - \partial_\beta A_\alpha$.

*For Einstein one can form the Christoffel symbols $\Gamma_{\alpha \beta}^\gamma = \frac{1}{2} g^{\gamma \delta} (\partial_\beta g_{\gamma \alpha} + \partial_\alpha g_{\gamma \beta} - \partial_\gamma g_{\alpha \beta})$ and the Riemann curvature tensor $R_{\alpha \beta \gamma}^\delta = \partial_\beta \Gamma_{\alpha \gamma}^\delta - \partial_\alpha \Gamma_{\beta \gamma}^\delta + O(\Gamma^2)$ (where I omit the precise nature of the quadratic term $O(\Gamma^2)$ for simplicity).

*For linearised Einstein one can form the linearised Christoffel symbol $\Gamma_{\alpha \beta}^\gamma = \frac{1}{2} \eta^{\gamma \delta} (\partial_\beta h_{\gamma \alpha} + \partial_\alpha h_{\gamma \beta} - \partial_\gamma h_{\alpha \beta})$ and the linearised Riemann curvature tensor $R_{\alpha \beta \gamma}^\delta = \partial_\beta \Gamma_{\alpha \gamma}^\delta - \partial_\alpha \Gamma_{\beta \gamma}^\delta$.

These secondary fields are not unconstrained, but by their definition obey various Bianchi-type identities (as well as some symmetry and antisymmetry identities not mentioned here):

*

*For Yang-Mills one has the Bianchi identity $D_\alpha F_{\beta \gamma} + D_\beta F_{\gamma \alpha} + D_\gamma F_{\alpha \beta} = 0$, where $D_\alpha = \partial_\alpha + [A_\alpha,]$ is the covariant derivative.

*For Maxwell one has the Gauss-Faraday law $\partial_\alpha F_{\beta \gamma} + \partial_\beta F_{\gamma \alpha} + \partial_\gamma F_{\alpha \beta} = 0$.

*For Einstein one has the second Bianchi identity $\nabla_\alpha R_{\beta \gamma \delta}^\sigma + \nabla_\beta R_{\gamma \alpha \delta}^\sigma + \nabla_\gamma R_{\alpha \beta \delta}^\sigma = 0$.

*For linearised Einstein one has the linearised second Bianchi identity $\partial_\alpha R_{\beta \gamma \delta}^\sigma + \partial_\beta R_{\gamma \alpha \delta}^\sigma + \partial_\gamma R_{\alpha \beta \delta}^\sigma = 0$.

These identities are best thought of as geometric identities rather than true laws of motion, despite the fact that some components of these equations would involve a time derivative when viewed in standard coordinate systems.  (All of these Bianchi identities can be derived mathematically from the Jacobi identity $[\nabla_\alpha,[\nabla_\beta, \nabla_\gamma]] + [\nabla_\beta,[\nabla_\gamma,\nabla_\alpha]] + [\nabla_\gamma,[\nabla_\alpha,\nabla_\beta]]=0$ applied to the covariant derivative $\nabla_\alpha$ that is naturally associated to the field theory.)  In the case of Maxwell and linearised Einstein, the Bianchi-type identities can be expressed purely in terms of secondary fields, but in general we see that the Bianchi identities involve both primary and secondary fields.
To each of these field theories one can associate a Lagrangian which is typically expressed in terms of both primary and secondary fields:

*

*For Yang-Mills the functional is $\frac{1}{2} \int F^{\alpha \beta} \cdot F_{\alpha \beta}\ d\eta$ (using an invariant inner product on ${\mathfrak g}$, and with $d\eta$ denoting the Minkowski volume form).

*For Maxwell the functional is $\frac{1}{2} \int F^{\alpha \beta} F_{\alpha \beta}\ d\eta$.

*For Einstein the functional is the Einstein-Hilbert action $\frac{1}{2} \int R\ dg$ ($R = g^{\alpha \beta} R_{\alpha \gamma \beta}^\gamma$ being the scalar curvature).

*For linearised Einstein the functional is the quadratic component of the Einstein-Hilbert action applied to an infinitesimal perturbation $g = \eta + \varepsilon h$; it has a moderately complicated form, see e.g., equations (6), (7) of this paper of Menon.

One can express these Lagrangians purely in terms of the primary field by expanding every appearance of a secondary field in terms of primary fields.  In the case of Yang-Mills and Maxwell one can also express the functional purely in terms of secondary fields, but this is a fluke that is not expected to occur for more general field equations.
By varying these functionals with respect to the primary fields (or with respect to the secondary fields using the Bianchi-type identities as constraints that produce Lagrange multipliers, in the cases where those Bianchi identities can be expressed purely in terms of secondary fields), one obtains the equations of motion as Euler-Lagrange equations:

*

*For Yang-Mills the equations of motion are $D^\alpha F_{\alpha \beta} = 0$.

*For Maxwell the equations of motion are the Gauss-Ampere law $\partial^\alpha F_{\alpha \beta} = 0$.

*For Einstein the equations of motion are $R_{\alpha \beta \gamma}^\beta - \frac{1}{2} R g_{\alpha \gamma} = 0$.

*For linearised Einstein the equations of motion are $R_{\alpha \beta \gamma}^\beta - \frac{1}{2} R \eta_{\alpha \gamma} = 0$ (with $R = \eta^{\alpha \beta} R_{\alpha \gamma \beta}^\gamma$ being the linearised scalar curvature).

In the latter three cases one can express the equations of motion purely in terms of secondary fields, but again this is something of a fluke that should not be expected in general (particularly when working with nonlinear theories). Note that in all four cases the insertion of matter into the theory would add a matter term to the Lagrangian and thus a source term to the equations of motion, but would not affect the geometric Bianchi-type identities, which highlights a key difference between the equations of motion and the Bianchi-type identities.
In all of these cases, there is also a gauge invariance that prevents one from observing the primary fields directly.

*

*For Yang-Mills, one can replace the connection $A_\alpha$ by the gauge-equivalent connection $U A_\alpha U^{-1} - (\partial_\alpha U) U^{-1}$ without affecting the physical observables.

*For Maxwell, one can similarly replace the vector potential $A_\alpha$ by the gauge-equivalent potential $A_\alpha + \partial_\alpha \lambda$ without affecting the physical observables.

*For Einstein, one can apply a diffeomorphic change of coordinates to spacetime and to the metric $g^{\alpha \beta}$ without affecting the physical observables (the general principle of relativity).

*For linearised Einstein, one can replace the metric perturbation $h_{\alpha \beta}$ by $h_{\alpha \beta} + \partial_\alpha X_\beta + \partial_\beta X_\alpha$ for any vector field $X^\alpha$ (which can be viewed as a linearised (or infinitesimal) diffeomorphism) without affecting the physical observables.

Because of this gauge invariance, it is initially tempting in all four cases to try to ignore the primary field as much as possible and try to formulate the physics in terms of the secondary fields (which tend to be much more directly physically measurable, being less affected by gauge transforms).  However, despite the fact that in some cases the primary field can indeed be expunged from the equations of motion and/or the Lagrangian, there is no a priori reason why the geometric Bianchi-type identities should then be subsumed into the Euler-Lagrange equations (though one can always do so artificially, as explained in my other answer).  The fact that the Bianchi identities and the equations of motion look so similar in the case of Maxwell's equations (when specialised to 3+1 spacetime dimensions) is a misleading red herring; once one sees how things work for all the other field equations one sees that these two systems of equations should really be treated as being of a very different nature.
A: Here is a very simple Lagrangian that yields the Maxwell equations upon variation, taken from this post (also by me) on physics.SE. The trick is to introduce Lagrange multipliers.
Let
\begin{equation}
S[\chi,\tilde\chi,F,\tilde F]\overset{\mathrm{def}}=\int
\chi_\nu(\partial_\mu F^{\mu \nu} - J^\nu)+ 
\tilde{\chi}_\nu(\partial_\mu \tilde{F}^{\mu \nu} - \tilde{J}^\nu)\mathrm dx
\end{equation}
Variations with respect to $\chi$ and $\tilde \chi$ give you the Maxwell equations. Variation with respect to $F$ and $\tilde F$ give you
\begin{equation}
\partial_{[\mu}\chi_{\nu]}=\partial_{[\mu}\tilde\chi_{\nu]}=0
\end{equation}
The equations for $F,\tilde F$ and those for $\chi,\tilde \chi$ are decoupled so you can forget about the latter. The standard Maxwell equations are obtained by also taking the magnetic current to vanish, $\tilde J=0$. The general case with $\tilde J\neq0$ also allows the existence of magnetic monopoles, a fascinating subject itself.
This trick (and variations thereof) is used in proving $S$-duality of Maxwell's theory, and generalizations e.g. in Seiberg-Witten theory.
A: The actual number of degrees of freedom of the electromagnetic field is 2, per point in 3-dimensional space. One can see this starting from the formulation in terms of potentials, which feature 4 components per point. Gauge invariance allows one to choose, for example, the axial gauge $A_3 =0$, reducing the number of components to 3; then, one furthermore sees that $A_0 $ is not in fact a dynamical degree of freedom, since the conjugate momentum vanishes (there is no time derivative of $A_0 $ in the Lagrangean). In effect, $A_0 $ acts as a Lagrange multiplier enforcing the constraint $\vec{\nabla } \cdot \vec{E} =0$. Indeed, one physically sees electromagnetic waves with only 2 polarization degrees of freedom.
Now, the formulation in terms of electromagnetic fields $\vec{E} $, $\vec{B} $ formally features 6 components per point, so these must be viewed as constrained variables, with 4 constraints. And indeed, stating that the electromagnetic fields are components of a closed 2-form is the most economical and symmetric way of stating such 4 constraints, as discussed by Denis Serre.
If we insist on keeping all 6 variables, as opposed to eliminating 4 of them by choosing a minimal, unconstrained set of generalized coordinates, then we need to implement the constraints using 4 Lagrange multiplier fields. In that respect, electromagnetism isn't quite that exceptional, compared to classical mechanics. Even if we tend to discuss mechanical examples in the Lagrange formalism of the second kind, since that is the most economical, of course also the Lagrange formalism of the first kind is available and instructive. So,
while we don't need the full 8 auxiliary fields introduced by AccidentalFourierTransform, we do need 4 Lagrange multiplier fields for the electromagnetic case.
And that is the point where we perhaps shouldn't let aesthetics get in the way: Returning for a moment to the formulation in terms of vector fields, one actually only has to introduce one new Lagrange multiplier field in addition to the 4 vector field components $A_{\mu } $, namely, a Lagrange multiplier field, let's call it $\lambda $, implementing the gauge choice. The other Lagrange multiplier comes from among the original fields themselves - it is $A_0 $, as discussed above! Now, is there really a good reason to allow for the variable $A_0 $, but not the variable $\lambda $? What is the difference, beyond aesthetics? What if we renamed $A_0 $ into $\kappa $?
Analogously, in the case of the formulation in terms of $\vec{E} $ and $\vec{B} $, is it reasonable to object to the introduction of additional Lagrange multiplier fields? After all, there really are redundant components - electromagnetic waves have only 2 polarizations. However, if we accept that Lagrange multiplier fields are natural and necessary in such a situation, then the answer is the standard electromagnetic Lagrangean supplemented with the 2-form constraint introduced via Lagrange multipliers.
A: The answer to your question is in the paper below:
Anthony Sudbery (York U., England) Jul, 1985
A Vector Lagrangian for the Electromagnetic Field 1986 J. Phys. A: Math. Gen. 19 L33
A: Yes indeed, the Maxwell's equations are Euler-Lagrange equations. And this is quite interesting. Let me give here a presentation within Special Relativity, in which the light speed is set to $c=1$. The ambiant space is therefore a Minkowski space $\mathbb R^{1+3}$ with metric $dt^2-d{x_1}^2-d{x_2}^2-d{x_3}^2$. I restrict myself to the case of a vacuum.
The electromagnetic field is by definition a closed two-form $\Omega$. The components of the field can be retrieved, in a given coordinates frame, by
$$\Omega=\vec E\cdot dt\times dx+\vec B\cdot(dx\times dx).$$
The constraint $d\Omega=0$ writes
$$\partial_t\vec B+{\rm curl}_x\vec E=0,\qquad{\rm div}_x\vec B=0.$$
The rest of the Maxwell's equations are obtain by writing
$$\delta\int\int L(\Omega)dxdt=0,$$
still under the constraint that the variations of $\Omega$ are compatible with the closedness. Writing $L$ as a function of $(\vec B,\vec E)$, we obtain
$$\partial_t\vec D-{\rm curl}_x\vec H=0,\qquad{\rm div}_x\vec D=0,\qquad(\dagger)$$
where
$$\vec D=\frac{\partial L}{\partial\vec E},\qquad\vec H=\frac{\partial L}{\partial\vec B}.$$
An important point is that $L$ must be invariant under Lorentz transformation. This translates the following way: there exists a function $\ell$ of two scalar variables only, such that
$$L(\Omega)=\ell\left(\frac12(\vec E^2-\vec B^2),\vec E\cdot\vec B\right).$$
For instance, the choice $L=\frac12(\vec E^2-\vec B^2)$ yields the standard, linear Maxwell's equations (in which $D=E$ and $H=-B$).
The energy density is a partial Legendre transform,
$$W=\vec D\cdot\vec E-L.$$
The Poynting vector is $\vec E\times\vec H$. It also equals $\vec D\times\vec B$. The fact that both formulas give the same quantity is equivalent to the Lorentz invariance.
Edit. Here are some of the details. The variational principle $\delta{\cal L}=0$, where ${\cal L}(\Omega)=\int\int L(\Omega)dxdt$, means that
$$\left.\frac{d}{d\epsilon}\right|_{\epsilon=0}\int\int L(\Omega+\epsilon\alpha)dxdt=0$$
for every closed $2$-form $\alpha$. Equivalently, we have
$$\left.\frac{d}{d\epsilon}\right|_{\epsilon=0}\int\int L(\Omega+\epsilon d\beta)dxdt=0$$
for every $1$-form (say smooth, compactly supported) $\beta$. Let us write $\beta=\phi dt-\vec A\cdot dx$, then $d\beta=(\partial_t\vec A+\nabla\phi)\cdot dt\times dx+{\rm curl}\vec A \cdot dx\times dx$. We therefore have
$$\int\int(\vec H\cdot{\rm curl}\vec A+\vec D\cdot(\partial_t\vec A+\nabla\phi))dxdt=0$$
for every test function $\phi$ and field $\vec A$. This gives $\partial_t\vec D-{\rm curl}\vec H=0$ and ${\rm div}\vec H=0$.
Edit. In a recent paper, I explore a variant of the variational principle, in which the admissible variations run over the same class as $\Omega$, modulo pullback composition by a diffeomorphism: $\delta\Omega=\Omega-\phi^*\Omega$. This is narrower than the additive perturbation considered above. The resulting equations ar interesting. We don't obtain the full ($\dagger$), but we do obtain the conservation of energy
$$\partial_tW+{\rm div}(\vec E\times\vec H)=0,$$
and that of momentum, which are perhaps more natural.
A: There is a trivial sense in which the answer is "yes": the solutions to the Maxwell equations are (formally, at least) the global minimisers to the functional
$$ \int\int |\mathrm{div} E|^2 + |\mathrm{div} B|^2 + |\mathrm{rot} E + \frac{1}{c} \dot{B} |^2 + |\mathrm{rot} B - \frac{1}{c} \dot{E} |^2\ dx dt.$$
I would suppose you consider this as cheating, but in order to rule this sort of degenerate answer out you would need to formulate your question with more mathematical precision.
