How do you integrate #int e^(3x)cosx# by integration by parts method?

2 Answers
Jul 22, 2016

#int e^(3x)cosx dx = e^{3x}/10(3cos(x)+sin(x))#

Explanation:

This kind of integral can be straightforward solved using Moivre's identity

#e^{i x} = cos x + i sin x# so

#int e^(3x)cosx dx = "Real"(int e^(3x)(cosx +i sin x)dx) # or
#int e^(3x)cosx dx = "Real"(int e^{3x+ix}dx) = "Real"(e^{3x+ix}/(3+i))#

then

#int e^(3x)cosx dx ="Real"((3-i)e^{3x}(cosx +i sin x)/((3-i)(3+i)))#

Finally

#int e^(3x)cosx dx = e^{3x}/10(3cos(x)+sin(x))#

Jul 22, 2016

We can IBP this both ways

First approach

#I = int e^(3x)cosx \ dx#

# = int d/dx( 1/3e^(3x)) cosx \ dx#

which by IBP

#= 1/3e^(3x) cosx - int 1/3e^(3x) d/dx( cosx )\ dx#

#= 1/3e^(3x) cosx + int 1/3e^(3x) sin x \ dx#

preparing for second IBP

#= 1/3e^(3x) cosx + int d/dx( 1/9e^(3x)) sin x \ dx#

by IBP
#= 1/3e^(3x) cosx + 1/9e^(3x) sin x - int 1/9e^(3x) d/dx (sin x) \ dx#

#= 1/3e^(3x) cosx + 1/9e^(3x) sin x - int 1/9e^(3x) cos \ dx#

#implies I = 1/3e^(3x) cosx + 1/9e^(3x) sin x -I/9 + C#

# I = 9/10 (1/3e^(3x) cosx + 1/9e^(3x) sin x ) + C#

# I = e^(3x)/10( 3 cosx + sin x) + C#

Second Approach

#I = int e^(3x)cosx \ dx#

# = int e^(3x) d/dx(sinx) \ dx#

# = e^(3x) sinx - int d/dx(e^(3x)) sin x \ dx + C#

# = e^(3x) sinx - int 3e^(3x) sin x \ dx + C#

Preparing for second IBP

# = e^(3x) sinx - int 3e^(3x) d/dx(- cos x) \ dx + C#

# = e^(3x) sinx + 3e^(3x) cosx - int d/dx (3e^(3x)) cos x \ dx + C#

# = e^(3x) sinx + 3e^(3x) cosx - int 9e^(3x) cos x \ dx + C#

# = e^(3x) sinx + 3e^(3x) cosx - 9I + C#

#implies 10 I = e^(3x) sinx + 3e^(3x) cosx + C#

#I = e^(3x)/10 ( sinx + 3 cosx ) + C#

Same result, second way maybe a little bit snappier.