How do you find the integral of #(cosx)(e^x)#?

3 Answers
May 21, 2017

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

Explanation:

Let:

# I = int \ cosx \ e^x \ dx #

We can use integration by parts:

Let # { (u,=cosx, => (du)/dx=-sinx), ((dv)/dx,=e^x, => v=e^x ) :}#

Then plugging into the IBP formula:

# int \ (u)((dv)/dx) \ dx = (u)(v) - int \ (v)((du)/dx) \ dx #

gives us

# int \ (cosx)(e^x) \ dx = (cosx)(e^x) - int \ (e^x)(-sinx) \ dx #
# :. I = e^xcosx + int \ e^x \ sinx \ dx # .... [A]

At first it appears as if we have made no progress, as now the second integral is similar to #I#, having exchanged #cosx# for #sinx#, but if we apply IBP a second time then the progress will become clear:

Let # { (u,=sinx, => (du)/dx=cosx), ((dv)/dx,=e^x, => v=e^x ) :}#

Then plugging into the IBP formula, gives us:

# int \ (sinx)(e^x) \ dx = (sinx)(e^x) - int \ (e^x)(cosx) \ dx #
# :. int \ e^x \ sinx \ dx = e^xsinx - I #

Inserting this result into [A] we get:

# I = e^xcosx + e^xsinx - I + A #

# :. 2I = e^xcosx + e^xsinx + A #
# :. I = 1/2(e^xcosx + e^xsinx) + C #

May 21, 2017

#inte^x cosx dx = (e^x(cosx+sinx))/2 +C#

Explanation:

Integrate by parts:

#int e^x cosx dx = int cosx d(e^x) = e^xcosx - int e^x d(cosx) = e^x cosx +int e^xsinxdx#

Now integrate again by parts:

#int e^x sinx dx = int sinx d(e^x) = e^xsinx - int e^x d(sinx) = e^x sinx -int e^xcosxdx#

Substituting this equality in the first one we have:

#int e^x cosx dx = e^xcosx+e^xsinx - int e^xcosxdx#

The integral now appears on both sides of the equation and we can now solve for it:

#2int e^x cosx dx = e^xcosx+e^xsinx +C#

and finally:

#inte^x cosx dx = (e^x(cosx+sinx))/2 +C#

May 21, 2017

Recursively use integration by parts.
After 2 iterations, the negative of the integral will be on the right.
Subtract form to both sides and divide by 2.

Explanation:

Integration by parts:

#intudv = uv - intvdu#

let #u = cos(x)#, then, #dv = e^xdx#, #du = -sin(x)dx#, and #v = e^x#

Substitute into the formula:

#intcos(x)e^xdx=cos(x)e^x-int-sin(x)e^xdx#

#intcos(x)e^xdx=cos(x)e^x+intsin(x)e^xdx" [1]"#

Integration by parts:

#intudv = uv - intvdu#

let #u = sin(x)#, #dv = e^xdx#, then, #du = cos(x)dx#, and #v = e^x#

Substitute into the formula:

#intsin(x)e^xdx = sin(x)e^x - intcos(x)e^xdx#

Substitute into equation [1]:

#intcos(x)e^xdx=cos(x)e^x+sin(x)e^x - intcos(x)e^xdx#

Add #intcos(x)e^xdx# to both sides:

#2intcos(x)e^xdx=cos(x)e^x+sin(x)e^x#

Divide by 2:

#intcos(x)e^xdx=1/2cos(x)e^x+1/2sin(x)e^x#

Don't forget the constant:

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