<s>[INST] Computing $\int \frac{-\mathrm{d}x}{\sqrt{ax^2+bx+c}}$ First I complete the square $$ax^2+bx+c = a\left(\left(x+\frac{b}{2a}\right)^2+\frac{4ac-b^2}{4a}\right)$$
and let $d=\frac{4ac-b^2}{4a}$. Then $$\int \frac{-\mathrm{d}x}{\sqrt{ax^2+bx+c}}=\frac{1}{\sqrt{a}}\int \frac{-\mathrm{d}x}{\sqrt{\left(x^2+\frac{b}{2a}\right)^2+\frac{d}{a}}}$$
$$=\frac{1}{\sqrt{a}}\int \frac{-\mathrm{d}x}{\sqrt{\left(\frac{a}{d}\right)\left(x^2+\frac{b}{2a}\right)^2+1}}$$
Let $u=\sqrt{\frac{a}{d}}\left(x+\frac{b}{2a}\right)$. Then $\mathrm{d}u=\sqrt{\frac{a}{d}}\ \mathrm{d}x$ and the integral becomes
$$\frac{\sqrt{d}}{a}\int\frac{-\mathrm{d}u}{\sqrt{u^2+1}}$$
But I don't think this is right. Ultimately I'm looking for an answer in terms of inverse trigonometric functions, hopefully, $\arccos u$ depending on $a,b,c$. What am I doing wrong here?
 [/INST] $\frac{\sqrt{d}}{a} \int \frac{-du}{\sqrt{u^{2}+1}}$.
Currently I can see only solution $\sqrt{u^{2}+1} =t - u$
$u=\frac{t^{2} - 1}{2t}. \sqrt{u^{2}+1} = \frac{t^{2}+1}{2t}, du=\frac{t^{2} + 1}{2t^{2}}$
$\int \frac{-du}{\sqrt{u^{2}+1}} = -\int \frac{dt}{t} = -ln|t|+C = -ln|u+\sqrt{u^2+1}| + C$
</s>