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

1 Answer
Jun 1, 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 #