Green's theorem
integrate over all space and apply Green's theorem.