Evaluating $\int_{} \frac{xe^{2x}}{(1+2x)^2}dx$ via integration by parts $\int_{} \frac{xe^{2x}}{(1+2x)^2}dx$
I am having trouble picking the correct $u/dv$ before integrating by parts. I felt like L.I.A.T.E. did not really help me here...
This is what I tried, but it ended up with integration spiraling into an endless evaluation of an integral...
$$
\begin{align}
u &= (1 + 2x)^2 & dv &= xe^{2x}dx \\
du &= 2(1+2x)dx & v &= \frac{1}{2}x^2 \frac{1}{2}e^{2x} \\
 &= 2 + 4xdx & &= \frac{1}{4}x^2e^{2x}
\end{align}
$$
Am I at least correct in choosing the right $u/du$ values? That is all I really want to know, if I am allowed to choose the $u/du$ like how I did
 A: Hint:
Let $u=xe^{2x}$, $\text dv=\dfrac{\text dx}{(1+2x)^2}$.
Result:
$$\dfrac{\mathrm{e}^{2x}}{8x+4} + C$$
EDIT: More steps.
\begin{eqnarray*}
  \int \frac{xe^{2x}}{(1+2x)^2} \ \text dx &=& \left|\begin{array}{2}
  u=xe^{2x} & \text dv=\dfrac{\text d x}{(1+2x)^2} \\
  \text du = (1+2x)e^{2x}\ \text dx & v=-\dfrac{1}{2(1+2x)}
\end{array}\right| = \\
&=& -\frac{xe^{2x}}{2(1+2x)} + \frac{1}{2} \int e^{2x}\ \text dx = \\
&=&-\frac{xe^{2x}}{2(1+2x)} + \frac{1}{4}e^{2x} + C = \\
&=& e^{2x}\left( -\frac{x}{2(1+2x)}+\frac{1}{4} \right) + C = \boxed{\frac{e^{2x}}{8x+4} + C}
\end{eqnarray*}
A: $u=1+2x$:
$$\require{cancel}
\int\frac{xe^{2x}}{(1+2x)^2}\,dx=
\frac{1}{4}\int\frac{(1+2x-1)e^{2x+1-1}}{(1+2x)^2}\frac{d}{dx}(1+2x)\,dx=\\
\frac{1}{4}\int\frac{(u-1)e^{u-1}}{u^2}\,du=
\frac{1}{4e}\int\left(\frac{ue^{u}}{u^2}-\frac{e^{u}}{u^2}\right)\,du=\\
\frac{1}{4e}\int\left(\frac{e^{u}}{u}-\frac{e^{u}}{u^2}\right)\,du=
\frac{1}{4e}\left(\int e^{u}\frac{1}{u}\,du-\int e^{u}\frac{1}{u^2}\,du\right)=\\
\frac{1}{4e}\left(\int e^{u}(\ln{u})'\,du+\int e^{u}\left(\frac{1}{u}\right)'\,du\right)=\\
\frac{1}{4e}\left(e^{u}\ln{u}-\int e^{u}\ln{u}\,du+\frac{e^u}{u}-\int e^{u}\frac{1}{u}\,du\right)=\\
\frac{1}{4e}\left(e^{u}\ln{u}-\int e^{u}\ln{u}\,du+\frac{e^u}{u}-\int e^{u}(\ln{u})'\,du\right)=\\
\frac{1}{4e}\left(\cancel{e^{u}\ln{u}}-\cancel{\int e^{u}\ln{u}\,du}+\frac{e^u}{u}-\cancel{e^{u}\ln{u}}+\cancel{\int e^{u}\ln{u}\,du}\right)=\\
\frac{1}{4e}\frac{e^u}{u}=\frac{1}{4e}\frac{e^{1+2x}}{1+2x}=\frac{e\cdot e^{2x}}{4e(1+2x)}=\frac{e^{2x}}{4+8x}+C.
$$
Wolfram Alpha check
