limit of a geometric-type series I came across this series while studying probability theory.
Let $$T(x)=\sum_{n=1}^\infty x^n \left(\frac{1}{n}-\frac{1}{n+1}\right),$$
where $T(x)$ converges for some range of $x$.
My question is how to prove that $T(x)=1+\frac{1-x}{x}\log(1-x)$ for all $|x|<1$.
The following is my attempt.

It is tempting to differentiate $T$ w.r.t. $x$, which I cannot justify because $\sum_{n=1}^\infty x^{n-1} \frac{1}{n+1}$ is not uniformly convergent in $(-1,1)$:
$$T'(x)=\sum_{n=1}^\infty nx^{n-1} \left(\frac{1}{n}-\frac{1}{n+1}\right)=\sum_{n=1}^\infty x^{n-1} \frac{1}{n+1}.$$
It is also tempting to do the followings:
$$x^2 T'(x)=\sum_{n=1}^\infty x^{n+1} \frac{1}{n+1}:=P(x)$$
and differentiate $P(x)$ to get:
$$P'(x)=\sum_{n=1}^\infty x^n=\frac{x}{1-x}.$$
So, $P(x)=\int P'(x)dx=-x-\log(|x-1|)+C$, where $C$ is a constant, cf. here.
Then we have $T'(x)=-\frac{1}{x}-\frac{\log(|x-1|)}{x^2}+\frac{C}{x^2}$. But I don't know how to integrate the second term to recover $T(x)$.
Another crucial problem with my attempt is that, every step is formal and we lost track of the radius of convergence of $x$. Kind of being stuck here.
Thanks for any help.

How about using the known series for on(1-x) and elementary series rearrangements?
$\ln(1-x) = -\sum_{n=1}^\infty\frac{x^n}{n}$ for $-1<x\le 1$
so
\begin{align*}
T(x) 
&=
\sum_{n=1}^\infty x^n\left(\frac{1}{n} - \frac{1}{n+1}\right)
\\&=
\sum_{n=1}^\infty \frac{x^n}{n} - \sum_{n=1}^\infty\frac{x^n}{n+1}
\\&=
\sum_{n=1}^\infty \frac{x^n}{n} - \frac{1}{x}\sum_{n=2}^\infty\frac{x^n}{n}
\\&=
\sum_{n=1}^\infty \frac{x^n}{n} - \frac{1}{x}\left(-x+\sum_{n=1}^\infty\frac{x^n}{n}\right)
\\&=
-\ln(1-x) + 1 + \frac{1}{x}\ln(1-x)
\\&=
1 + \frac{1-x}{x}\ln(1-x)
\end{align*}
All steps are valid for $-1<x<1$, except possibly x=0 (but either think of it a removable singularity or check the original equation at x=0).
