Question:
Evaluate: $\int\left(e^{x}+1\right)^{2} e^{x} d x$
Solution:
Let $I=\int\left(e^{x}+1\right)^{2} e^{x} d x$
Let $\mathrm{e}^{\mathrm{x}}+1=\mathrm{t}=\mathrm{e}^{\mathrm{x}} \mathrm{dx}=\mathrm{dt}$
$I=\int\left(e^{x}+1\right)^{2} e^{x} d x$
$=\int t^{2} d t$
$=\frac{t^{3}}{3}$
Now, substitute the value of $t$
Hence, $I=\frac{\left(e^{x}+1\right)^{3}}{3}+C$