What is the gravitational force imposed by a rectilinear 2d body? I'm starting with the simplest problem I can relate to mine: the force imposed on a point mass at the origin by a rectangle that is orthogonal to the $x$- and $y$-axis, stretching from $(x_1, y_1)$ to $(x_2, y_2)$.
I'm using Newton's formula, but currently ignoring the mass and density.
I start off doing something like 

$\displaystyle\int\nolimits^{y_2}_{y_1}\int\nolimits^{x_2}_{x_1}\frac{1}{x^2 + y^2}dxdy$

Where $x^2+y^2$ equals the squared distance between $(x,y)$ and the origin.
This leads me to the following integral: 

$\displaystyle\int^{y_2}_{y_1}(\frac{1}{y}\arctan\frac{x_2}{y}) - (\frac{1}{y}\arctan\frac{x_1}{y})dy$

Is there a better way? I can't find any way to solve this.

I'm elaborating my comment.
Consider the rectangle $R:=[a,b]\times[c,d]$ with $0<a<b$ and $0<c<d$. The $x$-component $F_1$ of the force exerted by the rectangle at the origin is given by
$$F_1=\int\nolimits_R{x\over(x^2+y^2)^{3/2}} \> {\rm d}(x,y)=\int_c^d\int_a^b {x\over(x^2+y^2)^{3/2}} \>dx\>dy\ .$$
Here the inner integral has the value
$${-1\over (x^2+y^2)^{1/2}}\Biggr|_a^b ={1\over\sqrt{a^2+y^2}}-{1\over\sqrt{b^2+y^2}}\ .$$
Now the outer integral can be expressed in terms of $\ {\rm arsinh}{y\over a}\ $ resp. $\ {\rm arsinh}{y\over b}$ for $y=c$ and $y=d$. I leave the details to you.
