Tphysics said:
1. The answer to this problem is easy when plugged into mathematica it's (pi^2)/3. I am trying to integrate it by hand however and can't figure out how to start it. I also can't find any other attempts of it online (our professor says we can just look it up if we can find it).
[(x^2*E^x)/(E^x + 1)^2, {x, -Infinity, Infinity}]
2. No equations
3. I've tried U-sub with setting U= (e^x+1) and then tried some integration by parts but I'm not getting there.
This actually turns out to be very complicated to do and I am having trouble giving hints that you can follow without giving too much of the answer away, so please bear with me. At least using Mathematica seems like a legitimate solution to the problem and I don't believe that many people would expect an undergrad to come up with the solution below on their own.
First, integrals of functions of ##x^n## times exponentials can often be done by replacing ##e^x## by ##e^{a x}## and then noting that ##d/da(e^{ax}) = x e^{ax}##, so we try to replace the powers of ##x## with derivatives of another expression. Then we can exploit this by bringing the derivative outside of the integral. For example
$$\int dx ~ x e^x = \left[ \frac{d}{da} \int dx~e^{ax} \right]_{a=1},$$
which you should be able to verify by doing both integrals explicitly.
In your case, we can use
$$ \frac{x^2 e^x}{(e^x+1)^2} = \left[ \frac{d^2}{da^2} \ln ( 1+ e^{ax})\right]_{a=1}.$$
Furthermore, we can determine the indefinite integral
$$ \int dx \ln ( 1+ e^{ax}) $$
in terms of the dilogarithm function (see for instance
https://en.wikipedia.org/wiki/Spence's_function)
$$\text{Li}_2(z) = - \int^z_0 \frac{du}{u} \ln ( 1-u).$$
The big difficulty here is that the dilogarithm is infinite as ##z\rightarrow -\infty##, so the naive substitution for your integral over the whole real axis will result in a divergent integral. (The dilogarithm is also usually not defined for ##1 \leq z < \infty##, but I believe that the proper substitutions keep us on the negative real axis.) However, I believe that it is possible to show that the definite integral
$$ F(a) =\int_{-\infty}^0 dx \ln ( 1+ e^{ax}) $$
exists. So we should break your original integral into two parts, then the answer can be expressed as the appropriate derivative of ##F(a)+F(-a)##.
It will probably be important to use the results (
https://en.wikipedia.org/wiki/Spence's_function#Special_values) ##\text{Li}_2(-1)=-\pi^2/12## and ##\text{Li}_2(0)=0.##