Evaluating Indefinite Integrals of the form $\int\frac{f(x)}{p(x) \sqrt{q(x)}}\mathrm dx$ One learns evaluating indefinite integrals of the form $$ \int \frac{f(x)}{p(x)\sqrt{q(x)}} \ dx $$ where $p(x)$ and $q(x)$ are linear polynomials. 
How to evaluate these integrals if $p(x)$ and $q(x)$ are quadratic or cubic in nature. Is there any method for evaluating them.
Examples of such integrals are: $\displaystyle \int \frac{1}{(x^{2}+a^{2})\sqrt{x^{2}+b^{2}}} \ \mathrm dx$ or $\displaystyle \int\frac{1}{(x^{3}+a^{3})\sqrt{x^{3}+b^{3}}} \ \mathrm dx$
 A: If $q$ is quadratic, then these can be done by trigonometric/hyperbolic
substiuitions. If $q$ is cubic then they are are elliptic integrals,
not in general expressible in elementary terms, but expressible in terms
of elementary functions and the standard examples of elliptic integrals.
A: There are algorithms due to Abel, Liouville, Risch, Davenport, Trager et al. for solving the general problem of the algebraic (vs. transcendental) case of integration in finite terms (elementary and algebraic functions). Here's an illuminating excerpt from the introduction of Barry Trager's 1984 MIT Thesis (coincidentally Barry was working right next door to me disproving Hardy's statement that no algorithm exists at the same time I was disproving an analogous Hardy statement while inventing algorithms for computing limits / asymptotics - while we were both student members of the MIT Mathlab Group - the research group that developed the Macsyma computer algebra system).




A: For the quadratic, first put $x = a \tan \theta$ then put $t = \sin \theta$
(First write $p(t)$ in the form $x^2 + a^2$ where $x = t+r$, $a$ could possibly be complex)
Don't know about the cubic.
A: Here i have found one more method for evaluvating integrals of the form $$ I= \frac{1}{(x^{2}+a^{2})\sqrt{x^{2}+b^{2}}} \ dx $$
Let $y = \displaystyle \sqrt{\frac{x^{2}+b^{2}}{x^{2}+a^{2}}}$, then by differentiating one can see that $$ \frac{dy}{dx} = \frac{(a^{2}-b^{2})x}{(x^{2}+a^{2})^{3/2} (x^{2}+b^{2})^{1/2}}$$
Thus $I$ becomes $$\frac{(x^{2}+a^{2})^{1/2}}{(a^{2}-b^{2})x} \ dy$$
Also $(x^{2}+a^{2})y^{2}=x^{2}+b^{2}$ so that we have $\displaystyle x^{2}= \frac{b^{2}-a^{2}y^{2}}{y^{2}-1}$ and $$x^{2}+a^{2} = \frac{b^{2}-a^{2}}{y^{2}-1}$$ So $I$ further reduces to $$ I = \frac{1}{a^{2}-b^{2}} \int \frac{\sqrt{b^{2}-a^{2}}}{\sqrt{b^{2}-a^{2}y^{2}}} \ dy = \frac{1}{a\sqrt{b^{2}-a^{2}}} \cos^{-1}\frac{ay}{b} \ (a < b)$$
For $a>b$ one can rearrange $$I = \frac{1}{a^{2}-b^{2}} \int \frac{\sqrt{a^{2}-b^{2}}}{\sqrt{a^{2}y^{2}-b^{2}}} \ dy$$
A: Gradshteyn & Rizhik makes a good discussion about that in chapter 2 ( Indefinite Integrals ).
In particular, they discuss an important method: Ostrogradskiy–Hermite.
