<s>[INST] Solve indefinite integral $ \int \frac{x^4}{\sqrt{x^2+4x+5}}dx $ I need to solve the next problem:
$$
\int \frac{x^4}{\sqrt{x^2+4x+5}}dx
$$
I know the correct answer is 
$$
(\frac{x^3}{4}-\frac{7x^2}{6}+\frac{95x}{24}-\frac{145}{12})*\sqrt{x^2+4x+5}\space+\space\frac{35}{8}\ln{(x+2+\sqrt{x^2+4x+5})}+C
$$
still, I cannot find the solution.
I've already tried substituting $u=x+2$ and that has't given any satisfying result
 [/INST] With $x+2=\sinh t$ to rewrite the integral as,
$$
I=\int \frac{x^4}{\sqrt{x^2+4x+5}}dx=\int (\sinh t-2)^4dt$$
$$=\int (\sinh^4 t-8\sinh^3 t + 24\sinh^2 t - 32\sinh t+16)dt
\tag 1$$
where,
$$\begin{array}
& & \int \sinh t dt = \cosh t \\
& \int \sinh^2 t dt = \frac12\int (\cosh 2t-1)dt=\frac14\sinh 2t -\frac12t \\
& \int \sinh^3 t dt = \int (\cosh^2 t-1)d(\cosh t)=\frac13\cosh^3 t -\cosh t \\
& \int \sinh^4 t dt = \frac14\int (\cosh 2t-1)^2dt
=\int ( \frac18\cosh 4t -\frac12\cosh 2t+\frac38) dt \\
& \>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>\>=\frac1{32}\sinh 4t -\frac14\sinh 2t+\frac38t \end{array}$$
Plug above integrals back into (1) to get,
$$I= \frac1{32}\sinh 4t -\frac83\cosh^3 t+\frac{23}4\sinh 2t -24\cosh t + \frac{35}8t+C$$
$$= \cosh t\left(\frac18\sinh t(2\sinh^2 t+1) -\frac83(\sinh^2+1) +\frac{23}2\sinh t -24\right) + \frac{35}8t+C$$
Substitute back $\sinh t = x+2$ and $\cosh t = \sqrt{1+\sinh^2 t} = \sqrt{x^2+4x+5}$ to obtain,
$$
I = \sqrt{x^2+4x+5}\left(\frac{x^3}{4}-\frac{7x^2}{6}+\frac{95x}{24}-\frac{145}{12}\right)\space+\space\frac{35}{8}\sinh^{-1}(x+2)+C
$$
Furthermore, $\sinh^{-1}(x+2)=\ln{(x+2+\sqrt{x^2+4x+5})}$ by applying the identity $\sinh^{-1}u=\ln(u+\sqrt{1+u^2})$.
</s>