Euler-Lagrange equation problem For the following variational problem I have been told to show the Euler-Lagrange equation is identically zero.
$$L[u]:= \int_a^b \sin(u)u_x\,\mathrm dx $$
I have found it to be 
$u_x\cos(u)-\sin(u)u_{xx}=0.$
Is this correct? And if so, does this always equal $0$?
 A: No: write $F(t_1,t_2,t_3):=t_3\sin t_2$. Then $L(u)=\int_a^bf(t,u(t),u'(t))dt.$
Euler-Lagrange equation is $\partial_{2}F(t,u,u')=\frac d{dt}\partial_3F(t,u,u')$, hence
$$u'(t)\cos u(t)-\frac d{dx}\sin(u(t))=0, $$
which is always satisfied. 
A: Your equation of motion is not correct, you were already given the right one. But indeed your equation is trivially satisfied. That's because the Lagrangian itself is a total derivative, then the action 
$$L[q]=-\int_a^b\frac{d}{dt}\cos(q(t))\mathrm{d}t=cte.$$
does not depend on the path $q(t)$ but on the endpoints, which you held fixed. That is, as a variational  problem, it is trivial as any Lagrangian having the form $\mathcal{L}[q,t]=\dot{f}(q(t))$. Actually, Lagrangians are not uniquelly,  but defined up to those kind of terms. 
In higher dimensions the Lagrangians that mimic that in your question are 
$$\mathcal{L}[\phi]=\mathrm{d}{\phi}$$
for $\phi$ a (dim$M-1$)-form, so that, by Stokes theorem:
$$
S=\int_M\mathcal{L} =\int_M\mathrm{d}\phi =  \int_{\partial M} \phi
$$
If $M$ is boundaryless or $\phi$ is compactly supported, this term has trivial equations of motion $-$ no dynamics.
