Evaluate $\int \sqrt{x^2 + a^2}\mathrm{d}x$ I tried using integration by parts and could get to this point:
\begin{align}
\int \sqrt{x^2 + a^2}\mathrm{d}x &= x\sqrt{x^2+a^2} - \int x\frac{2x}{\sqrt{x^2 + a^2}}\mathrm{d}x 
\\\\ &= x\sqrt{x^2+a^2} -2\int \sqrt{x^2 + a^2}\mathrm{d}x + \int \frac{2a^2}{\sqrt{x^2 + a^2}}\mathrm{d}x 
\end{align}
then, I don't know how to get:
$$\int \frac{2a^2}{\sqrt{x^2 + a^2}}\mathrm{d}x$$

You have a little mistake in the integration by parts, $\displaystyle(\sqrt{x^2 + a^2})' = \frac{x}{x^2 + a^2}$ therefore
$$
\int \sqrt{x^2 + a^2}\,dx = x\sqrt{x^2 + a^2} - \int \sqrt{x^2 + a^2}\,dx + a^2\int\frac{1}{\sqrt{x^2 + a^2}}.
$$
The latter integral is simply a can be calculated using the hyperbolic trig substitution or you can recall that $\displaystyle\left(\sinh^{-1}(x)\right)' = \frac{1}{x^2 + 1}$.
