How can I know a value of this limit? $$
\lim_{t\to 1^-} (1-t) \sum_{n=0}^\infty \frac{t^n}{1+t^n}
$$
I try to use L'hopital's rule but not successfully. Also I know that exist formula Sonine but I can't understand how I can use it.
 A: Fix $t\in(0,1)$. Let $f(x)=\frac{t^x}{1+t^x}$. Using area principle, we have that 
$$\sum_{n=0}^\infty f(n)=\int_{0}^\infty f(x) dx+E,$$
where $|E|\le f(0)=\frac12$.
It remains to estimate the integral. Let $y=t^x$. Then the integral can be rewritten as
$$\int_{0}^\infty f(x) dx=\int_{0}^\infty \frac{t^x}{1+t^x} dx=\frac{-1}{\log t}\int_{0}^1\frac{dy}{1+y}=\frac{-\log2}{\log t}.$$
So the limit we are looking for is
$$\lim_{t\rightarrow1^-}(1-t)\sum_{n=0}^\infty f(n)=\lim_{t\rightarrow1^-}\frac{t-1}{\log t}\log2=\log2.$$
A: For any $m$,
$$
\begin{align}
(1-t)\sum_{n=0}^\infty\frac{t^n}{1+t^n}
&=(1-t)\sum_{n=0}^\infty\sum_{k=1}^{m-1}(-1)^{k-1}t^{kn}\\
&+(-1)^{m-1}(1-t)\sum_{n=0}^\infty\frac{t^{mn}}{1+t^n}\\
&=\sum_{k=1}^{m-1}(-1)^{k-1}\frac{1-t}{1-t^k}+O\!\left(\frac{1-t}{1-t^m}\right)\tag1
\end{align}
$$
Let $t\to1^-$,
$$
\lim_{t\to1^-}(1-t)\sum_{n=0}^\infty\frac{t^n}{1+t^n}
=\sum_{k=1}^{m-1}\frac{(-1)^{k-1}}k+O\!\left(\frac1m\right)\tag2
$$
Let $m\to\infty$,
$$
\begin{align}
\lim_{t\to1^-}(1-t)\sum_{n=0}^\infty\frac{t^n}{1+t^n}
&=\sum_{k=1}^\infty\frac{(-1)^{k-1}}k\\[6pt]
&=\log(2)\tag3
\end{align}
$$
