Help with relativistic notation (Derivative of Lagrangian) I am trying to learn QFT, but I haven't taken a course in general relativity so the relativistic notation stuff is taking me a bit to get used to.  I do not understand how to do the following.
For a Lagrangian of..
\begin{equation}
\mathcal{L}=-\frac{1}{2}(\partial_{\mu}A_{\nu})(\partial^{\mu}A^{\nu})+\frac{1}{2}(\partial_{\mu}A^{\mu})^2
\end{equation}
We have...
\begin{equation}
\frac{\partial \mathcal{L}}{\partial(\partial_{\mu}A_{\nu})}=-\partial^{\mu}A^{\nu}+(\partial_{\rho}A^{\rho})\eta^{\mu\nu}
\end{equation}
I do not know how to get this (sorry if this is really simple!) So my immediate thinking is that the first term will be $-\frac{1}{2}(\partial^{\mu}A^{\nu})$. For the second term, I know there must be another $-\frac{1}{2}(\partial^{\mu}A^{\nu})$ to agree with the result shown, but I do not know how to do it.  I also know that I will probably have to raise/lower the indices to get the second term in the form I need. I just don't have a lot of experience doing this and need to see how it is done and the logic behind it. 
 A: It's really just index gymnastics. In the second term we have no $\nu$ index. To get one we insert the metric tensor $\eta^{\mu\nu}$ since we know $A^{\mu} = \eta^{\mu\nu}A_{\nu}$. The thing to remember is that the choice of indices is irrelevant as long as they are summed over (i.e. exist in upper-lower pairs) for example we could have just as easily said $A^{\mu} = \eta^{\mu\alpha}A_{\alpha}$. The metric tensor gives you the ability to obtain the desired indices in the right place. This is often necessary for instance if you want to define some new tensor quantity from existing ones (see for example, the energy momentum tensor in SR) and need the indices to agree on all sides.
So we can get the right indices in the right place with a judicious choice of metric tensor placement.
$\frac{1}{2}(\partial_{\mu}A^{\mu})^2 = \frac{1}{2}(\partial_{\mu}\eta^{\mu\nu}A_\nu)^2 = \frac{1}{2}(\eta^{\mu\nu}\partial_{\mu}A_\nu)^2$
$\eta^{\mu\nu}$ is just a matrix of constants so the derivative does not act on it.
So if we differentiate the last term we get 
$(\eta^{\mu\nu}\partial_{\mu}A_\nu)\eta^{\mu\nu}$
We want this to look like the answer but a potential confusion may arise which is whether we should act $\eta^{\mu\nu}$ on $\partial_{\mu}$ or $A_\nu$. In this case since $\eta^{\mu\nu}$ is symmetric, it won't matter and we will emerge with either 
$\partial^{\nu}A_{\nu}$ or $\partial_{\mu}A^{\mu}$. Now remember that the index in both of these expressions is irrelevant so we can simply call it $\rho$ instead. Further since these are both Lorentz scalars, the upper-lower choice is irrelevant and we get the desired result.
For the first term lets just expand the derivative so we have:
$-\frac{1}{2}(\partial^{\mu}A^{\nu} + \partial_{\mu}A_{\nu}\frac{\partial(\partial^{\mu}A^{\nu})}{\partial(\partial_{\mu}A_{\nu})})$
Now in the second term in this expression we can just exchange upper and lower indices because they are still being summed over
$-\frac{1}{2}(\partial^{\mu}A^{\nu} + \partial_{\mu}A_{\nu}\frac{\partial(\partial^{\mu}A^{\nu})}{\partial(\partial_{\mu}A_{\nu})}) = -\frac{1}{2}(\partial^{\mu}A^{\nu} + \partial^{\mu}A^{\nu}\frac{\partial(\partial_{\mu}A_{\nu})}{\partial(\partial_{\mu}A_{\nu})}) = -\partial^{\mu}A^{\nu} $
Sorry if this was pedantic but i hope it cleared a few things up.
