I am trying to integrate the function
$$f(X)=\frac1{ax^2+bx+c}\qquad\text{where }b^2>4ac$$
After being stuck myself, I tried to follow the solution in the accepted answer here (case 3). I could follow everything except the step where they somehow rearrange
$$\frac1a\int\frac{1}{\left(x+\dfrac{b}{2a}\right)^2-\left(\dfrac{\sqrt{b^2-4ac}}{2a}\right)^2}\,\mathrm dx=\frac{1}{\sqrt{b^2-4ac}}\int\left(\frac{1}{x+\dfrac{b}{2a}-\dfrac{\sqrt{b^2-4ac}}{2a}}-\frac{1}{x+\dfrac{b}{2a}+\dfrac{\sqrt{b^2-4ac}}{2a}}\right)\,\mathrm dx\tag1$$
I can't see why those are equal.
Here are my thoughts: We know that
$$\frac1{z^2-1}=\frac1{z-1}-\frac1{z+1}\tag2$$
If we take $x+b/(2a)$ to be $z$ and $1/(\sqrt{b^2-4ac})$ to be "1", this kind of resembles equation $(1)$ except that the "1" is squared on the left hand side. Also, it is of course not right to just use eq. $(2)$ because $1/(\sqrt{b^2-4ac})$ isn't actually necessarily 1. Another thing I am confused about is why the factor $1/a$ in front of the integral got replaced by $1/(\sqrt{b^2-4ac})$.
Any help/hints would be appreciated.
Apologies for the rather unspecific title; if there are any suggestions, feel free to edit/comment them.
I was able to find the answer myself. Using another partial fraction expansion
$$\frac1{k^2-z^2}=\frac1{2z(k-z)}-\frac{1}{2z(k+z)}=\frac{1}{2z}\left(\frac1{k-z}-\frac1{k+z}\right)$$
if we let
$$k=x+\frac{b}{2a}\qquad\qquad z=\frac{\sqrt{b^2-4ac}}{2a}$$
we can simply rearrange eq. $(1)$ as
$$\frac1a\int\frac{1}{\left(x+\dfrac{b}{2a}\right)^2-\left(\dfrac{\sqrt{b^2-4ac}}{2a}\right)^2}\,\mathrm dx=\frac1a\frac{2a}{2\sqrt{b^2-4ac}}\int\left(\frac{1}{x+\dfrac{b}{2a}-\dfrac{\sqrt{b^2-4ac}}{2a}}-\frac{1}{x+\dfrac{b}{2a}+\dfrac{\sqrt{b^2-4ac}}{2a}}\right)\,\mathrm dx$$
The factor in front of the integral simplifies to $1/\sqrt{b^2-4ac}$, giving us the desired result.