Difficulties with partial integration I have asked several questions on the site regarding this topic already, but I can't seem to grasp this at all. Consider the following example:
$$ h(x) = e^{2x} \sin x$$
We have to find the integral. I rewrote this to the form:
$$e^{2x} \sin x \space dx =  d( -\cos x e^{2x}) - (-\cos x \dfrac{1}{2} e^{2x} \space dx)$$
I continued this:
$$e^{2x} \sin x \space dx = d( -\cos x e^{2x}) - d (- \sin \space x \dfrac{1}{2} e^{2x}) - (- \sin x \dfrac{1}{4}e^{2x} \space dx)$$
I subtracted the last term with the term on the LHS:
$$\dfrac{3}{4} (e^{2x} \sin x) \space dx = d( -\cos x e^{2x}) - d (- \sin \space x \dfrac{1}{2} e^{2x})$$
Apparently this is totally wrong but I have no idea what I did wrong or how it should be done otherwise. Can anyone help me find my errors? And perhaps give some tips?
 A: 
I've never properly learned the notations with du and dx and dy/dx
  and such. Does du mean u'?

If you have a function $u(x)$ of the single variable $x$, the differential $du$ can be seen as the product of the derivative of $u(x)$ with the differential $dx$ of the independent variable, i.e. $du=u'(x)\ dx$. 
For a detailed explanation of the notation see this answer.
--
The integration by parts corresponds to the following rule:
$$
\begin{equation*}
\int u(x)v^{\prime }(x)\ dx=u(x)v(x)-\int u^{\prime }(x)v(x)\ dx.
\end{equation*}
$$
We can select the functions $u(x),v(x)$ by using the LIATE rule as in my answer to your second last question or the techniques explained in the answers to your last question LIATE / ILATE rule. We get$^1$:
$$\int e^{2x}\sin x\,dx=\frac{1}{2}e^{2x}\sin x-\int \frac{1}{2}e^{2x}\cos
x\,dx$$
and
$$\int \frac{1}{2}e^{2x}\cos x\,dx=\frac{1}{4}e^{2x}\cos x+\frac{1}{4}\int
e^{2x}\sin x\,dx.$$
Consequently,
$$\begin{eqnarray*}
I &=&\int e^{2x}\sin x\,dx=\frac{1}{2}e^{2x}\sin x-\int \frac{1}{2}
e^{2x}\cos x\,dx \\
&=&\frac{1}{2}e^{2x}\sin x-\frac{1}{4}e^{2x}\cos x-\frac{1}{4}\int
e^{2x}\sin x\,dx \\
&=&\frac{1}{2}e^{2x}\sin x-\frac{1}{4}e^{2x}\cos x-\frac{1}{4}I.
\end{eqnarray*}
$$
Solving for $I$ we thus get
$$
\begin{eqnarray*}
\left( 1+\frac{1}{4}\right) I &=&\frac{1}{2}e^{2x}\sin x-\frac{1}{4}
e^{2x}\cos x \\
I &=&\frac{4}{5}\left( \frac{1}{2}\sin x-\frac{1}{4}\cos x\right) e^{2x}.
\end{eqnarray*}
$$
--
$^1$ The first integral can be evaluated as follows.  If $u(x)=\sin x$ and $v^{\prime }(x)=e^{2x}$, then $u^{\prime }(x)=\cos x$
and $v(x)=\frac{1}{2}e^{2x}$. The integration by parts yields
$$\int \underset{u(x)}{\underbrace{\sin x}}\,\cdot\underset{v^{\prime }(x)}{\underbrace{e^{2x}}}\ dx=\underset{u(x)}{\underbrace{\sin x}}\,\cdot\underset{v(x)}{\underbrace{\frac{1}{2}e^{2x}}}-\int \underset{u^{\prime }(x)}{\underbrace{\cos x}}\cdot\underset{v(x)}{\,\underbrace{\frac{1}{2}e^{2x}}}\ dx.$$
Remark. As can be seen in AWertheim's answer the opposite selection $u(x)=e^{2x}$ and $v^{\prime }(x)=\sin x$ works too.
A: Let $P=\int e^{ax}\cos(bx)dx$ and $Q=\int e^{ax}\sin(bx)dx$
 $$P+iQ=\int e^{ax}\cdot e^{ibx}dx=\int e^{(a+ib)x}dx$$
$$P+iQ=\frac{1}{a+ib}e^{(a+ib)x}+C=\frac{ae^{ax}\cos bx+be^{ax}\sin bx +i(ae^{ax}\sin bx -be^{ax}\cos bx)}{a^{2}+b^{2}}+C$$
$$P=\frac{e^{ax}(a\cos bx+b\sin bx)}{a^{2}+b^{2}}+C$$
$$Q=\frac{e^{ax}(a\sin bx-b\cos bx )}{a^{2}+b^{2}}+C$$
In the given question a=2 and b=1.
$$\int e^{2x}\sin x\textrm{ d}x=\frac{1}{5}(-e^{2x}\cos x + 2e^{2x}\sin x) + C$$
A: We apply repeated integration by parts, making sure to be careful with the terms.
Let $u = e^{2x}$ and $dv = \sin x dx$. Then $du = 2e^{2x}$ and $v = -\cos x$, and we see:
$$\int e^{2x}\sin x dx = -e^{2x}\cos x + 2\int e^{2x}\cos x dx$$
We apply integration by parts again here on the integral on the right hand side. 
Let $u = e^{2x}$ and $dv = \cos x dx$. Then $du = 2e^{2x}$ and $v = \sin x$, and we see:
$$\int e^{2x}\sin x dx = -e^{2x}\cos x + 2[e^{2x}\sin x - 2\int e^{2x}\sin x dx]$$
Rearranging carefully, we see:
$$5\int e^{2x}\sin x dx = -e^{2x}\cos x + 2e^{2x}\sin x$$
or 
$$\int e^{2x}\sin x dx = \frac{1}{5}[-e^{2x}\cos x + 2e^{2x}\sin x] + C$$
accounting for an appropriate constant of integration.
A: Your instructor/book is using non-traditional notation. 
What students usually find easy is to proceed as follows, using the mnemonic
$$\int u\,dv=uv-\int v\,du.$$
Let $u=e^{2x}$ and let $dv=\sin x\,dx$. Then $du=2e^{2x}\,dx$ and $v=-\cos x$. It is helpful to put this in a little table, like
$$\begin{align}
&u=e^{2x} \qquad &dv= \sin x\,dx\\
&du=2e^{2x}\,dx  &v=-\cos x
\end{align}
$$
Our integral is then 
$$-e^{2x}\cos x+\int 2e^{2x}\cos x\,dx.$$
Now continue as in the answer to your previous question. 
A: Here is how I approach this rather confusing topic, with a slightly different notation.
Let's define down as $f^\downarrow =f'$ and up as $f^\uparrow=\int f$ and 
similarly double down as
$f^{\downarrow\downarrow} =f''$ and  double up as $f^{\uparrow\uparrow}=\int\int f$  and so on.
Now to do one round of  integration by parts use
$\int f g = f g^{\uparrow} - \int (f^\downarrow g^\uparrow)$
To do two rounds use
$\int f g =f g^{\uparrow} - f^\downarrow g^{\uparrow\uparrow}+ \int (f^{\downarrow\downarrow} g^{\uparrow\uparrow})$
in simple applications $f$ is a polynomial so its down is a simpler polynomial. 
You notice in each term the number of up moves is one more than down moves.
Also in the first and last integrals the number of ups and downs are equal, and the integral itself counts as one up.
To do three rounds use 
$\int f g =f g^{\uparrow} - f^\downarrow g^{\uparrow\uparrow}+ f^{\downarrow\downarrow}g^{\uparrow\uparrow\uparrow}- \int (f^{\downarrow\downarrow\downarrow} g^{\uparrow\uparrow\uparrow})$.
For example to do $\int x^3 e^{2x}dx$ we notice that the fourth (and subsequent) derivatives of $x^3$ will be zero so we go that far and get a convenient zero in the last integral 
$\int x^3 e^{2x} = (x^3) (e^{2x})^{\uparrow} -(x^3)^\downarrow (e^{2x})^{\uparrow\uparrow}+ (x^3)^{\downarrow\downarrow}(e^{2x})^{\uparrow\uparrow\uparrow}-(x^3)^{\downarrow\downarrow\downarrow} (e^{2x})^{\uparrow\uparrow\uparrow\uparrow}+\int (x^3)^{\downarrow\downarrow\downarrow\downarrow} (e^{2x})^{\uparrow\uparrow\uparrow\uparrow}$
$\int x^3 e^{2x} =(x^3) (e^{2x}/2)-(3x^2)(e^{2x}/4)+(6x)(e^{2x}/8)-(6)(e^{2x}/16)+C$
Now, in your example you are dealing with a tricky integral where you go so far on the right until the integral looks like the original one, just differing by a constant multiple. At which point you stop and bring the right integral to left, hence completing the circle so to speak.  Here is how it goes: for cosine two rounds of either up or down brings us back to cosine so we use
$\int e^{ax} \cos bx = (e^{ax}) (\cos bx)^{\uparrow} - (e^{ax})^\downarrow (\cos bx)^{\uparrow\uparrow}+ \int (e^{ax})^{\downarrow\downarrow} (\cos bx)^{\uparrow\uparrow}$ 
$\int e^{ax} \cos bx = (e^{ax}) (\sin bx /b) - (a e^{ax}) (-\cos bx /b^2)+ \int (a^2e^{ax}) (-\cos bx /b^2)$ 
Now you bring the last integral to the left and factor it (postpone the constant to the last step)
$(1+a^2/b^2)\int e^{ax} \cos bx = 1/b e^{ax}\sin bx + a/b^2 e^{ax}\cos bx $ 
Now clean up to get
$\int e^{ax} \cos bx = e^{ax}(b\sin bx + a \cos bx)/(a^2+b^2) +C $ 
