RedX said:
If you have a Lagrangian of the form:
L=\phi \partial^2 \phi
how would you derive its equation of motion? All the books seem to say to treat this Lagrangian as if it were only a function of the field, and not derivatives of the field.
So to calculate this they seem to do a product rule:
\partial^2 \phi+\phi \partial^2=0
The latter term is somehow equal to the first term, so you get:
2\partial^2 \phi=0
Yes, if you gain some experience in these calculations, you can use such things as a shortcut. However, if this is all new to you I suggest that you try writing everything out explicitly to try and get some insight in what is happening. First of all, what you are calling a Lagrangian is actually a Lagrangian density,
\mathcal L = \phi \partial_\mu \partial^\mu \phi
(summation convention in use). This is however not a physical quantity, the relevant thing is the action,
S = \int d^4x \mathcal L.
This means that you are allowed to do partial integration and distribute the derivatives any way you like:
S = B_1 - \int d^4x (\partial_\mu\phi)(\partial^\mu\phi) = B_2 + \int d^4x (\partial_\mu \partial^\mu \phi) \phi
The B
1,2 are boundary terms, which are usually neglected (e.g. we assume that the field vanishes at the boundary of the integration; although sometimes we cannot make such assumptions or at least the boundary conditions are not trivial).
Anyway, hardly anyone derives the equations of motion directly from varying the Lagrangian; instead one usually takes the Euler-Lagrange equations
\frac{\partial L}{\partial \phi} - \partial_\mu \frac{\partial L}{\partial (\partial_\mu\phi)} = 0
as a starting point. You should have seen this equation in a course on classical mechanics, if not, look it up somewhere (for example in Fowles & Cassiday's "Analytical Mechanics"). This equation is very important and very useful, and if you are going to do this kind of calculations more often you should derive them yourself at least once. In your case, if you do the partial integration once, you get
\mathcal L = -(\partial_\mu \phi)(\partial^\mu \phi) = - \eta^{\mu\nu} (\partial_\mu\phi)(\partial_\nu\phi).
This does not depend on \phi but it depends on \partial_\mu\phi. Let me rename the dummy summation index:
\mathcal L = - \eta^{\rho\sigma} (\partial_\rho\phi)(\partial_\sigma\phi).
If you do the differentiation, you will have to use the product rule and take into account that
\frac{\partial_\lambda \phi}{\partial_\mu\phi} = \delta_\lambda^\mu;
then in the end you will find for the equations of motion
0 - \partial_\mu( 2 \partial^\mu\phi) = -\partial^2 \phi = 0.
(Again, I urge you to do the calculation and write out
all the steps; it's actually quite wonderful how it all fits together).
RedX said:
Is this generally true, that if you have some scalar operator D sandwiched between two fields:
L=\phi D \phi
then the EOM is:
2 D \phi=0 ?
Yes, this is generally true and if D is an order 2 differential operator, like \partial^2\phi, then you can easily prove this by varying \phi \to \phi + \delta\phi (where \delta\phi^2 = 0) and doing some partial integrations. In fact there is a whole theory using so-called Greens functions, which can be applied to such cases. If you take a good course on quantum field theory, you will be taught about them (actually I first learned about them in a course called "topics in mathematical physics"). However, until you acquire some fluency doing these calculations I suggest sticking to the Euler-Lagrange formalism (derive the Euler-Lagrange equations so you don't have to vary the action every time you get a Lagrangian) so you can see in each case how the equations of motion appear.