How do we evaluate the following integral? $$\int\frac{x^ndx}{\sqrt{ax^2+bx+c}}$$ I am strictly looking for a solution for natural $n$
I wanted to try a trig substitution $$\int\frac{x^ndx}{\sqrt{ax^2+bx+c}}=\int\frac{x^ndx}{\sqrt{a\left(\left(x+\frac{b}{2a}\right)^2+\frac{c}{a}-\frac{b^2}{4a^2}\right)}}$$$$=\int\frac{(u-\frac{b}{2a})^ndx}{\sqrt{a\left(u^2+\frac{c}{a}-\frac{b^2}{4a^2}\right)}}$$ but I didn't know how to deal with the $(\tan\theta+k)^n$
I can accept an answer with special functions.
$$\int_0^xt^r(t-a)^{-\frac12}(t-b)^{-\frac12}dt\mathop=^{t=ux}\int_0^1 (ux)^r (ux-a)^{-\frac12}(ux-b)^{-\frac12}x du=\frac{x^r}{\sqrt{ab}}\int_0^1 u^{(r+1)-1} \left(-\left(\frac xbu-1\right)\right)^{-\frac12}\left(-\left(\frac xau-1\right)\right)^{-\frac12} x du=-\frac{x^{r+1}}{\sqrt{ab}}\int_0^1 u^{(r+1)-1} \left(1-\frac xbu\right) ^{-\frac12}\left(1-\frac xau\right)^{-\frac12} du$$
Using this Appel F$_1$ integral representation:
$$\text F_1(a;b_1,b_2;c;x,y)=\frac{\Gamma(c)}{\Gamma(a)\Gamma(c-a)}\int_0^1\frac{t^{a-1}(1-t)^{c-a-1}}{(1-xt)^{b_1}(1-yt)^{b_2}}dt$$
Therefore:
$$\boxed{\int_0^x\frac{t^r}{\sqrt{(t-a)(t-b)}}dt=\frac{x^{r+1}}{\sqrt{ab}(r+1)}\text F_1\left(r+1;\frac12,\frac12;r+2;\frac xa,\frac xb\right)}$$
Shown here in the “alternate forms“ section. For $r\in\frac{\Bbb Z}2$, the Appel function reduces to a rational function including Elliptic F and Elliptic E. Also, for $r\in\Bbb Z$, inverse trigonometric functions appear with a rational function.