Q:

Integrate cos and $e^x+1$ using the chained IPP

I know how to calculate $$\int e^x*cos x$$ using Integration by part and switching the answer to both side of the equation.  However, I am stucked on a problem which is very similar except for 1 particularity :
$$\int (e^x+1)*cos x$$
If I use the same technic, the $e^x+1$ becomes $e^x$ and therefore I can't say both side are equal.  I tried switching with a variable prior to doing anything but I get a complicated form : $$u=e^x+1 du/e^x = dx $$
$$\int \frac {u*cos x} {u-1} $$
So far, I got the following result using the technic from IPP: 
$$\int (e^x+1)*cos x = (e^x+1)*sin x + [e^x*-cos x - \int cos x*e^x]$$
As you can see, it's going nowhere because I can't compare $e^x+1$ with $e^x$..

A:

If you have already found $\int e^x\cos x\;dx$, then the easiest approach is to simply write
$$ \int (e^x+1)\cos x\;dx=\int e^x\cos x\;dx+\int \cos x\;dx $$
and evaluate the two integrals separately.