<s>[INST] Analytical evaluation of double integral I'm looking to evaluate the following integral:
$$\int^a_{-a}\int^a_{-a}\frac{\sqrt{x^2+y^2}}{4a^2} \,\mathrm{d}x \mathrm{d}y,$$
where $a> 0$.
Mathematica gives the following answer:
$$ \frac{a}{3} (\sqrt{2} + \sinh^{-1}(1)).$$
This goes well beyond my basic calculus 101 training.
Is anybody able to give me a step-by-step analytical solution?
Regards
 [/INST] $$
\frac 1 {4a^2} \int^a_{-a}\int^a_{-a} \sqrt{x^2+y^2} \, dx \, dy = \text{what?}
$$
$$
\int_{-a}^a (\text{an even function}) = 2\times\int_0^a (\text{the same function}), \text{ so}
$$
\begin{align}
& \int_{-a}^a \sqrt{x^2+y^2} \  dx = 2\int_0^a \sqrt{x^2+y^2}\  dx = 2\int_0^{\arctan a} \sqrt{y^2\tan^2\theta + y^2} (\sec^2\theta\,d\theta) \\[10pt]
= {} & 2|y| \int_0^{\arctan a} \Big(\sec\theta\Big) (\sec^2\theta\,d\theta) = 2|y| \int_0^{\arctan a} \sec^3\theta\,d\theta.
\end{align}
This is one of the more challenging among freshman-level integrals. This article tells us how to find that
$$
\int \sec^3\theta\,d\theta = \frac 1 2 \sec\theta\tan\theta + \frac 1 2 \log|\sec\theta+\tan\theta| + C.
$$
So we need
$$
\left[ \frac 1 2 \sec\theta\tan\theta + \frac 1 2 \log|\sec\theta+\tan\theta| \right]_0^{\arctan\theta}.
$$
From trigonometry we have
\begin{align}
\tan\arctan a & = a, \\[10pt]
\sec\arctan a & = \sqrt{1+a^2}.
\end{align}
Maybe you can do the rest. (?)
</s>