# Math Help - Integration by parts

1. ## Integration by parts

$\int_0^\pi e^{cos(t)}sin(2t)dt$

=

$2\int_0^\pi e^{cos(t)}sin(t)cos(t)dt$

$u = cos(t)$
$du = -sin(t)$

When $t = \pi$ $u = -1$
When $t = 0$ $u = 1$

$-2\int_1^{-1} ue^u du$

Then integration by parts, differentiating $u$and integrating $e^u$ i end up with

$-2e^u(u-1)$ from 1 to -1

Doing that I end up with 0 after plugging $cos(t)$ back in for the u. but my calculator tells me the answer is $4e^-1$

What am I doin wrong, I know I'm close...i think :P

PS: best part is, if i just substitute the -1 and 1 directly into the above equation...i get the right answer

EDIT: ....im suppose to put -1 and 1 in aren't i....shrug haha

2. $-2\left[-2e^{-1} - 0\right] = 4e^{-1}$