Field theory Euler-Lagrange problem term Consider the following Lagrangian (density)
$$
\mathcal{L} = (\mu/2) (\partial_t q)^2 - (Y/2)  (\partial_x q)^2 -\alpha(\partial_x{}^2 q)^2
$$
$\mu, Y, \alpha, q$ are respectively mass/unit length, Young modulus, coupling, and position coordinate. Context: first foray into field theory via Goldstein chapter 13
In an effort to write the Euler-Lagrange equations of motions, I've run into trouble with the
$$
\frac{\partial \mathcal{L}}{\partial q}
$$
term in the EL eom. Naively (apparently), I thought this term wouldn't contribute to the eom, but it does. It apparently yields:
$$
-2 \alpha \partial_x{}^4 q
$$
Can I have some help with this?
My only thought on how to get a q explicitly from that $-\alpha(\partial_x{}^2 q)^2$ term was to write it as a boundary term as follows
\begin{eqnarray}
(\partial_x{}^2 q)^2 &=& \partial_x{}^2 q \cdot \partial_x{}^2 q  \\
&=& \partial_x{}^2(q \cdot \partial_x{}^2 q) - q \cdot \partial_x{}^4 q
\end{eqnarray}
gets me the $\partial_x{}^4 q$ I like but I'm not sure what else it gets me.
 A: A better way to do variations in Lagrangian field theory, and indeed this is essentially the way it is done within high energy theory, is to not worry about writing a generic formula like we are used to in point particle mechanics. Though this can be done, it's often simpler to actually define the functional derivative
$$
\frac{\delta}{\delta\phi(x)}
$$
where $\phi(x)$ is the value of the field(s) evaluated at the spacetime point $x$ (no need to separate space and time in this formalism, though we can). With this, we define
$$
\frac{\delta\phi(y)}{\delta\phi(x)}=\delta(x-y)
$$
where $\delta(x-y)$ is a Dirac delta of appropriate dimension. Note that this definition can be viewed as the continuous version of the vector calculus expression
$$
\frac{\partial x_i}{\partial x_j}=\delta_i^j.
$$
With this definition in hand, we are free to express the equations of motion always as
$$
\frac{\delta S}{\delta\phi(x)}=0.
$$
So for example,
$$
\frac{\delta}{\delta\phi(x)}\int d y\frac{1}{2}\partial_\mu\phi(y)\partial^\mu\phi(y)=\int dy\partial_\mu\phi(y)\partial^\mu\delta(x-y)=-\partial^2\phi(x).
$$
Setting this to zero we would find the equation of motion for a massless scalar field.
In case you're curious though, we can write out the generalization of the Euler-Lagrange equations by
$$
\frac{\delta S}{\delta\phi(x)}=\int dy\frac{\delta L[\phi](y)}{\delta \phi(x)}=\int dy\left(\frac{\partial L}{\partial \phi}\delta(x-y)+\frac{\partial L}{\partial(\partial_\mu\phi)}\partial_\mu\delta(x-y)+\frac{\partial L}{\partial(\partial_\mu\partial_\nu\phi)}\partial_\mu\partial_\nu\delta(x-y)+\cdots\right)
$$
which upon sufficient integration by parts implies
$$
\frac{\delta S}{\delta \phi(x)}=\frac{\partial L}{\partial \phi}-\partial_\mu\frac{\partial L}{\partial(\partial_\mu\phi)}+\partial_\mu\partial_\nu\frac{\partial L}{\partial(\partial_\mu\partial_\nu\phi)}+\cdots.
$$
Setting this to zero would then be the field theoretic version of the Euler-Lagrange equations. The greatest advantage of this approach is that it reduces the entire problem to the application of sufficient chain rule and integration by parts.
As an exercise, you might try working out the point particle Euler-Lagrange equations using this approach. This also makes it easy to incorporate arbitrary derivative orders in the Lagrangian.
For the particular term asked about in the question, $-\alpha (\partial_x^2 q)^2$ we may apply this formalism directly. Observe
$$
-\alpha\frac{\delta}{\delta q(y)}(\partial^2_x q(x))^2=-2\alpha(\partial^2_x q)\partial^2_x\delta(x-y)=-2\alpha\delta(x-y)\partial^4_xq(x)+\partial_x(stuff\cdot \delta(x-y))
$$
so upon integrating to form a term in the action, we obtain
$$
-2\alpha\partial_y^4 q(y),
$$
which is the term that Goldstein obtains from the variation as OP mentions.
