The electromagnetic field tensor is given by $F_{\mu \nu} = \partial_{\mu}A_{\nu} - \partial_{\nu}A_{\mu}$, and it appears in the Lagrangian as $$L = -\frac{1}{4}F_{\mu\nu}^2 - A_{\mu}J_{\mu}.$$ Schwartz's QFT textbook says that (chapter 8, page 116) $$F_{\mu\nu}^2 = 2(\partial_{\mu}A_{\nu})^2 - 2(\partial_{\mu}A_{\mu})^2,$$ but I do not see how that is correct.
The first step of the expansion gives $F_{\mu\nu}^2 = (\partial_{\mu}A_{\nu})^2 - \partial_{\mu}A_{\nu}\partial_{\nu}A_{\mu} - \partial_{\nu}A_{\mu}\partial_{\mu}A_{\nu} + (\partial_{\nu}A_{\mu})^2$, and I see that the first and last term add up to produce $2(\partial_{\mu}A_{\nu})^2$. However, the second term $\partial_{\mu}A_{\nu}\partial_{\nu}A_{\mu}$ when expanded has a term like $\partial_{0}A_{1}\partial_{1}A_{0}$, and I don't see how this is present in $(\partial_{\mu}A_{\mu})^2 = (\partial_{0}A_{0} + \partial_{1}A_{1} + \partial_{2}A_{2} + \partial_{3}A_{3})^2$.