You can do the integration of e^x*cosx or e^-x*cosx by using theintegration by parts,where the original integration appears again. To avoid this, complexificaion method is used, which is easier than the other method. In place of cosx, if you have sinx , still you can use this method. Only difference is that in the final answer, you have to choose the imaginary part for the answer.