Evaluating integral of the form $\int \frac {dx}{(x-b)^m(x-a)^n}$ 
$$\int \frac {dx}{(x-b)^3(x-a)^2}$$

Can someone please help evaluate this integral? Finding the partial fraction seems tedious and I don't know any other way.
 A: Let we assume $\displaystyle I =\int\frac{1}{(x-a)^2(x-b)^3}dx$
Then put $\displaystyle (x-a)=t(x-b)\Longrightarrow t=\frac{x-a}{x-b}$
So $\displaystyle t=\frac{(x-b)+(b-a)}{x-b}=1+\frac{b-a}{x-b}$
So we have $\displaystyle x-b=\frac{b-a}{t-1}$ and $\displaystyle dx=\frac{a-b}{(t-1)^2}dt$
So we have  $\displaystyle I=\frac{1}{(a-b)^4}\int\frac{(t-1)^3}{t^2}dt$
A: Hint: Rewrite the $1$ on the numerator as $1 = \dfrac{(x-a) - (x-b)}{b-a}$,and split it into $2$ fractions, and repeat this trick until the fraction becomes simple enough to have a clear antiderivative.
A: Trick: find
$$ F(a,b,x) = \int \frac{1}{(x-a)(x-b)}\,dx $$
which is easy, since $\frac{1}{(x-a)(x-b)}=\frac{1}{a-b}\left(\frac{1}{x-a}-\frac{1}{x-b}\right) $, then differentiate once with respect to $a$ and twice with respect to $b$.
A: Case where $n,m$ are not integers?
We want to do
$$
I(a,b,n,m;x) = \int\frac{dx}{(x-a)^n(x-b)^m}
\tag1$$
where $a < b$ and $m,n$ are real numbers.  Say we want the antiderivative where $x>b$ so that those fractional powers are real.
First, do the special case
$$
I(0,1,n,m;y) = \int\frac{dy}{y^n(y-1)^m} = 
\frac{y^{1-n-m}}{1-n-m}\;{}_2F_1\left(m,m+n-1;n+m;\frac{1}{y}\right)
\tag2$$
then change variables $y=\frac{x-a}{b-a}$ in $(1)$ to get:
$$
I(a,b,m,n,x) = \int\frac{dx}{(x-a)^n(x-b)^m}
= (b-a)^{1-n-m}\int \frac{dy}{y^n(y-1)^m}
\\
= (b-a)^{1-n-m}I(0,1,n,m,y)
= (b-a)^{1-n-m}I\left(0,1,n,m,\frac{x-a}{b-a}\right)
\\
= 
\frac{(x-a)^{1-n-m}}{1-n-m}\;{}_2F_1\left(m,m+n-1;n+m;\frac{b-a}{x-a}\right)
$$

In case $n+m=1$, we get
$$
I(0,1,n,1-n,y) = (n-1)\;{}_3F_2\left(1,1,2-n;2,2;\frac{1}{y}\right)
-\gamma+\log n-\psi(n) .
$$
