<s>[INST] Analytic expression for the primitive of square root of a quadratic Can an analytic expression be given for 
$$\int \sqrt{ax^2 + bx +c} \, dx$$
I think substitution doesn't work in this case (I need to compute the integral $\int_0^t \ldots$).
 [/INST] To deal with the integral, we first use method of completing square and then the well-know result
$$
\int \sqrt{x^2-a^2} d x=\frac{1}{2}\left[x \sqrt{x^2-a^2}-\ln \left|x+\sqrt{x^2-a^2}\right| \right ]+C
$$
Case 1: $a>0$ and $b^2>4ac$
$$
\begin{aligned}
I &=\int \sqrt{a x^2+b x+c} d x\\&=\int \sqrt{\left(\sqrt{a} x+\frac{b}{2 \sqrt{a}}\right)^2-\left(\frac{\sqrt{b^2-4 a c}}{2 \sqrt{a}} \right)^2}d x \\
&= \frac{1}{2 \sqrt{a}}\left[\left(\sqrt{a} x+\frac{b}{2 \sqrt{a}}\right) \sqrt{a x^2+b x+c}-\frac{b^2-4 a c}{4 a}\ln \left(\sqrt{a x^2+b x+c}+\sqrt{a} x+\frac{b}{2 \sqrt{a}}\right)\right]+C\\&=\frac{1}{4 a}(2 a x+b) \sqrt{a x^2+b x+c}-\frac{b^2-4 a c}{8 a^{\frac{3}{2}}} \ln \left(2 \sqrt{a} \sqrt{a x^2+b x+c}+2 a x+b\right)+C
\end{aligned}
$$
Case 2: $a>0$ and $b^2<4ac$
$$I=\int \sqrt{a x^2+b x+c} d x=\int \sqrt{\left(\sqrt{a} x+\frac{b}{2 \sqrt{a}}\right)^2-\left(\frac{i\sqrt{4 a c-b^2}}{2 \sqrt{a}} \right)^2}d x $$
Replacing $\frac{\sqrt{b^2-4 a c}}{2 \sqrt{a}} $ by $\frac{i\sqrt{4 a c -b^2}}{2 \sqrt{a}} $ in $(1)$ yields
$$I=\frac{1}{4 a}(2 a x+b) \sqrt{a x^2+b x+c}-\frac{b^2-4 a c}{8 a^{\frac{3}{2}}} \ln \left(2 \sqrt{a} \sqrt{a x^2+b x+c}+2 a x+b\right)+C$$
Conclusively, when $a>0$,
$$\boxed{I=\frac{1}{4 a}(2 a x+b) \sqrt{a x^2+b x+c}-\frac{b^2-4 a c}{8 a^{\frac{3}{2}}} \ln \left(2 \sqrt{a} \sqrt{a x^2+b x+c}+2 a x+b\right)+C}$$
</s>