Compute \(\int e^{2x}\sin(x) \, dx\)
We do \(u = \sin(x), v'
= e^{2x}\text{,}\) which gives \(u' = \cos(x), v = \frac{e^{2x}}{2}\text{,}\) so
\begin{equation*}
\int
e^{2x}\sin(x)\,dx =
\frac{\sin(x)e^{2x}}{2}-\int \frac{e^{2x}\cos(x)}{2}\,dx
\end{equation*}
\begin{equation*}
=
\frac{\sin(x)e^{2x}}{2}-\frac12 \int e^{2x}\cos(x)\,dx
\end{equation*}
We now have to calculate \(\int
e^{2x}\cos(x)\,dx\text{.}\) Using integration by parts again, we have \(u =
\cos(x), v'
=
e^{2x}\text{,}\) so \(u' = -\sin(x), v = \frac{e^{2x}}{2}\text{,}\) and we get
\begin{equation*}
\int
e^{2x}\cos(x)\,dx =
\frac{\cos(x)e^{2x}}{2}-\int \frac{-\sin(x)e^{2x}}{2}\,dx
\end{equation*}
\begin{equation*}
=
\frac{\cos(x)e^{2x}}{2}
+ \frac12 \int \sin(x)e^{2x}\,dx
\end{equation*}
It looks like we are back at square one, but this is actually helpful. We can write
\begin{equation*}
\int
e^{2x}\sin(x) \, dx =
\frac{\sin(x)e^{2x}}{2}-\frac12(\frac{\cos(x)e^{2x}}{2} + \frac12 \int
\sin(x)e^{2x}\,dx)
\end{equation*}
\begin{equation*}
=
\frac{\sin(x)e^{2x}}{2} - \frac{\cos(x)e^{2x}}{4} - \frac14 \int
\sin(x)e^{2x}\,dx
\end{equation*}
If we denote \(I = \int e^{2x}\sin(x) \, dx\text{,}\) this equation can be written as
\begin{equation*}
I
=
\frac{\sin(x)e^{2x}}{2} - \frac{\cos(x)e^{2x}}{4} - \frac14I
\end{equation*}
solving this equation for \(I\) yields
\begin{equation*}
I = \frac{2\sin(x)e^{2x}}{5} - \frac{\cos(x)e^{2x}}{5} + C
\end{equation*}