<s>[INST] What is the solution to this integral? I'm trying to solve the following integral:
$\int \frac{x dx}{\sqrt{ax^{2} + bx + c}}$
with the following conditions:
$a < 0$,
$b > 0$,
$c < 0$,
and
$\left|2ax + b\right| > \sqrt{b^2 - 4ac}$.
I've tried looking this up on the internet and in books of integrals, but I can't find anything.
 [/INST] Put it this way
$$\int {\frac{x}{{\sqrt {a{x^2} + bx + c} }}dx}  = \frac{1}{{2a}}\int {\frac{{2ax + b}}{{\sqrt {a{x^2} + bx + c} }}dx}  - \frac{b}{{2a}}\int {\frac{{dx}}{{\sqrt {a{x^2} + bx + c} }}} $$
Then
$$\int {\frac{x}{{\sqrt {a{x^2} + bx + c} }}dx}  = \frac{1}{a}\sqrt {a{x^2} + bx + c}  - \frac{b}{{2a}}\int {\frac{{dx}}{{\sqrt {a{x^2} + bx + c} }}} $$
So let's focus on the last integral.
$$a{x^2} + bx + c = a\left[ {{{\left( {x + \frac{b}{{2a}}} \right)}^2} + \frac{c}{a} - \frac{{{b^2}}}{{4{a^2}}}} \right]$$
Thus by making $${x + \frac{b}{{2a}}} = u$$
we have a new polynomial to integrate. Consider the cases:


*

*$\displaystyle \frac{c}{a} - \frac{{{b^2}}}{{4{a^2}}} < 0 =  - {k^2}$. So you have:
$$\frac{1}{{\sqrt a }}\int {\frac{{du}}{{\sqrt {{u^2} - {k^2}} }}}  =  \frac{1}{{\sqrt a }}\cosh^{-1} \frac{u}{k}$$

*$\displaystyle \frac{c}{a} - \frac{{{b^2}}}{{4{a^2}}} = 0$. You get
$$\frac{1}{{\sqrt a }}\int {\frac{{du}}{u}}  = \frac{1}{{\sqrt a }}\log u$$


*

*$\displaystyle \frac{c}{a} - \frac{{{b^2}}}{{4{a^2}}} > 0 = {k^2}$


$$\frac{1}{{\sqrt a }}\int {\frac{{du}}{{\sqrt {{u^2} + {k^2}} }}}  = \frac{1}{{\sqrt a }}{\sinh ^{ - 1}}\frac{u}{k}$$
So it all depends on the polynomial. 
</s>