# Calculating motion of equation in tensor form

for the Lagrangian density $$\mathscr{L}=\frac{1}{2}(\partial_{\mu}A^{\mu})^2$$

how can I get this $$\frac{\partial{\mathscr{L}}}{\partial(\partial_{\mu}A_\nu)}=(\partial_\rho A^\rho)\eta^{\mu\nu}$$

or I can only get $\frac{\partial{\mathscr{L}}}{\partial(\partial_{\mu}A_\nu)}=\partial_\rho A^\rho$ but where the $\eta^{\mu\nu}$ comes from.

## 1 Answer

Writing $$\mathscr{L}=\frac{1}{2}(\partial_{\mu}A^{\mu})^2=\frac{1}{2}(\partial_{\mu}A_{\nu}\eta^{\mu\nu})^2$$ we can write $$\frac{\partial{\mathscr{L}}}{\partial(\partial_{\mu}A_\nu)}=\frac{1}{2}2(\partial_{\rho}A_{\sigma}\eta^{\rho\sigma})\eta^{\mu\nu}=(\partial_{\rho}A^{\rho})\eta^{\mu\nu} .$$