There are a few ways to approach problems like this. I personally think that using complex numbers are the best way, but if you are not comfortable with this method then there are other ways.
Firstly imagine we are trying to solve two different integrals, defined below:
$$I=\int e^x\cos(x)dx$$
$$J=\int e^x\sin(x)dx$$
If we combine these two we can get:
$$I+jJ=\int e^x\cos(x)dx+j\int e^x\sin(x)dx=\int e^x\left[\cos(x)+j\sin(x)\right]dx$$
now if we use Euler's formula which states that $e^{jx}=\cos(x)+j\sin(x)$ we get:
$$I+jJ=\int e^xe^{jx}dx=\int e^{(j+1)x}dx$$
$$I+jJ=\frac{e^{(j+1)x}}{j+1}=\frac{(j-1)e^{(j+1)x}}{(j+1)(j-1)}=\frac{(1-j)e^{(j+1)x}}{2}=\frac{(1-j)e^x\left[\cos(x)+j\sin(x)\right]}{2}$$
$$I+jJ=e^x\frac{\cos(x)+\sin(x)-j\cos(x)+j\sin(x)}{2}$$
now notice that $\Re(I+jJ)=I$ and $\Im(I+jJ)=J$ so the following is true:
$$I=\Re\left[e^x\frac{\cos(x)+\sin(x)-j\cos(x)+j\sin(x)}{2}\right]=e^x\frac{\cos(x)+\sin(x)}{2}$$
$$J=\Im\left[e^x\frac{\cos(x)+\sin(x)-j\cos(x)+j\sin(x)}{2}\right]=e^x\frac{\sin(x)-\cos(x)}{2}$$
And so we can conclude that:
$$\int e^x\cos(x)dx=e^x\frac{\cos(x)+\sin(x)}{2}+C$$
$$\int e^x\sin(x)dx=e^x\frac{\sin(x)-\cos(x)}{2}+C$$
However you can also do this by using "Integration By parts":
$$W=\int e^x\cos(x)dx$$
first we take $u=e^x$ and $v'=\cos(x)$ and we can say that:
$$W=uv-\int u'v=e^x\sin(x)-\int e^x\sin(x)dx$$
This hasn't got us anywhere so we can just repeat the process again. Let $u=e^x$ and $v'=\sin(x)$ and so:
$$W=e^x\sin(x)-\left[e^x(-\cos(x))-\int e^x(-\cos(x))dx\right]$$
Which we can rearrange to give:
$$W=e^x\sin(x)+e^x\cos(x)-\int e^x\cos(x)dx$$
Now notice that the integral that we are left with is in fact equal to W, so we can say:
$$W=e^x\sin(x)+e^x\cos(x)-W$$
$$2W=e^x\sin(x)+e^x\cos(x)$$
$$W=\frac{e^x\sin(x)+e^x\cos(x)}{2}$$