I have to evaluate the following integral: $\int\frac{xe^{2x}}{(1+2x)^2}dx$.
The James Stewart Essential Calculus: Early Transcendentals Second Edition answer is $\frac{e^{2x}}{4(2x+1)}+C$.
My calculator gave me the answer $\frac{\int\frac{e^{2x}}{2x+1}dx}{2}-\frac{\int{\frac{e^{2x}}{(2x+1)^2}}dx}{2}$.
Now I am trying the problem and seem to keep running into issues when doing the problem (side note I have learned circular intergration, u-substitution, and integration parts so theses are the best methods use, and also I have done multiple attempts....)
Attempts
Number 1
I set up my integral like this:
$$I=\int\frac{xe^{2x}}{(1+2x)^2}dx$$
and used intergration by parts, and set my u's, and dv's:
$$u=\frac{x}{(1+2x)^2}$$ and $$dv=e^{2x}dx$$ and then $du=\frac{-2x+1}{(1+2x)^3}dx$, and $v=\frac{1}{2}e^{2x}$
Then doing that I get the following: $$I=\frac{xe^{2x}}{2(1+2x)^3}+\frac{1}{2}\int\frac{2x-1}{(1+2x)^3}e^{2x}dx$$ and I realized if I kept integrating I would keep going and just increase the denominator power to higher numbers.
Attempt 3
Then I tried for my third attempt I decided to do it differently and set my u's and dv's differently.
$u=e^{2x}$ and $dv=\frac{x}{(1+2x)^2}dx$, and then $du=2e^{2x}$ and $v=\int\frac{x}{(1+2x)^2}dx$
I used u-substitution to solve for my v and it went terrible. My was $u=2x+1$, and $x=\frac{u-1}{2}$, an d $du=2dx$
$$v=\frac{1}{4}\int{\frac{u-1}{u^2}}du$$
HINT.
$$t = 2x + 1$$
Which will lead you to
$$-\frac{1}{4}\int \frac{e^{t-1}}{t^2}\ dt + \frac{1}{4}\int \frac{e^{t-1}}{t}\ dt$$
Now integrate by parts with
$$f = e^{t-1} ~~~~~~~ g' = -\frac{1}{t^2}$$
And then with
$$f' = e^{t-1} ~~~~~~~ g = \frac{1}{t}$$
And you will get the wanted result.