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?
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.