How do I integrate $\int\frac1{ \sqrt{x^n + 1}}dx$ 
$$\int\frac1{ \sqrt{x^n + 1}}dx$$

This question popped up in my mind after we took trigonometric substitution in calc II. I tried solving it until I got $${\sinh}^{{\frac{2}{{n}}-{1}}}{\left(\theta\right)}$$ and then it got ugly afterwards.
I came up with some reduction formula, but then the values did not really work out when I tested them out with constants and limits. 
Moreover, a quick search on the internet showed me that such type of questions are solved with complex analysis, Mobius transformation etc. 
I think this integral is solvable for all infinite integras and finite rationals, but again I am not sure. 
 A: The antiderivative for general $n \neq 0$ is expressible in terms of hypergeometric functions:
$$\color{#df0000}{\boxed{\int \frac{dx}{\sqrt{x^n + 1}} = x \cdot{}_2 F_1\left(\frac{1}{2}, \frac{1}{n}; 1 + \frac{1}{n}; -x^n\right) + C}} .$$
For most values of $n$ this expression cannot be written as a closed expression in elementary functions, but for certain special rational values it can. We can read off from the result of your hyperbolic trigonometric solution that there is a closed form for $n = \pm \frac{1}{m}$ and $n = \pm \frac{2}{m}$, $m \in \Bbb Z - \{ 0 \}$.
Alternatively, by making appropriate substitutions we can transform the integrals in these cases to ones of rational functions, which again establishes that they have closed expressions in elementary functions.


*

*For $n = \pm \frac{1}{m}$, the substitution $x = \left(\frac{2 t}{1 - t^2}\right)^{2 m}$ transforms the integral to $$-2^{2 m + 1} m \int t^{2 m - 1} (t^2 - 1)^{-2 m} \,dt$$

*For $n = \pm \frac{2}{m}$, the substitution $x = \left(\frac{2 t}{t^2 - 1}\right)^m$ transforms the integral to $$-2^m m \int t^{m - 1} (t^2 - 1)^{-m} \,dt.$$
There are at least a few other cases in which we can write the antiderivative in an alternative form:


*

*For $n = 0$, the integrand is constant.

*For $n = -\frac{3}{2}, \pm 3, \pm 4$ the antiderivative can be written instead in terms of certain elliptic functions.

