If an Euler-Lagrange equation is satisfied by all diffeomorphisms, is it Null-Lagrangian? Let $B^n$ be the open unit ball in $\mathbb{R}^n$, and let 
$L:\mathbb{R}^{n^2} \times \mathbb{R}^n \times B^n \to \mathbb{R}$ be a smooth Lagrangian; Define $E:C^{\infty}(B^n,B^n) \to \mathbb{R}$ by
$$ E(u)=\int_{B^n} L\big(Du(x),u(x),x\big)dx.$$
Now, suppose that for every two balls $B_1,B_2 \subseteq B^n$ and for every diffeomorphism $f:B_1 \to B_2$, $f$ satisfies the Euler-Lagrangian equation of $E$.
Is it true that every smooth map $h:B^n \to B^n$ satisfies it?
i.e, is $L$ a null-Lagrangian?
My intuition is that since the E-L equation for a map $f$ is "smooth" in $f$, and we know it holds for all "small diffeomorphisms", we can perhaps approximate an arbitrary map (locally) via diffeomorphisms.
 A: $\def\R{\mathbb R}$Let $$J=J^2(B^n,B^n) = B^n \times B^n \times L(\R^n,\R^n) \times L(\mathrm{Sym}^2 \R^n,\R^n)$$ denote the space of $2$-jets from $B^n$ to itself. Given a $C^2$ map $u : B^n \to B^n$, we can define its prolongation $j^2u : B^n \to J$ by $$j^2u(x) = (x, u(x), Du(x), D^2u(x)).$$
I'm going to refer to the corresponding coordinates on the jet space by $(x,y,p,\xi).$ The Euler-Lagrange equation for $L$ can be written as $F \circ j^2 u = 0$ where $F : J \to \R^n$ is defined by $$ F^i = \frac{\partial L}{\partial y^i} - \left(\frac{\partial^2 L}{\partial p^i_j \partial x^j} + \frac{\partial^2 L}{\partial p^i_j \partial y^k}p^k_j + \frac{\partial^2 L}{\partial p^i_j \partial p^k_l} \xi^k_{lj}\right).$$
Note that smoothness of $L$ implies continuity of $F$. 
The point of all this is that whenever $u$ is a solution, we immediately know that $F$ is zero on the image of $j^2 u$. Now, given an arbitrary jet $q=(x,y,p,\xi) \in J$ such that $p$ is invertible, we can find$^1$ a diffeomorphism $u$ such that $j^2u(x) = q$; so the assumption that $u$ is a solution tells us that $F(q) = 0$. Since the set of invertible matrices is dense in $L(\R^n,\R^n)$, the set of such good jets $q$ is dense in $J$; and thus $F$ vanishes everywhere by continuity.
$^1$This point is slightly technical - see e.g. this question of mine, though I'm sure it's much easier in this case since $k=2$ and we're only on the ball.
