Problem understanding derivation of inhomogenous Maxwell's equation from its Lagrangian 
I got this part from QFT Demystified when the author is trying to derive Maxwell's equation from its Lagrangian density $\mathcal{L}=-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}-J^\mu A_\mu$. In this part, in order to go from the first to second line, the author used integration by parts and the fact that $F_{\mu\nu}=\partial_\mu A_\nu-\partial_\nu A_\mu$. However, I try to do the integration myself and got this:
$$-\frac{1}{4}(\delta F_{\mu\nu})F^{\mu\nu}=-\frac{1}{4}(\partial_\mu \delta A_\nu-\partial_\nu \delta A_\mu)F^{\mu \nu} \\ 
=-\frac{1}{4}\Big((\partial_\mu \delta A_\nu) F^{\mu \nu} -(\partial_\nu \delta A_\mu) F^{\mu \nu} \Big) \\
=-\frac{1}{4} \Big( (\delta A_\nu F^{\mu \nu} -( \partial_\mu F^{\mu \nu}) \delta A_\nu)-(\delta A_\mu F^{\mu \nu} -( \partial_\nu F^{\mu \nu}) \delta A_\mu)\Big)\\
=-\frac{1}{4}(\delta A_\nu F^{\mu \nu}-\delta A_\mu F^{\mu \nu})+\frac{1}{4}( \partial_\mu F^{\mu \nu} \delta A_\nu-\partial_\nu F^{\mu \nu} \delta A_\mu)$$
Where did the first part go? If I understand Einstein summation correctly, the whole thing was supposed to go scalar am I right? What are $\partial_\mu A_\nu$, $\partial_\mu \delta A_\nu$ or $\partial_\mu F^{\mu \nu}$ and $\partial_\nu F^{\mu \nu}$ exactly? I am confused :(.
 A: When you integrate by parts, the first term is evaluated at the endpoint of the integral, and the second term is integrated with the derivatives swapped. So it seems like in your line 3, the first and third terms should be evaluated at the endpoints of the implicit integral. The limits of the integral are probably infinity, where the field amplitude $F_{\mu\nu}$ is assumed to be zero.
A: Yes, ending up with terms that are no longer scalar is a good hint something didn't go right.
Let me write out one of the terms slightly different:
$$(\partial_\mu \delta A_\nu) F^{\mu \nu} = \partial_\mu (\delta A_\nu F^{\mu \nu}) - \delta A_\nu (\partial_\mu F^{\mu \nu})$$
Where all I have done is use the product rule for derivatives.  Now for a classical Lagrangian, a total derivative $\partial_\mu Q^\mu$ will not contribute to the equations of motion. So we can drop those terms. I believe this sequence is what the author means by "transferring the derivatives".
To see that a total derivative does not affect the equations of motion, we will need to look at the action, which is an integral of the Lagranian density. The total derivative term will then turn into just a boundary term.  You could argue it away by saying the boundary is far way and the fields go to zero there, which may be true. The more general argument is to say the variation is zero on the boundary. This would allow considering boundary conditions where the fields may not be zero, such as considering a system in an external magnetic field.
