<s>[INST] Evaluating $\int_{-20}^{20}\sqrt{2+t^2}\,dt$ I have this integral:
$$\int_{-20}^{20}\sqrt{2+t^2}\,dt$$
I tried solving it many times but without success.
The end result is this:
$$2\left( 10\sqrt{402}+\mathop{\mathrm{arcsinh}}(10\sqrt{2})\right).$$
I can't seem to get this end result. I got a few wrong ones but cant find this one. Perhaps it's wrong? Could anyone confirm it?
I tried Sage, and it calculates it correctly, but not with steps.
 [/INST] Here are two more ways to calculate $\int \sqrt{a^2+x^2}\ dx$.


*

*Let us make the substitution $\sqrt{a^2+x^2}=t-x$. After squaring, $a^2=t^2-2xt$, from which
$$
x=\frac{t^2-a^2}{2t}\,.
$$ 
Using the last expression, one finds
$$
\sqrt{a^2+x^2}=t-x=\frac{t^2+a^2}{2t}\,,
$$
and
$$
dx=\frac{t^2+a^2}{2t^2}dt.
$$
Plugging everything into the integral,
$$
\frac 14\int\left(\frac{2a^2}{t}+t+\frac{a^4}{t^3}\right)dt=\frac{a^2}{2}\ln t+\frac{t^4-a^4}{8t^2}+C.
$$
Note, that from the above $x\sqrt{a^2+x^2}=\frac{t^4-a^4}{4t^2}$, therefore we obtain finally
$$
\int\sqrt{a^2+x^2}\,dx=\frac{a^2}{2}\ln(x+\sqrt{a^2+x^2})+\frac{1}{2}x\sqrt{a^2+x^2}+C.
$$

*Consider the integration by parts:
$$
u=\sqrt{a^2+x^2},\quad v=x,\quad du=\frac{x}{\sqrt{x^2+a^2}}.
$$
Therefore,
$$
\int\sqrt{x^2+a^2}\,dx=x\sqrt{a^2+x^2}-\int\frac{x^2dx}{\sqrt{a^2+x^2}}=\\
x\sqrt{a^2+x^2}-\int\frac{x^2+a^2-a^2 dx}{\sqrt{a^2+x^2}}=\\x\sqrt{a^2+x^2}-\int\sqrt{a^2+x^2}\,dx+\int\frac{a^2dx}{\sqrt{a^2+x^2}}.
$$
It is known (and can easily be found with the variable change from my point 1) that
$$
\int\frac{dx}{\sqrt{a^2+x^2}}=\ln(x+\sqrt{a^2+x^2})+C,
$$
hence, finally,
$$
\int\sqrt{a^2+x^2}\,dx=\frac{a^2}{2}\ln(x+\sqrt{a^2+x^2})+\frac{1}{2}x\sqrt{a^2+x^2}+C.
$$

</s>