<s>[INST] Find $\int\frac{x^2+x}{(e^x+x+1)^2}dx$ $\int\frac{x^2+x}{(e^x+x+1)^2}dx$
I tried solving it but could not finish.I tried putting $e^x=t$ but not getting integrable.Please help me in solving it.
 [/INST] \begin{align}
\int\frac{x(x+1)}{(1+e^x+x)^2}dx&=\int\frac{(1+e^x+x)^2-(1+e^x)(1+e^x+x)-xe^x}{(1+e^x+x)^2}dx\\
&=\int1dx-\int\frac{1+e^x}{(1+e^x+x)}dx-\int\frac{xe^x}{(1+e^x+x)^2}dx\\
\end{align}
</s>