Prove $\int_{a}^{a+1}{\ln(x-a)\over x^2}dx={{1\over a}\ln{a\over1+ a}}$ I want to prove the following: 

$$I=\int_{a}^{a+1}{\ln(x-a)\over x^2}dx=\color{blue}{{1\over a}\ln{a\over1+ a}}$$

we apply integration by parts: $$I=\int_{0}^{1}x^{-2}\ln(x-a)dx$$
$u=\ln(x-a)\rightarrow du={1\over x-a}dx$
$dv=x^{-2}\rightarrow v=-x^{-1}$
$$I=\left.-x^{-1}\ln(x-a)\right|_{a}^{a+1}+\int_{a}^{a+1}{1\over x(x-a)}dx$$
Let
$$J=\int_{a}^{a+1}{1\over x(x-a)}dx$$
$1=A(x-a)+Bx$
$x=a\rightarrow B={1\over a}$
$x=0\rightarrow A=-{1\over a}$
We have
$$J={1\over a}\int_{a}^{a+1}{1\over x-a}-{1\over x}dx={1\over a}\left.\ln\left({x-a\over x}\right)\right|_{a}^{a+1}$$
Substitute back in I
$$I=\left.-x^{-1}\ln(x-a)\right|_{a}^{a+1}+{1\over a}\left.\ln\left({x-a\over x}\right)\right|_{a}^{a+1}$$
Evaluate
$I=-{1\over a+1}\ln(1)+{1\over a}\ln(0)+{1\over a}\ln{1\over a+1}-{1\over a}\ln(0)={1\over a}\ln\left({1\over a+1} \right)$
This isn't correct where did I go wrong? Please give a hand.
 A: I think the problem comes from $J = \frac{1}{a} \ln(\frac{x-a}{x}) \mid_a^{a+1}$.
$$
J = \frac{1}{a} \ln(\frac{1}{a}+1) - \frac{1}{a} \ln(\frac{0}{a})
$$
You reduce the second term $\frac{1}{a} \ln(\frac{0}{a}) = \frac{1}{a} \ln(0)$ and cancel it with the second term in $I$. However you cannot do this as $\infty - \infty$ is not necessarily equal to $0$. The right way should be 
$$
I = -\frac{1}{a+1} \ln(1) + \lim_{x\to 0^+}\frac{1}{a} \ln(x) + \frac{1}{a}\ln(\frac{1}{a+1}) - \color{red}{\lim_{x\to 0^+}\frac{1}{a} \ln(x) + \frac{1}{a}\ln(a)} =  \frac{1}{a}\ln(\frac{1}{a+1}) + \frac{1}{a}\ln(a) = \frac{1}{a} \ln(\frac{a}{a+1} )
$$
A: $$\begin{eqnarray*}I(a)=\int_{a}^{a+1}\frac{\log(x-a)}{x^2}\,dx&=&\int_{0}^{1}\frac{\log x}{(x+a)^2}\,dx\\&=&\frac{1}{a^2}\int_{0}^{1}\frac{\log x}{\left(1+\frac{x}{a}\right)^2}\,dx\\&=&\frac{1}{a^2}\sum_{n\geq 0}(-1)^n (n+1)\int_{0}^{1}\frac{x^n\log x}{a^n}\,dx\\&=&\frac{1}{a^2}\sum_{n\geq 0}\frac{(-1)^{n+1}}{(n+1)a^n}\\&=&\frac{1}{a}\sum_{n\geq 1}\frac{(-1)^{n}}{n}\left(\frac{1}{a}\right)^n=\color{red}{-\frac{1}{a}\,\log\left(1+\frac{1}{a}\right)}.\end{eqnarray*}$$
Second approach:
$$ \int_{0}^{1}\frac{\log x}{(x+a)^2}\,dx = -\frac{d}{da}\int_{0}^{1}\frac{\log x}{x+a}\,dx = -\frac{d}{da}\,\text{Li}_2\left(-\frac{1}{a}\right)$$
and the same conclusion follows.
A: An evident mistake is in using $\ln0$ that's undefined. Be more careful.
First try finding an antiderivative:
$$
\int \frac{\ln(x-a)}{x^2}\,dx
=-\frac{1}{x}\ln(x-a)+\int\frac{1}{x(x-a)}\,dx
$$
Partial fractions give
$$
\frac{1}{x(x-a)}=\frac{1}{a}\left(\frac{1}{x-a}-\frac{1}{x}\right)
$$
so the second integral becomes
$$
\frac{1}{a}\ln(x-a)-\frac{1}{a}\ln x+c
$$
Thus an antiderivative is
$$
F(x)=\ln(x-a)\left(\frac{1}{a}-\frac{1}{x}\right)-\frac{1}{a}\ln x
$$
We have
$$
\lim_{x\to a^+}F(x)=
\lim_{x\to a^+}\left(\frac{(x-a)\ln(x-a)}{ax}-\frac{1}{a}\ln x\right)=
-\frac{\ln a}{a}
$$
provided $a>0$.
Moreover
$$
F(a+1)=-\frac{\ln(a+1)}{a}
$$
and therefore
$$
\int_{a}^{a+1} \frac{\ln(x-a)}{x^2}\,dx
=
-\frac{\ln(a+1)}{a}+\frac{\ln a}{a}=\frac{1}{a}\ln\frac{a}{a+1}
$$
For the case $a=0$, we have
$$
\int \frac{\ln x}{x^2}\,dx=-\frac{\ln x}{x}+\int\frac{1}{x}\,dx=
\left(1-\frac{1}{x}\right)\ln x+c
$$
and so $\int_0^1\frac{\ln x}{x^2}\,dx$ does not converge.
A: Using the generalized binomial theorem we have$$I=\int_{0}^{1}\frac{\log\left(x\right)}{\left(x+a\right)^{2}}dx=\sum_{k\geq0}\dbinom{-2}{k}a^{-2-k}\int_{0}^{1}x^{k}\log\left(x\right)dx
 $$ $$=-\frac{1}{a^{2}}\sum_{k\geq0}\dbinom{-2}{k}\frac{1}{\left(k+1\right)^{2}a^{k}}.
 $$ Now note that, from the definition of the Pochhammer' symbol, $$\dbinom{-2}{k}=\frac{\left(-2\right)_{k}}{k!}=\frac{\left(-1\right)^{k}\left(k+1\right)!}{k!}=\left(-1\right)^{k}\left(k+1\right)
 $$ so $$I=-\frac{1}{a^{2}}\sum_{k\geq0}\frac{\left(-1\right)^{k}}{\left(k+1\right)a^{k}}=-\frac{1}{a}\log\left(1+\frac{1}{a}\right).$$
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
\color{#f00}{\int_{a}^{a + 1}{\ln\pars{x - a} \over x^{2}}\,\dd x} & =
\int_{0}^{1}{\ln\pars{x} \over \pars{a + x}^{2}}\,\dd x =
-\,\partiald{}{a}\int_{0}^{1}{\ln\pars{x} \over a + x}\,\dd x =
\partiald{}{a}\int_{0}^{1}{\ln\pars{x} \over 1 - x/\pars{-a}}
\,{\dd x \over -a}
\\[3mm] & =
\partiald{}{a}\int_{0}^{-1/a}{\ln\pars{-ax} \over 1 - x}\,\dd x =
\partiald{}{a}\int_{0}^{-1/a}{\ln\pars{1 - x} \over x}\,\dd x
\\[3mm] & =
{\ln\pars{1 - \bracks{-1/a}} \over -1/a}\,{1 \over a^{2}} =
\color{#f00}{{1 \over a}\,\ln\pars{{a \over 1 + a}}}
\end{align}
