First of all, convert the integral into the form $\displaystyle\int\frac{\mathrm dx}{(x^2+ax+b)\sqrt{\pm x^2+cx+d}}$. Now, $3$ cases arise:
$\textbf{Case 1, }a^2>4b:$ Let $x^2+ax+b=(x-\alpha)(x-\beta)$, then decompose $\dfrac1{x^2+ax+b}$ into partial fractions to get $2$ integrals of the form $\displaystyle\int\frac{\mathrm dx}{L\sqrt Q}$. A quick way to finish off such an integral is to substitute $L=\dfrac1t$.
$\textbf{Case 2, }a^2=4b:$ Since the derivative of $\dfrac1{x+\frac{a}2}$ is present in the integrand, substitute it as $t$ to get an integral of the form $\displaystyle\int\frac{t}{\sqrt Q}\mathrm dt$. Now, write the numerator as $AQ'(t)+B$ for suitable constants $A$ and $B$.
$\textbf{Case 3, }a^2<4b:$ $2$ sub-cases can be made for this situation:
$\underline{\text{Sub-case $1$, $a=c$ if the sign of $x^2$ in the root is $+$, otherwise $a=-c$ :}}$ Substitute $t=x+\frac{a}2$. Then, we end up with the form $\displaystyle\int\frac{\mathrm dt}{(t^2+A)\sqrt{\pm t^2+B}}$ which is discussed below after the second sub-case.
$\underline{\text{Sub-case $2$, $a\neq c$ if the sign of $x^2$ in the root is $+$, otherwise $a\neq -c$ :}}$ Substitute $t=x-\alpha$ such that the constant terms of both the quadratics in $t$ become the same if the sign of $x^2$ in the root is $+$, otherwise the constant terms should be additive inverses of each other. Note that the constant term of the outer quadratic has to be positive as $a^2\ge0\implies b>0$. So, let it be $C^2, C>0$.
Now, the integral becomes of the form $\displaystyle\int\frac{\mathrm dt}{(t^2+At+C^2)\sqrt{\pm t^2+Bt+\pm C^2}}$. For simplicity, let $t>0$ so that we can write $\sqrt{t^2}=t$. The procedure can then be extended for negative $t$ by substituting $t=-u$.
Dividing and multiplying by $t^{-\frac32}$ gives $$\int\frac{t^{-\frac32}\mathrm dt}{\left(t+\frac{C^2}t+A\right)\sqrt{\pm t\pm\frac{C^2}t+B}}$$
$$=\frac1C\int\frac{\mathrm d\left(\sqrt t-\frac{C}{\sqrt t}\right)}{\left(\left(\sqrt t-\frac{C}{\sqrt t}\right)^2+A+2C\right)\sqrt{\pm\left(\sqrt t-\frac{C}{\sqrt t}\right)^2+B\pm2C}}-\frac1C\int\frac{\mathrm d\left(\sqrt t+\frac{C}{\sqrt t}\right)}{\left(\left(\sqrt t+\frac{C}{\sqrt t}\right)^2+A-2C\right)\sqrt{\pm\left(\sqrt t+\frac{C}{\sqrt t}\right)^2+B\mp2C}}$$
I discovered this technique when I pondered if there was a way to integrate such functions similar to integrating $\dfrac1{x^4+kx^2+1}$ and $\dfrac{x^2}{x^4+kx^2+1}$, where we divide the numerator and the denominator by $x^2$ and split them as $\frac12\mathrm d\left(x-\frac1x\right)\pm\frac12\mathrm d\left(x+\frac1x\right)$.
So, in both cases, the integral can be converted to the form $\displaystyle\int\frac{\mathrm dx}{(x^2+a)\sqrt{\pm x^2+b}}$. There are multiple ways to integrate this. For simplicity, let's break this situation into $2$ cases for handling the sign of the inner quadratic:
a) If the sign is $+$,
- Substitute $t=\dfrac{\sqrt{x^2+b}}x$.
Intuition for this substitution can be developed by substituting $x=\frac1t$. Then, for $t>0$, we have the derivative of $\dfrac{t}{\sqrt{t^2+\frac1b}}$ in the integrand.
- If $a>0$, substitute $x=\sqrt a\tan\theta$ and if $a<0$, substitute $x=\sqrt{-a}\tanh\theta$ for $x\in\left[-\sqrt{-a},\sqrt{-a}\right]$ and $x=\sqrt{-a}\coth\theta$ for $x\in\mathbb R-\left[-\sqrt{-a},\sqrt{-a}\right]$.
- If $b>0$, substitute $x=\sqrt b\sinh\theta$ and if $b<0$, substitute $x=\sqrt{-b}\cosh\theta$ choosing the sign of $\theta$ to be the same as $\cosh x$ is bijective only in $[0,\infty)$ and $(-\infty, 0]$.
b) If the sign is $-$,
- Substitute $t=\dfrac{\sqrt{-x^2+b}}x$.
Intuition for this substitution can be developed by substituting $x=\frac1t$. Then, for $t>0$, we have the derivative of $\dfrac{t}{\sqrt{t^2-\frac1b}}$ in the integrand.
- If $a>0$, substitute $x=\sqrt a\tan\theta$ and if $a<0$, substitute $x=\sqrt{-a}\tanh\theta$ for $x\in\left[-\sqrt{-a},\sqrt{-a}\right]$ and $x=\sqrt{-a}\coth\theta$ for $x\in\mathbb R-\left[-\sqrt{-a},\sqrt{-a}\right]$.
- Substitute $x=\sqrt b\sin\theta$ or $x=\sqrt b\cos\theta$ as $b$ has to be positive.