<s>[INST] How to integrate $\int \sqrt{x^2+a^2}dx$ $a$ is a parameter. I have no idea where to start
 [/INST] Since $\sinh^2(x)+1
=\cosh^2(x)
$,
this suggests
letting $x = a \sinh(y)$.
$dx = a \cosh(y)$
and $x^2+a^2 = a^2(\sinh^2(y)+1)
= a^2 \cosh^2(y)$,
so $a \cosh(y) = \sqrt{x^2+a^2}$.
$\begin{align}
\int{\sqrt{x^2+a^2}}dx
&=\int a^2 \cosh^2(y) dy\\
&= a^2 \int (e^{2y}+2+e^{-2y})\,dy/4\\
&= (a^2/4) (e^{2y}/2 + 2y - e^{-2y}/2)\\
&=(a^2/4)(\sinh(2y)+2y)\\
&=(a^2/4)(2\sinh(y)\cosh(y)+2y)\\
&=(a^2/2)((x/a) (1/a)\sqrt{x^2+a^2}+\sinh^{-1}(x/a))\\
&=(x \sqrt{x^2+a^2})/2+(a^2/2)\sinh^{-1}(x/a)
\end{align}
$
I'll leave it at this - you can find $\sinh^{-1}$.
</s>