Integrate the function $\;\int\;\frac{xe^x}{(1+x)^2}$

Toolbox:
• $\int e^x\{f(x)+f'(x)\}dx=e^xf(x)+c.$
Given $I=\int\frac {xe^x}{(1+x)^2}dx=\int e^x\begin{bmatrix}\frac{x}{(1+x)^2}\end{bmatrix}dx.$.

Add and subtract 1 to the numerator,

$I=\int e^x\begin{bmatrix}\frac{x+1-1}{(1+x)^2}\end{bmatrix}dx.$

Now separating the terms we get,

$I=\int e^x\begin{bmatrix}\frac{1}{(1+x)}-\frac{1}{(1+x)^2}\end{bmatrix}dx.$

Clearly here f(x)=$\frac{1}{(1+x)}$ and $f'(x)=\frac{-1}{(1+x)^2}$.

So $\int e^x\begin{bmatrix}\frac{1}{1+x}-\frac{1}{(1+x)^2}\end{bmatrix}=e^x\big(\frac{1}{1+x}\big)+c.$