# Magnetic force on capacitor

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.

-
Are you sure you actually need to calculate the integrals? You may be able to leave them undetermined or in terms of numeric factors like $int_0^1\int_0^1 rdxdy$, particularly if you only want derivatives w.r.t. the plate spacing. – Emilio Pisanty Jan 20 '13 at 16:45
@EmilioPisanty But the derivative is not wrt, as I will need to calculate the gradient (it only depends on z coordinate, so I will have to calculate $\partial_zU_{magnetic}$. ¿Could you explain yourself a little more, please? – MyUserIsThis Jan 20 '13 at 16:53

You want to know $$\int_0^a\int_0^a rdxdy$$ with $$r=\sqrt{x^2+y^2}$$ via substitution $x=\alpha a$ and $y=\beta a$, you can bring it into the form $$a \int_0^1\int_0^1 \sqrt{\alpha^2+\beta^2}d\alpha d\beta.$$
For the remaining intgral, Wolfram alpha is your friend. With some more work you can show that in the exact result is $$\int_0^a\int_0^a rdxdy=\frac{a}{3}\left[\sqrt{2}+\log \left(1+\sqrt{2}\right)\right].$$