Difficult Integral: $\int\frac{x^n}{\sqrt{1+x^2}}dx$ How to calculate this difficult integral: $\int\frac{x^2}{\sqrt{1+x^2}}dx$?
The answer is $\frac{x}{2}\sqrt{x^2\pm{a^2}}\mp\frac{a^2}{2}\log(x+\sqrt{x^2\pm{a^2}})$.
And how about $\int\frac{x^3}{\sqrt{1+x^2}}dx$?

I would first try the substitution $x=\tan(\theta)$, so that $\sqrt{1+x^2}=\sec(\theta)$. That gives
$$
\begin{align}
\int\frac{x^n}{\sqrt{1+x^2}}\;\mathrm{d}x
&=\int \tan^n(\theta)\sec(\theta)\;\mathrm{d}\theta\\
&=\tan^{n-1}(\theta)\sec(\theta)-(n-1)\int\tan^{n-2}(\theta)\;\sec^3(\theta)\;\mathrm{d}\theta\\
&=\tan^{n-1}(\theta)\sec(\theta)-(n-1)\int(\tan^n(\theta)+\tan^{n-2}(\theta))\;\sec(\theta)\;\mathrm{d}\theta\\
&=\frac{1}{n}\tan^{n-1}(\theta)\sec(\theta)-\frac{n-1}{n}\int\tan^{n-2}(\theta)\;\sec(\theta)\;\mathrm{d}\theta
\end{align}
$$
If $n$ is odd, this reduces to
$$
\int\tan(\theta)\sec(\theta)\;\mathrm{d}\theta=\sec(\theta)+C
$$
If $n$ is even, this reduces to 
$$
\begin{align}
\int\sec(\theta)\;\mathrm{d}\theta&=\int\sec^2(\theta)\;\mathrm{d}\sin(\theta)\\
&=\int\frac{1}{2}\left(\frac{1}{1-\sin(\theta)}+\frac{1}{1+\sin(\theta)}\right)\;\mathrm{d}\sin(\theta)\\
&=\frac{1}{2}\log\left(\frac{1+\sin(\theta)}{1-\sin(\theta)}\right)+C\\
&=\log(\sec(\theta)+\tan(\theta))+C
\end{align}
$$
