<s>[INST] The Integral $\int \frac {dx}{(x^2-2ax+b)^n}$ Recently I came across this general integral,
$$\int \frac {dx}{(x^2-2ax+b)^n}$$
Putting $x^2-2ax+b=0$ we have,
$$x = a±\sqrt {a^2-b} = a±\sqrt {∆}$$
Hence the integrand can be written as,
$$
\frac {1}{(x^2-2ax+b)^n}
=
\frac {1}{(x-a-\sqrt ∆)^n(x-a+\sqrt ∆)^n}
$$
Resolving into partial fractions we have,
$$
\frac {1}{(x^2-2ax+b)^n}
=
\sum \frac {A_r}{(x-a-\sqrt ∆)^r} + \sum \frac {B_r}{(x-a+\sqrt ∆)^r}
$$
Putting $-\frac {1}{2\sqrt ∆} = D$ , I could produce a table of the coefficients $A$ and $B$ for different $n$.
\par
For $n=1$,
$$A_1=-D , B_1=D$$
For $n=2$,
$$A_1=2D^3 , B_1=-2D^3$$
$$A_2=D^2 , B_2 = D^2$$
For $n=3$,
$$A_1=-6D^5 , B_1=6D^5$$
$$A_2=-3D^4 , B_2 = -3D^4$$
$$A_3=-D^3, B_3=D^3$$
For $n=4$,
$$A_1=20D^7, B_1=-20D^7$$
$$A_2=10D^6 , B_2 = 10D^6$$
$$A_3=4D^5, B_3=-4D^5$$
$$A_4=D^4, B_4=D^4$$
For $n=5$,
$$A_1=-70D^9, B_1=70D^9$$
$$A_2=-35D^8, B_2 = -35D^8$$
$$A_3=-15D^7, B_3=15D^7$$
$$A_4=-5D^6, B_4=-5D^6$$
$$A_5=-D^5, B_4=D^5$$
Yet I am unable to deduce a general formula for the coefficients. If I have the coefficients, the integral is almost solved , for then I shall have a logarithmic term and a rational function in $x$. More directly, I seek a result of the form,
$$\kappa \log \left( \frac {x-a-\sqrt ∆}{x-a+\sqrt ∆}\right) + \frac {P(x)}{Q(x)}$$
Any help would be greatly appreciated.
Conjecture 1(Proved below)
$$A(n,r)= (-1)^n \binom {2n-r-1}{n-1} D^{2n-r}$$
$$B(n,r)= (-1)^{n-r} \binom {2n-r-1}{n-1} D^{2n-r}$$
 [/INST] All right, now I've got it.
The easiest way to get all the coefficients? Expand in a Laurent series around one of the roots. Substituting $z=x-a-\sqrt{\Delta}$ and later defining $D=\frac1{2\sqrt{\Delta}}$, we get
\begin{align*}\frac1{(x^2-2ax+b)^n} &= \frac1{(x-a-\sqrt{\Delta})^n(x-a+\sqrt{\Delta})^n}=\frac1{z^n(z+2\sqrt{\Delta})^n}=\frac1{z^n}\cdot\frac{(2\sqrt{\Delta})^{-n}}{(1+\frac{z}{2\sqrt{\Delta}})^n}\\
\frac1{(x^2-2ax+b)^n} &= \frac{(-D)^n}{z^n(1-Dz)^n} = \frac{(-D)^n}{z^n}\sum_{j=0}^{\infty} \binom{n+j-1}{j}D^jz^j\\
&=(-1)^n\sum_{j=0}^{\infty}\binom{n+j-1}{j}D^{n+j}z^{j-n}\end{align*}
We claim that the coefficients $(-1)^n\binom{n+j-1}{j}D^{n+j}$ for $j<n$ are precisely the coefficients of $\frac1{z^{n-j}}$ in the partial fractions expansion of $\frac1{z^n(z+2\sqrt{\delta})^n}$. Why? Subtract the negative-exponent terms of the Laurent series from the partial fractions expansion. The difference is locally bounded, with a nice power series. But then, the only terms in the partial fractions expansion that aren't locally bounded are the $\frac1{z^k}$ terms - so their coefficients all have to match with the terms from the Laurent series.
Let $k=n-j$, and we get $A(n,k)=(-1)^n\binom{2n-k-1}{n-k}D^{2n-k}=(-1)^n\binom{2n-k-1}{n-1}D^{2n-k}$ in the partial fractions expansion
$$\frac1{z^n(z+2\sqrt{\Delta})^n}=\sum_{k=1}^n \frac{A(n,k)}{z^k} +\sum_{k=1}^n \frac{B(n,k)}{(z+2\sqrt{\Delta})^k}=\sum_{k=1}^n \frac{A(n,k)}{(x-a-\sqrt{\Delta})^k} +\sum_{k=1}^n \frac{B(n,k)}{(x-a+\sqrt{\Delta})^k}$$
Oh, yes - in my comment, I didn't actually define my notation, and the update to the question imported that without defining it. The purpose is clear; we're just putting both parameters in the notation instead of just the power $k$ of $\frac1{z-a\pm\sqrt{\Delta}}$. Formally, the definition is the line just above.
That's half of the conjecture. For the other half, we expand around the other root.
\begin{align*}\frac1{(x^2-2ax+b)^n} &= \frac1{(x-a-\sqrt{\Delta})^n(x-a+\sqrt{\Delta})^n}=\frac1{(w-2\sqrt{\Delta})^nw^n}=\frac1{w^n}\cdot\frac{(-2\sqrt{\Delta})^{-n}}{(1-\frac{w}{2\sqrt{\Delta}})^n}\\
\frac1{(x^2-2ax+b)^n} &= \frac{D^n}{w^n(1+Dw)^n} = \frac{D^n}{w^n}\sum_{j=0}^{\infty} \binom{n+j-1}{j}(-D)^jw^j\\
&=\sum_{j=0}^{\infty}(-1)^j\binom{n+j-1}{j}D^{n+j}w^{j-n}\end{align*}
Again, extract the negative-exponent terms to get $B(n,k)=(-1)^{n-k}\binom{2n-k-1}{n-k}D^{2n-k} =(-1)^{n-k}\binom{2n-k-1}{n-1}D^{2n-k}$. The conjecture is confirmed, and we have our general formula.
</s>