Here,
#color(blue)(I=inte^xcosx dx...to(A)#
#"Using"color(red)" Integration by Parts"#
i.e. #int(u*v)dx=uintvdx-int(u'intvdx)dx#
Let,, #u=cosxand v=e^x=>u'=-sinx and intvdx=e^x#
So,
#I=cosxe^x-int((-sinx)e^x)dx#
#=e^x*cosx+intsinxe^xdx#
Again #"using"color(red)" Integration by Parts"#
Take, #u=sinx and v=e^x=>u'=cosxand intvdx=e^x#
#:.I=e^xcosx+[sinxe^x-color(blue)(intcosxe^xdx)]+c#
#=>I=e^xcosx+sinxe^x-color(blue)I+c...toUse . (A) above#
#:.I+I=e^xcosx+e^xsinx+c#
#=>2I=e^x(cosx+sinx)+c#
#=>I=e^x/2(cosx+sinx)+c#