Find $ \int x^{-n}(1-x)^{-1}\,dx. $ Let 
$$ f(x) = \frac{1}{x^n(1-x)} $$
where $n\in \mathbb{N}$ and $x$ is not 0 or 1.
In a previous question, i determined that the partial fraction decomposition of $f(x)$ is 
$$ f(x) = \sum_{j=1}^{n}\frac{1}{x^j} + \frac{1}{(1-x)}$$
Integrating this, when $n = 1$, I have:
$$ \int f(x)\, dx = \ln|x|-\ln|1-x| + C = \ln\left|\frac{x}{1-x}\right|+C,$$ for $x \neq 1,0$.
If $n >1$, I have (after some trial and error),
$$ \int f(x)\, dx = \ln|x|+ \sum_{j=2}^{n}\frac{x^{-j+1}}{-(j-1)}-\ln|1-x| + C $$
Have I missed anything here? Thanks for the feedback!

For each $j\neq 1$, if
$$g_j(x)=x^{-j}$$
then
$$\int g_j(x) dx =\frac{x^{1-j}}{1-j}+C$$
Thus, given
$$ f(x) = \sum_{j=1}^{n}\frac{1}{x^j} + \frac{1}{(1-x)}$$
we have
$$ \int f(x)dx = \int\frac1 xdx+ \sum_{j=2}^{n}\int \frac{dx}{x^j} +\int \frac{dx}{(1-x)}$$
whence
$$ \int f(x)dx = \log x+ \sum_{j=2}^{n}\frac{x^{1-j}}{1-j} +\log{(1-x)}+C$$
You're right.
