First, consider the identity #cos 2x = 2cos^2 x - 1#. Use this identity to transform the integral
#int (e^x cos^2 x) dx#
into the integral
#int (e^x (cos 2x + 1))/2 dx = 1/2 int e^x cos 2x dx + 1/2 int e^x dx#
Finding #int e^x dx# is straightforward i.e. #int e^x dx = e^x + C#
We use integration by parts to find #int e^x cos 2x dx#. By LIATE, we integrate #e^x# and differentiate #cos 2x#:
#int (e^x cos 2x) dx = e^x cos 2x - int e^x (–2 sin 2x) dx = e^x cos 2x + 2 int (e^x sin 2x) dx = e^x cos 2x + 2[(e^x sin 2x)-int e^x (2 cos 2x) dx] = e^x cos 2x + 2e^x sin 2x-4 int (e^x cos 2x) dx#
Thus,
#int (e^x cos 2x) dx = e^x cos 2x + 2e^x sin 2x-4 int (e^x cos 2x) dx#
#5int (e^x cos 2x) dx = e^x cos 2x + 2e^x sin 2x dx#
#int (e^x cos 2x) dx = 1/5 e^x cos 2x + 2/5 e^x sin 2x dx#
Therefore,
#int (e^x (cos 2x + 1))/2 dx = 1/2 (1/5 e^x cos 2x + 2/5 e^x sin 2x) + 1/2 e^x + C = 1/10 e^x cos 2x + 1/5 e^x sin 2x + 1/2 e^x + C#