Derivative of the electromagnetic tensor invariant $F_{\mu\nu}F^{\mu\nu}$

Use a metric. Write F with upper indices as F with lower indices times the appropriate metric tensor summed over indices.

$$ F^{ab} = g^{ac}g^{bd}F_{cd} $$

If you are on flat Minkowski space-time then g is a constant diagonal matrix and need not be differentiated. If you are one a curved space-time then the partial of g will be required and there are ways to handle that.

Looking at the term that is causing an issue, on Minkowski space (flat space) the factors of g can be passed out of the derivative and then acted on the tensor outside the derivative to raise indices.


For your first question: the components of the metric don't depend on $\partial_\mu A_\nu$, or for that matter, anything at all. So we have, e.g. $$J^\mu \partial K_\mu = J^\mu \partial (\eta_{\mu\nu} K^\nu) = J^\mu \eta_{\mu\nu} \partial K^\nu = J_\nu \partial K^\nu = J_\mu \partial K^\mu$$ where $\partial$ stands for any kind of derivative whatsoever and $J$ and $K$ are arbitrary. The proof for your case is identical.

For your second question: simply do the same thing. Note that $$\frac{\partial J^\nu}{\partial J_\mu} = \frac{\partial (\eta^{\rho\nu} J_\rho)}{\partial J_\mu} = \eta^{\rho\nu}\frac{\partial J_\rho}{\partial J_\mu} = \eta^{\rho \nu} \delta^\mu_\rho = \eta^{\mu\nu}$$ where you can adapt this reasoning to your own example. After you do this a couple times, it becomes completely second nature, and you won't have to write out the steps. Everything works out exactly how you would expect, just "lining up the indices", $$\frac{\partial J^\nu}{\partial J_\mu} = \eta^{\mu\nu}, \quad \frac{\partial J^\nu}{\partial J^\mu} = \eta^{\nu}_\mu, \quad \frac{\partial J_\nu}{\partial J_\mu} = \eta_\nu^\mu, \quad \frac{\partial J_\nu}{\partial J^\mu} = \eta_{\mu\nu}$$ where, in order to write all four results the same way, I defined $\eta^\mu_\nu = \delta^\mu_\nu$.