Q:

How do you evaluate this integral $\int \frac{6x^{3}+7x^2-12x+1}{\sqrt{x^2+4x+6}}dx$

$$\int \frac{6x^{3}+7x^2-12x+1}{\sqrt{x^2+4x+6}}dx$$
I have met this complex integral today, how do you evaluate this? Can you do this in more steps?
Is this an elliptic integral? I don't know how to evaluate this integral at all.

A:

Change variable to $y = x + 2$, the integral becomes
$$\int \frac{A(y)}{\sqrt{y^2+2}} dy\quad\text{ where }\quad A(y) = 6y^3 - 29 y^2 + 32y + 5$$
The primitive will have the form
$$B(y)\sqrt{y^2+2} + C(y)$$
where $B(y)$ is a polynomial to be determined and $C(y)$ is something messy
leave behind. Since this is a primitive, we have
$$\begin{align}\frac{A(y)}{\sqrt{y^2+2}} &= \left(B(y)\sqrt{y^2+2} + C(y)\right)'\\
\iff   C'(y)\sqrt{y^2+2} &= A(y) - ((y^2+2)B'(y) + yB(y))\tag{*1}\end{align}
$$
RHS($*1$) is a polynomial in $y$. Since $A(y)$ is cubic, pick a quadratic polynomial $B(y)$ to lower the degree of RHS as low as possible. The process
goes like this. 

Set $B(y)$ to $ay^2 + by + c$, RHS($*1$) becomes $(6-3a)y^3 + \cdots$. We should fix $a$ to $2$.
Set $B(y)$ to $2y^2 + by + c$, RHS($*1$) becomes $(-2b-29)y^2 + \cdots$. We should fix $b$ to $-\frac{29}{2}$.
Repeat this procedure once more, we find $c$ should be fixed to $24$.

Indeed, if we let $B(y) = 2y^2 - \frac{29}{2}y + 24$, we will obtain
$$C'(y)\sqrt{y^2+2} = 34\quad\implies\quad C(y) = 34\sinh^{-1}\left(\frac{y}{\sqrt{2}}\right) + K$$
where $K$ is an integration constant. As a result,
$$\int \frac{A(y)}{\sqrt{y^2+2}} dy
= \left(2y^2 - \frac{29}{2}y +  24\right)\sqrt{y^2+2} + 34\sinh^{-1}\left(\frac{y}{\sqrt{2}}\right) + K$$
The original integral evaluates to
$$\left(2x^2 - \frac{13}{2}x + 3\right)\sqrt{x^2+4x+6} + 34\sinh^{-1}\left(\frac{x+2}{\sqrt{2}}\right) + K$$
This method should have a name but I can't locate a reference...

