While doing a problem recently I realised I'm not clear about when derivatives inside integrals will cancel when working with tensors.
For example, I have come across integrals such as:
$\int \partial^\mu \varphi_\nu \ \mathrm{d}^4 x$
$\int \partial^\mu \varphi_\mu \ \mathrm{d}^4 x$
$\int \partial^\nu \varphi^\mu \partial_\nu \varphi_\mu \ \mathrm{d}^4 x$
$\int \partial^\mu \varphi^\nu \partial_\nu \varphi_\mu \ \mathrm{d}^4 x$
In many of these problems I initially suspected that the derivatives inside the integrals should cancel. However the more I thought about it, the more I convinced myself they wouldn't. For instance in the first integral, it seems like you would end up with:
$\int \partial^\mu \varphi_\nu \ \mathrm{d}^4 x=\int \varphi \ \mathrm{d}^3 x $
because only one integral cancels with the single, given derivative.
Similar reasoning made me think none of them cancel. However I then realised I'm not sure in what situation such cancellation WOULD occur.
It would be very helpful if someone could explain, with an example, when this cancellation does occur.