$$ \int \frac{x^2 + x}{(e^x + x +1)^2}dx $$
I cant think of any substitution to start this question.
Let $$I = \int\frac{x^2+x}{(e^x+x+1)^2}dx = \int\frac{e^{-2x}(x^2+x)}{(1+xe^{-x}+e^{-x})^2}dx$$
So $$I = \int\frac{[(1+xe^{-x}+e^{-x})-1](xe^{-x})}{(1+xe^{-x}+e^{-x})^2}dx$$
Now put $(1+xe^{-x}+e^{-x}) = t\;,$ Then $xe^{-x}dx = -dt$
So Integral $$I = -\int \frac{(t-1)}{t^2}dt = \int\frac{1-t}{t^2}dt$$
So we get $$I = -\frac{1}{t}-\ln|t|+\mathcal{C} = \frac{e^x}{1+x+e^{x}}-\ln \left|\frac{1+x+e^{x}}{e^x}\right|+\mathcal{C}$$
So we get $$I = x-\frac{e^x}{1+x+e^{x}}-\ln|1+x+e^{x}|+\mathcal{C}$$
Copyright © 2021 JogjaFile Inc.
Let $$I = \int\frac{x^2+x}{(e^x+x+1)^2}dx = \int\frac{e^{-2x}(x^2+x)}{(1+xe^{-x}+e^{-x})^2}dx$$
So $$I = \int\frac{[(1+xe^{-x}+e^{-x})-1](xe^{-x})}{(1+xe^{-x}+e^{-x})^2}dx$$
Now put $(1+xe^{-x}+e^{-x}) = t\;,$ Then $xe^{-x}dx = -dt$
So Integral $$I = -\int \frac{(t-1)}{t^2}dt = \int\frac{1-t}{t^2}dt$$
So we get $$I = -\frac{1}{t}-\ln|t|+\mathcal{C} = \frac{e^x}{1+x+e^{x}}-\ln \left|\frac{1+x+e^{x}}{e^x}\right|+\mathcal{C}$$
So we get $$I = x-\frac{e^x}{1+x+e^{x}}-\ln|1+x+e^{x}|+\mathcal{C}$$