<s>[INST] 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
 [/INST] 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*}
</s>