<s>[INST] Find of $\int e^x \cos(2x) dx$ I did the following.
Using the LIATE rule:
$$\begin{align*}
u &=& \cos(2x)\\
u\prime &=& -2 \sin(2x)\\
v &=& e^x\\
v\prime&=&e^x 
\end{align*}$$
We get:
$$\int e^x \cos(2x)dx = e^x \cos(2x) +2 \int e^x \sin(2x)dx $$
Now we do the second part.
$$\begin{align*}
u &=& \sin(2x)\\
u\prime &=& 2 \cos(2x)\\
v &=& e^x\\
v\prime&=&e^x 
\end{align*}$$
We get:
$$\int e^x \sin(2x)dx = e^x \sin(2x) -2 \int e^x \cos(2x)dx$$
Putting it together we get:
$\begin{align*}
\int e^x \cos(2x)dx &=& e^x \cos(2x) +2 \int e^x \sin(2x)dx \\
&=&e^x \cos(2x) + 2[e^x \sin(2x) -2 \int e^x \cos(2x)dx]\\
&=&e^x \cos(2x) + 2e^x \sin(2x) -4 \int e^x \cos(2x)dx
\end{align*}$
$\begin{align*}
\int e^x \cos(2x)dx &=&e^x \cos(2x) + 2e^x \sin(2x) -4 \int e^x \cos(2x)dx\\
5\int e^x \cos(2x)dx &=&e^x(\cos(2x) + 2 \sin(2x))\\
\int e^x \cos(2x)dx &=&\frac{e^x( \cos(2x) + 2 \sin(2x))}{5}
\end{align*}$
I am not sure if this is right, if it is right, is there a better way of doing this.
 [/INST] Hint: Take the derivative of both sides with respect to $x$ to see if you did everything right.
</s>