How to evaluate $\int_{-\infty}^{\infty}dx \frac{x^2 e^x}{(e^x+1)^2}$ My physics textbook makes use of the result:
$$\int_{-\infty}^{\infty}dx \dfrac{x^2 e^x}{(e^x+1)^2} = \dfrac{\pi^2}{3}$$
I'm really curious on how I can derive this but I honestly don't know what to search for. My instinct is to transform to polar coordinates but I would like some guidance. Any help appreciated! 

First off, notice the integrand is even, so we have $$ \int_{-\infty}^\infty \frac{x^2 e^x}{(e^x+1)^2}dx = 2\int_{0}^\infty \frac{x^2 e^x}{(e^x+1)^2}dx.$$ Then we can expand $$ \frac{1}{(1+x)^2} = \sum_{n=0}^\infty (-1)^{n}(n+1) x^n $$ and write $$ 2\int_{0}^\infty \frac{x^2 e^x}{(e^x+1)^2}dx=\\ =2\int_{0}^\infty \frac{x^2 e^{-x}}{(e^{-x}+1)^2}dx \\ = 2 \int_0^\infty x^2e^{-x}\sum_{n=0}^\infty (-1)^n (n+1) e^{-nx}\\=2\sum_{n=0}^\infty (-1)^n(n+1) \int_0^\infty x^2 e^{-(n+1)x}dx\\=4\sum_{n=0}^\infty \frac{(-1)^n}{(n+1)^2}.$$ Then we have $$ \sum_{n=0}^\infty \frac{(-1)^n}{(n+1)^2} = 1-\frac{1}{2^2} + \frac{1}{3^2}\ldots = (1-\frac{2}{2^2})(1+\frac{1}{2^2} + \frac{1}{3^2}\ldots) = \frac{\pi^2}{12}$$
Edit
Realized this can be simplified somewhat by first doing an integration by parts $$ 2\int_0^\infty \frac{x^2 e^x}{(e^x+1)^2}dx = 4\int_0^\infty \frac{x}{e^x+1}dx$$ followed by a similar series expansion. Additionally, this solution somewhat 'misses the point' relative to contour integration approaches since that's one of the slicker ways to get $\sum_{n}1/n^2=\pi^2/6$ in the first place (and also transformation from the sums to integrals like this are the source of many zeta function identities).
