# Calculations with co- and contravariant formalism in QFT

i have another question regarding calculations with the co- and contravariant formalism in QFT. It is not that i don't understand all of this, but most of the time i'm missing some "middle" steps, i.e. when reading books and trying to recap the stuff.
One example is derivation of the Klein-Gordon-Equation from the Lagrangian for a scalar field: $$\mathcal{L} = \frac{1}{2} \left( \partial_\mu \phi \right) \left( \partial^\mu \phi \right) + \frac{1}{2} m^2 \phi^2$$
with help of the Euler-Lagrange-Formalism: $$\partial_\mu \left( \frac{\partial \mathcal{L}}{\partial \left( \partial_\mu \phi \right)} \right) - \frac{\partial \mathcal{L}}{\partial \phi} = 0.$$

1. My first question is, why i can write $$(\partial_\mu \phi)(\partial^\mu \phi) = \left( \partial_\mu \phi \right)^2~?$$ I know that co- and contravariants are related via a metric, but what exactly is the step inbetween? Or is it just a convention? If yes, why is $$\frac{\partial}{\partial (\partial_\mu \phi)} \left( \partial_\mu \phi \right)^2 = 2\partial^\mu \phi~?$$ Normally i would have lowered the second index in $$(\partial_\mu \phi)(\partial^\mu \phi)$$, used the product rule and $$\frac{\partial \partial_i \phi}{\partial \partial_\mu \phi} = \delta^\lambda_\mu$$ ($$i=\mu, \nu$$) to get the solution.

2. Now i have the Lagrangian of the electromagnetic field: $$\mathcal{L} = -\frac{1}{2} (\partial_\mu A_\nu)(\partial^\mu A^\nu) + \frac{1}{2}(\partial_\mu A^\mu)^2.$$ Again i could write $$(\partial_\mu A_\nu)(\partial^\mu A^\nu) = (\partial_\mu A_\nu)^2$$ and calculate the derivation. But how can i do the calculation using the product rule for this part? Is there a way of varying $$A_\mu$$ (like $$\phi$$) to get something similar to $$\frac{\partial \partial_i}{\partial \partial_\lambda} = \delta^\lambda_x~?$$
And how can i calculate the derivative of the last part $$(\partial_\mu A^\mu)^2$$ (Tongs QFT script says that it is $$(\partial_\rho A^\rho) \eta^{\mu \nu}$$)?

• Comment to the post (v2): Consider to only ask 1 question per post. Mar 20 at 13:47

Here is a Hint: start with a term of the Lagrangian density (I will not do the whole thing, I will just give you a feeling of it), say $$\mathcal{L}_0=(\partial_{\mu}A_{\nu})(\partial^{\mu}A^{\nu})=\eta^{\mu\alpha}\eta^{\nu\beta}(\partial_{\mu}A_{\nu})(\partial_{\alpha}A_{\beta})$$. Then, $$\frac{\delta \mathcal{L}_0}{\delta(\partial_{\rho}A_{\sigma})}= \eta^{\mu\alpha}\eta^{\nu\beta} \frac{\delta (\partial_{\mu}A_{\nu})}{\delta(\partial_{\rho}A_{\sigma})} (\partial_{\alpha}A_{\beta})+ \eta^{\mu\alpha}\eta^{\nu\beta}(\partial_{\mu}A_{\nu}) \frac{\delta (\partial_{\alpha}A_{\beta})}{\delta(\partial_{\rho}A_{\sigma})}$$ and then use $$\frac{\delta (\partial_{\alpha}A_{\beta})}{\delta(\partial_{\rho}A_{\sigma})}= \delta_{\alpha}^{\rho} \delta_{\beta}^{\sigma}$$ etc... Notice that I am indeed using the product rule!
• Ok, thanks. And for the second part $(\partial_\rho A^\rho)^2$ i would do it like $\frac{\partial ((\partial_\rho A^\rho)(\partial_\sigma A^\sigma))}{\partial (\partial_\mu A_\mu)}$ ? If so, i'm getting $\eta^{\mu \nu}( \partial_\rho A^\rho + \partial_\sigma A^\sigma )$. Now, i can relabel $\sigma$ to $\rho$, because it is a contraction? Mar 21 at 9:28
• The result seems okay, but it seems kind of awkward having in the denominator the same index repeated and both indices down (since they are the same one should be an upper index and the other should be a lower). So, I guess I shouldn't do it like this. I would introduce another index, i.e. differentiate wrt $\partial_{\mu}A_{\rho}$. Also, in the enumerator I would introduce a metric where there are repeated indices, so that I do not have repeated indices on the fields Mar 21 at 9:29
• Ok, this is a typo, it should be $\partial_\mu A_\nu$ in the denominator. Why is it ok to differentiate wrt $\partial_\mu A_\rho$ if $\rho$ is already used in the enumerator? And what do you mean with "metric where there are repeated indices"? In my calculation the next step in the enumerator is $(\partial_\rho A^\rho)(\partial_\sigma A^\sigma) = \eta^{\rho \alpha} \eta^{\sigma \beta} (\partial_\rho A_\alpha) (\partial_\sigma A_\beta)$. And than i can differentiate (introducing the $\delta$'s) to get my solution. Mar 21 at 9:44