An integral that somehow equals pi^2/6 and involves dilogarithms? I am attempting to show that
$$ \sum_{k \ge 1}^\infty {k^2 x^k \over (1+x^k)^2} \sim (1-x)^{-3} {\pi^2 \over 6} $$
as $x$ approaches 1 from below.  The sum can be approximated by the integral
$$ \int_0^\infty {k^2 x^k \over (1+x^k)^2} \: dk $$
and making the change of variable $u = x^k$ this is equal to
$$ {1 \over \log^3 x} \int_1^0 {\log^2 u \over (1+u)^2} \: du. $$
Maple tells me that this integral is equal to $\pi^2/6$.  Moreover if I try to find the same integral but with arbitrary rational numbers as bounds, it is successful: for example
$$ \int_{1/2}^2 {\log^2 u \over (1+u)^2} \: du = -4 \log 2 \log 3 + {7 \over 3} \log^2 2 - 2 dilog(3) + 2 dilog(3/2). $$
Specifically, I'd like to know:


*

*How can I find the integral in the third displayed equation (or, really what I'm interested in, the sum in the first displayed equation)? 

*How can I find the indefinite integral $\int \log^2 u / (1+u)^2 \: du$?

*Various integrals of this type (roughly speaking, logarithms divided by polynomials) are recurring in my work.  Presumably they can be computed with the ordinary techniques of calculus and the correct identities involving polylogarithms.  What are these identities, or where can I find them?
 A: For your second point, you can ask Mathematica, which tells me that the integral is $$\log (u) \left(\frac{u \log (u)}{u+1}-2 \log   (u+1)\right)-2 \text{Li}_2(-u).$$
The integral in your second displayed equation is, according to it, $$k x (-(1/(1 + x^k)) + {}\_2F\_1(1/k, 1, 1 + 1/k; -x^k)).$$
A: This problem can also be approached by rewriting the sum. I'll show a lot of details, probably too many, here.
Use the binomial series to write
$ \frac{1}{(1+x^k)^2} = \sum_{m=0}^{\infty} \binom{m+1}{1} (-1)^m x^{km} $
and insert this into the original sum $S$ to obtain
$ S = \sum_{k=1} k^2 x^k \sum_{m=0} (-1)^m (m+1) x^{km}. $
Interchange the sums to obtain
$ S = \sum_{m=0} (m+1) (-1)^m \sum_{k=1} k^2 x^{k(m+1)} $
$ = \sum_{m=0} (m+1) (-1)^m \frac{x^{m+1} (1+x^{m+1})}{(1-x^{m+1})^3} $
$ = -\sum_{m=1} m (-1)^m \frac{x^{m} (1+x^{m})}{(1-x^{m})^3}. $
Now use the factorization $1-x^m = (1-x)(1+x+x^2 +x^3 + \cdots + x^{m-1}) $ to write
$ S = \frac{-1}{(1-x)^3} \sum_{m=1} (-1)^m m \frac{x^m (1+x^m)}{(1+x+x^2 + \cdots + x^{m-1})^3}. $
We have now factored out the most singular term as $x \rightarrow 1.$ We can take the most rough approximation of the sum by finding its limit as $x \rightarrow 1$, which gives
$ S \approx \frac{-1}{(1-x)^3} \sum_{m=1} (-1)^m m \frac{2}{m^3}.$
Using the known sum $ \sum_{m=1} \frac{ (-1)^m }{m^2} = -\frac{\pi^2}{12} $ now gives 
$S \approx \frac{\pi^2}{6} \frac{1}{(1-x)^3} $ as desired....
NOTE: the last sum over $m$, if you don't just take $x=1$, but keep the powers $x^m$ in the numerator, gives dilogarithms of $x$ and $x^2$. However, I've probably thrown away too much in the denominator for that to be useful!!
A: About learning about logarithmic integral and polylogarithm identities, there are large compendium of formulae on everything (Gradstein Ryzhik Jeffreys for instance), a few classic monographies such as Nielsen, Lewin, some new books (some of them with a physicist point of view since polylogarithm appear when dealing with Feynman path integrals among others) and also this online resource.  You can print the pdf version of this list of dilogarithm identities for instance.  
A: Power series decomposition does the job immediately: you can find $\int_0^1u^n\log^2 u du$ integrating by parts twice and the Euler identity for the sum of inverse squares finishes the story. As to dilog, it is just a fancy name for a very similar integral, so what is behind the scene there is a trivial reformulation of the original problem. As to the sum, it is not an elementary function (too many singular points on the complex plane), so you need to specify the exact meaning of the word "find" in this context.
