Problem with integral. How can I evaluate this integral?
$$
\int{x^{3}\,{\rm d}x \over \left(x - 1\right)^{2}\sqrt{x^{2} + 2x + 4}}$$
I would be grateful for any tips.
 A: As $x^2+2x+4=(x+1)^2+(\sqrt3)^2,$  using Trigonometric substitution
let us set $x+1=\sqrt3\tan\psi$ and assuming $0<\psi<\frac\pi2$ so that $\sec\psi,\tan\psi>0$
$$I=\int\frac{x^3}{(x-1)^2\sqrt{x^2+2x+4}}dx=\int\frac{(\sqrt3\tan\psi-1)^3}{(\sqrt3\tan\psi-2)^2\sqrt3\sec\psi}\sqrt3\sec^2\psi d\psi$$
$$I=\int\frac{(\sqrt3\tan\psi-2+1)^3}{(\sqrt3\tan\psi-2)^2}\sec\psi d\psi$$
$$=\int\left((\sqrt3\tan\psi-2)+3+\frac3{\sqrt3\tan\psi-2}+\frac1{(\sqrt3\tan\psi-2)^2}\right)\sec\psi d\psi$$
$$=\sqrt3\int\tan\psi\sec\psi d\psi+\int\sec\psi d\psi+3\int\frac{\sec\psi}{\sqrt3\tan\psi-2}d\psi+\int\frac{\sec\psi}{(\sqrt3\tan\psi-2)^2}d\psi$$
The first two integral are too easy to be described
For the third, $\displaystyle\int\frac{\sec\psi}{\sqrt3\tan\psi-2}d\psi=\int\frac1{\sqrt3\sin\psi-2\cos\psi}d\psi$ asking for Weierstrass substitution
For the fourth  $\displaystyle I_4= \int\frac{\sec\psi}{(\sqrt3\tan\psi-2)^2}d\psi=\int\frac{\cos\psi}{(\sqrt3\sin\psi-2\cos\psi)^2}d\psi$
We can write $\displaystyle\cos\psi=A\frac{d(\sqrt3\sin\psi-2\cos\psi)}{d\psi}+B(\sqrt3\sin\psi-2\cos\psi)$ so that
$\displaystyle I_4$ becomes $\displaystyle A\int\frac{d(\sqrt3\sin\psi-2\cos\psi)}{(\sqrt3\sin\psi-2\cos\psi)^2}+B\int\frac1{\sqrt3\sin\psi-2\cos\psi}d\psi $
Now solve for $A,B$
A: Let me provide an alternate method of solving the last 2 integrals from lab bhattacharjee's answer.  The first step is to rewrite
$$\sqrt3\sin\psi-2\cos\psi\text{  as  }A\cos(\psi+B)=A\cos\psi\cos B-A\sin\psi\sin B$$
So we have
$$A\cos B=-2,A\sin B=-\sqrt3$$
$$\tan B=\frac{\sqrt3}2,B=\tan^{-1}\frac{\sqrt3}2$$
$$A^2=(-2)^2+(-\sqrt3)^2=7$$
$$A=-\sqrt7$$
So the third integral
$$\int\frac{d\psi}{\sqrt3\sin\psi-2\cos\psi}=-\frac{\sqrt7}7\int\sec(\psi+\tan^{-1}\frac{\sqrt3}2)d\psi$$
which is a straightforward integral of a secant.
As for the fourth integral,
$$\int\frac{\cos\psi d\psi}{(\sqrt3\sin\psi-2\cos\psi)^2}=\frac17\int\frac{\cos\psi d\psi}{\cos^2(\psi+\tan^{-1}\frac{\sqrt3}2)}$$
$$\theta=\psi+\tan^{-1}\frac{\sqrt3}2$$
I'm out of time for now (I'll probably come back to it later), but if you expand the cosine in the numerator, you should end up with a $\sec\theta$ term and a $\sec\theta\tan\theta$ term, both of which can be easily integrated.
