How to solve for #inte^xcosxdx# ?

2 Answers
Feb 15, 2018

#int\ e^x cos(x)\ "d"x=1/2e^x(sin(x)+cos(x))+C#

Explanation:

#I=int\ e^x cos(x)\ "d"x#

We will be using integration by parts, which states that #int\ u\ "d"v=uv-int\ v\ "d"u#.

Use integration by parts, with #u=e^x#, #du=e^x\ "d"x#, #"d"v=cos(x)\ "d"x#, and #v=sin(x)#:

#I=e^xsin(x)-int\ e^xsin(x)\ "d"x#

Use integration by parts again to the second integral, with #u=e^x#, #"d"u=e^x\ "d"x#, #"d"v=sin(x)\ "d"x#, and #v=-cos(x)#:

#I=e^xsin(x)+e^xcos(x)-int\ e^xcos(x)\ "d"x#

Now, recall we defined #I=int\ e^x cos(x)\ "d"x#. Thus, the above equation becomes the following (remembering to add a constant of integration):

#I=e^xsin(x)+e^xcos(x)-I+C#

#2I=e^xsin(x)+e^xcos(x)+C=e^x(sin(x)+cos(x))+C#

#I=1/2e^x(sin(x)+cos(x))+C#

Feb 15, 2018

See below.

Explanation:

Using de Moivre's identity

#e^(ix) =cos x + i sin x# we have

#int e^x cos x dx = "Re"[int e^x(cos x + i sin x)dx] = "Re"[int e^(x + ix) dx]#

but #int e^((1+i)x) dx = 1/(1+i)e^((1+i)x) = (1-i)/2 e^x e^(ix) = #

#= (1-i)/2e^x(cos x+isinx) = 1/2e^x(cosx+sinx)+i1/2e^x(sinx -cosx)#

and finally

#int e^x cos x dx = 1/2e^x(cosx+sinx)+C#