Extracting the divergent part of an integral I want to evaluate the integral
$$ \int_0^1 \frac{2x(x-2)(1-x)}{(1-x)^2 + ax} \, \mathrm{d}x$$
in the limit of small $a$. For $a = 0$ this integral is divergent due to the $1/(1-x)$ pole. The exact expression for this integral is, according to Mathematica, a horrible combination of logs and inverse hyperbolic functions. However, I don't really care about all of the terms that go to zero as $a$ goes to zero. In, other words, I want to deduce that this integral is
$$1 + \ln a + \mathcal{O}(a)$$
(I believe this is the correct answer) by making some approximation at an early stage that saves me from having to compute the entire integral and then take the small $a$ limit.
 A: The integral can be rewritten explicitely as
$$
-2\int_0^1 \frac{x(x^2-3x+2)}{x^2-(2-a)x+1}\mathrm{d}x=-2 \int_0^1 x\left(1-\frac{(a+1)x-1}{x^2-(2-a)x+1}\right)\mathrm{d}x,
$$
hence it is equal to
$$
-1+2\int_0^1 \frac{(a+1)x^2-x}{x^2-(2-a)x+1}\mathrm{d}x=-1+2(a+1)+2\int_0^1 \frac{(-a^2+a+1)x-(a+1)}{x^2-(2-a)x+1}\mathrm{d}x
$$
$$
=1+2a+(-a^2+a+1)\int_0^1 \frac{2x-\frac{2(a+1)}{-a^2+a+1}}{x^2-(2-a)x+1}\mathrm{d}x
$$
$$
=1+2a+(-a^2+a+1)\int_0^1 \frac{2x-(2-a)}{x^2-(2-a)x+1}\mathrm{d}x+(-a^2+a+1)\left(2-a-\frac{2(a+1)}{-a^2+a+1}\right)\int_0^1\frac{1}{x^2-(2-a)x+1}\mathrm{d}x .
$$
We conclude that it is equal to
$$
1+2a+(-a^2+a+1)\ln|a|+(-a^2+a+1)\left(2-a-\frac{2(a+1)}{-a^2+a+1}\right)\int_0^1\frac{1}{x^2-(2-a)x+1}\mathrm{d}x.  
$$
You can calculate it explicitely, anyway it already proves your approximation
$$
1+\ln a+\mathcal{O}(a)
$$
holds true when $a \to 0^+$.
A: Notice, $$\int_0^1\frac{2x(x-2)(1-x)}{(1-x)^2+ax}\ dx$$
using property of definite integral: $\int_a^bf(x)\ dx=\int_a^bf(1+b-x)\ dx$, 
$$=\int_0^1\frac{2(1-x)(1-x-2)(1-1+x)}{(1-1+x)^2+a(1-x)}\ dx$$
$$=\int_0^1\frac{2x^3-2x}{x^2-ax+a}\ dx$$
$$=\int_0^1\left(2(x+a)+\frac{(a^2-a-1)x-a^2}{x^2-ax+a}\right)\ dx$$
$$=2\int_0^1(x+a)\ dx+\int_0^1\frac{(a^2-a-1)(2x-a)+(a^3-3a^2-a)}{x^2-ax+a}\ dx$$
$$= 2\left(\frac{x^2}{2}+ax\right)_0^1+(a^2-a-1)\int_0^1\frac{(2x-a)dx}{x^2-ax+a}+(a^3-3a^2-a)\int_0^1\frac{1}{x^2-ax+a}\ dx$$
$$=\small 2\left(\frac{1}{2}+a\right)+(a^2-a-1)\int_0^1\frac{d(x^2-ax+a)}{x^2-ax+a}+(a^3-3a^2-a)\int_0^1\frac{1}{\left(x-\frac a2\right)^2+a-\frac{a^2}{4}}\ dx$$
$$=1+2a+(a^2-a-1)\left(\ln|x^2-ax+a|\right)_0^1+(a^3-3a^2-a)\int_0^1\frac{1}{\left(x-\frac a2\right)^2+a-\frac{a^2}{4}}\ dx$$
$$=1+2a+(a+1-a^2)\ln |a|+(a^3-3a^2-a)\int_0^1\frac{1}{\left(x-\frac a2\right)^2+a-\frac{a^2}{4}}\ dx$$
I hope you can prove your approximation now. 
A: 
$$  \int\frac{2x(x-2)(1-x)}{(1-x)^2 + ax} \, \mathrm{d}x$$

Maybe this will help:
$$ 2\int \frac{x(x-2)(1-x)}{ax+x^2-2x+1} \, \mathrm{d}x$$
Long division:
$$ -2\int \frac{3x^2}{ax+x^2-2x+1}+2\int\frac{2x}{ax+x^2-2x+1}+2\int\frac{x^3}{ax+x^2-2x+1} \, \mathrm{d}x$$
now substitute $\nu=ax+x^2-2x+1$ and $d\nu=(2x+a)dx$
