How do you integrate int e^xsinx by integration by parts method?

1 Answer
Oct 17, 2016

int e^x sin x dx = 1/2 e^x(sin(x) - cos(x)) + C

Explanation:

Integration by parts can be expressed:

int u(x)v'(x) dx = u(x)v(x) - int v(x) u'(x) dx

color(white)()
Let u(x) = e^x, v(x) = -cos(x)

Then u'(x) = e^x, v'(x) = sin(x)

and we find:

int e^x sin x dx = -e^x cos(x) + int e^x cos(x) dx + C_1

color(white)()
Let u(x) = e^x, v(x) = sin(x)

Then u'(x) = e^x, v'(x) = cos(x)

and we find:

int e^x cos(x) dx = e^x sin(x) - int e^x sin(x) dx + C_2

color(white)()
Combining these two results, we find:

int e^x sin x dx = -e^x cos(x) + e^x sin(x) - int e^x sin x dx + (C_1+C_2)

and hence:

int e^x sin x dx = 1/2 e^x(sin(x) - cos(x)) + C

color(white)()
Footnote

Integration by parts is very useful, but can end up leading you down a rabbit hole if you do not choose the parts appropriately.

In the example above, I would instead tend to find the integral by seeing what happens when you differentiate e^x sin(x) and e^x cos(x) then combine the results:

d/(dx) e^x sin(x) = e^x sin(x) + e^x cos(x)

d/(dx) e^x cos(x) = e^x cos(x) - e^x sin(x)

So by subtracting the second from the first of these, we find:

d/(dx) (e^x (sin(x) - cos(x))) = e^x sin(x) + color(red)(cancel(color(black)(e^x(cos(x))))) - color(red)(cancel(color(black)(e^x(cos(x))))) + e^x sin(x)

color(white)(d/(dx) (e^x (sin(x) - cos(x)))) = 2e^x sin(x)

Hence:

int e^x sin(x) dx = 1/2 e^x (sin(x) - cos(x)) + C