<s>[INST] Computing $\int_{-a}^a \int_{-b}^b \frac 1{(x^2 + y^2 +c^2)^{3/2}}\, dxdy$. The question is exactly as in the title: 

$$\int_{-a}^a \int_{-b}^b \frac 1{(x^2 + y^2 +c^2)^{3/2}}\, dxdy$$

It's been so long since the last time I tried to calculate something like this. I first thought about polar coordinates but that doesn't go well with the domain of integration.
What kind of substitution do we need for this kind of problem? I am sorry if similar problem has been asked, I just couldn't manage to find it.
 [/INST] Let
$$ F(c)=\int_{-a}^a\int_{-b}^b \frac {1}{(x^2 + y^2 +c^2)^{1/2}}dxdy $$
and then
$$ F'(c)=-c\int_{-a}^a\int_{-b}^b \frac {1}{(x^2 + y^2 +c^2)^{3/2}}dxdy $$
or
$$ \int_{-a}^a\int_{-b}^b \frac {1}{(x^2 + y^2 +c^2)^{3/2}}dxdy=-\frac{F'(c)}{c}. $$
Since
$$ \int\frac {1}{(x^2 + c^2)^{1/2}}dx=\ln(x+\sqrt{x^2+c^2})$$
one has
\begin{eqnarray*}
F(c)&=&\int_{-a}^a\ln(x+\sqrt{x^2+y^2+c^2})\bigg|_{x=-b}^{x=b}dy\\
&=&\int_{-a}^a\bigg[\ln(b+\sqrt{b^2+y^2+c^2})-\ln(-b+\sqrt{b^2+y^2+c^2})\bigg]dy.
\end{eqnarray*}
It is easy to see
$$ F'(c)=-2\int_{-a}^a\frac{bc}{(c^2+y^2)\sqrt{b^2+c^2+y^2}}dy=-2\arctan\bigg(\frac{by}{c\sqrt{b^2+c^2+y^2}}\bigg) \bigg|_{-a}^a=-4\arctan\bigg(\frac{ab}{c\sqrt{a^2+b^2+c^2}}\bigg)$$
and hence
$$ \int_{-a}^a\int_{-b}^b \frac {1}{(x^2 + y^2 +c^2)^{3/2}}dxdy=-\frac{F'(c)}{c}=\frac{4}{c}\arctan\bigg(\frac{ab}{c\sqrt{a^2+b^2+c^2}}\bigg). $$
</s>