Exponentials and trig functions

Hi, I'm having some trouble understanding the relationships between trig functions and exponential functions. I have a question with answers and just can't see how they simplify down to get to where they do

$\displaystyle C_{k}= 1/{2\pi} \int_{-\pi}^{\pi} te^{-ikt} dt = - {(-1)^k}/{ik} $

Now when i try to intergrate I get a bit of a crazy formula with lots of e's and I'm pretty confident it will simplify to what the answer is but I'm not sure how to.

The intergral I get is

$\displaystyle 1/{2\pi} [ (-ik)^{-1} t e^{-ikt}]_{-\pi}^{\pi} + 1/{2ik\pi} [-e^{-ikt}/{ik}]_{-\pi}^{\pi} $

I can't really see how to simplify it to get required answer. At a guess the second part simplifies to zero Because $\displaystyle e^{ik\pi} - e^{-ik\pi} = 0$??? and the first part to $\displaystyle [e^{ik\pi} + e^{-ik\pi}]{-ik}^{-1}$ and if $\displaystyle e^{ik\pi} + e^{-ik\pi} = (-1)^k$ then im done, but this is making big guesses about how these exponentials work which I've no idea if its correct!! Sorry if this is really obvious and im being dumb! Thanks for any help - even if its just refferring me to a list of exponential identities!