The Euler-Lagrange equation in special relativity How can I derive the Euler-Lagrange equations valid in the field of special relativity? Specifically, consider a scalar field.
 A: General approach
First recall that Euler-Lagrange equations are conditions for the vanishing of the variation of action $S$. For a scalar field $\Phi$ with Lagrangian density $\mathcal L$ on some open subset U we have
$$S[\Phi] = \int_U {\mathcal L}(\Phi(x), \partial^{\mu}\Phi(x)) {\rm d}^4 x$$
Consider a variation of the field in direction $\chi$ and compute
$$S[\Phi + \varepsilon \chi] = \int_M {\mathcal L}(\Phi(x) + \varepsilon \chi(x), \partial^{\mu}(\Phi(x) + \varepsilon \chi(x))) {\rm d}^4 x$$
Then using Taylor expansion
$$S[\Phi + \varepsilon \chi] - S[\Phi] =
\int_U \left[ \varepsilon \chi(x) {\partial{\mathcal L} \over \partial \Phi}(\Phi(x), \partial^{\mu}\Phi(x)) +
 \varepsilon (\partial^{\mu} \chi(x)) {\partial{\mathcal L} \over \partial (\partial^{\mu} \Phi)}(\Phi(x), \partial^{\mu}\Phi(x)) + O(\varepsilon^2) \right] {\rm d}^4 x$$
Using integration by parts on the second term (assuming $\chi$ vanishes on $\partial U$), diving by $\varepsilon$ on both sides and letting $\varepsilon \to 0$ this becomes a variation in direction $\chi$
$$\delta S [\Phi][\chi] = \int_U \chi(x) \left[  {\partial{\mathcal L} \over \partial \Phi}(\Phi(x), \partial^{\mu}\Phi(x)) -
\partial^{\mu}\left( {\partial{\mathcal L} \over \partial (\partial^{\mu} \Phi)}(\Phi(x), \partial^{\mu}\Phi(x))\right) \right] {\rm d}^4 x$$
By requiring variations in all directions equal zero we obtain
$$ {\partial{\mathcal L} \over \partial \Phi} -
\partial^{\mu}\left( {\partial{\mathcal L} \over \partial (\partial^{\mu} \Phi)}\right) = 0 $$
(arguments the same as always, so omitted).
Massive scalar field example
Consider Lagrangian density $${\mathcal L} = {1 \over 2}\eta_{\mu \nu} \partial^{\mu} \Phi \partial^{\nu} \Phi - {1 \over 2} m^2 \Phi^2 $$
By using the E-L equations we have just derived we obtain Klein-Gordon equation.
$$ \eta_{\mu \nu} \partial^{\mu} \partial^{\nu} \Phi + m^2 \Phi = \square \Phi + m^2 \Phi = 0$$
