How can I integrate
$$\int\sqrt{\dfrac{x^2+bx+c}{x^2+ex+f}}\,dx?$$ I was thinking a substitution $$t=\frac{x^2+bx+c}{x^2+ex+f},$$ which inverts as follows:
$$(x^2+ex+f)t=x^2+bx+c$$ $$(t-1)x^2+(et-b)x+ft-c=0$$ $$x=\dfrac{b-et+\sqrt{(b-et)^2-4(t-1)(ft-c)}}{2(t-1)},$$ but I've never really dealt with integrals of this complexity with the aim of finding a closed form in terms of fundamental integral functions. The best I could do is expand the integrand as a not-so-nice power series.
Rewriting the integrand gives $$\int \frac{x^2 + b x + c}{\sqrt{(x^2 + b x + c)(x^2 + e x + f)}} \,dx ,$$ and---except when the quartic under the radical has a repeated root---definite integrals of functions of this form are elliptic integrals, which usually cannot be expressed in terms of elementary functions. In general these integrals can be decomposed into combinations of $3$ normal forms, namely, incomplete elliptic integrals of the first ($F$), second ($E$), and third ($\Pi$) kinds. Maple produces a general expression in terms of these functions and the the arbitrary coefficients $b, c, e, f$, but the formula is too large to reproduce here, even if you first apply a suitable affine change of variables to put the integral in the form $$\int \sqrt{\frac{(x - h)^2 \pm k}{x^2 \pm' 1}}\,dx .$$ For the special case $h = 0$ (which occurs iff $b = e$), $\pm = -$, $\pm' = -$, at least, we have the compact elliptical integral expression $$\int\sqrt\frac{x^2 - k^2}{x^2 - 1} \,dx = k E \left(x, \frac{1}{k}\right) + C .$$
The above considerations leaves just the special cases when the quartic has a repeated root, and all such cases can be managed with standard techniques. The $3$ essential cases are:
The first two cases can be handled using either an appropriate (hyperbolic) trigonometric substitution, depending on the sign of the discriminant $e^2 - 4f$, resp. $b^2 - 4c$, of the remaining quadratic, or Euler substitution. (If the discriminant is zero, the integrand is just a ratio of linear functions.) In the third case the rationalizing substitution $u = \sqrt{\frac{x + r}{x + s}}$ transforms the integral into $$2 (s - r) \int \frac{u^2}{(u - 1)^2} \,du ,$$ which can be managed using the method of partial fractions.