I have this problem: I have a capacitor formed by two parallel square-shaped plates, of side $a$, and with distance $d$ between them. They're asking me out of other things, the magnetic force as a function of some things. I calculate de magnetic force by calculating the gradient of the magnetic energy, given by:
$$E=\frac{1}{2}\iiint_VB\cdot H\;dV$$
I have calculated $B$ and $H$, that form, during the charge of the capacitor, loops around the center proportional to $r$, being $r$ the distance from the central axis. The problem is that I have to integrate that to a cubic volume: $a^2d$, one of those variables is independent, but the other two are not, and this problems never involve complicated integrals, such that one: $$\int_0^a\int_0^a rdxdy$$ If the plates were circles it would be trivial, but being squares, I'm sure I'm missing something.