I need to integrate $$\int(e^x+2x)^2dx.$$
I tried breaking it into $$\int(e^x+2x)(e^x+2x)dx$$ and then integrating by parts, but got stuck at $$ \int (e^x + 2x)^2\,dx = (e^x+2x)(e^x+x^2)-\int(e^x+2x)(e^x+x^2)dx $$
I need to integrate $$\int(e^x+2x)^2dx.$$
I tried breaking it into $$\int(e^x+2x)(e^x+2x)dx$$ and then integrating by parts, but got stuck at $$ \int (e^x + 2x)^2\,dx = (e^x+2x)(e^x+x^2)-\int(e^x+2x)(e^x+x^2)dx $$
On
We can expand the square bracket in the integrand to get
\begin{equation*} \int (4x^2+4e^xx+e^{2x})dx\\ =4\int x^2dx+4\int e^xxdx+\int e^{2x}dx. \end{equation*} via the linearity of the integral.
Integrating (using integration by parts for the second integral) gives us
\begin{equation*} -4e^x+4e^xx+\frac{4x^3}{3}+\frac{e^{2x}}{2}+C\\ =\frac{4x^3}{3}+\frac{e^{2x}}{2}+4e^x(x-1)+C \end{equation*} for a constant $C$.$~_{\square}$
$$\int (e^{2x}+4xe^x+4x^2)dx=0.5e^{2x}+4/3x^3+\int 4xe^xdx$$
by using the by parts method you can integrate the last term