Hint to compute the following integral Can someone give a hint on how to solve the following integral?
$$
\int_{0}^{2N\pi}
\frac{-R\left(\xi t - r\right)\cos\left(t\right) + \xi R\sin\left(t\right)}
{\left[R^{2} + \left(\xi t - r\right)^{2}\right]^{3/2}}\,{\rm d}t
$$
I've tried some substitutions. First I've splitted the integral into the sum of two integrals:
$$\int_0^{2N\pi}\frac{(-R\cos t)(\xi t-r)}{(R^2+(\xi t-r)^2)^{3/2}}dt+\int_0^{2N\pi}\frac{\xi R\sin t}{(R^2+(\xi t-r)^2)^{3/2}}dt$$
Then for the first one I've substituted $u=\xi t - r$ and after that I've used $u=R\tan \theta$ to get a better expression on the denominator. The problem is that in the end I've just got another tricky integral to solve. 
Is there a smarter way to solve this integral? I just want a hint, not the full solution.
Thanks very much in advance.
EDIT: On the time I've asked this I didn't know contour integration on the complex plane. Now I'm learning it and I've tried to solve this using it, however I didn't find a way. Indeed, I've noticed that if $z\in S(R;0)$ then $-R\cos t = (z+z^{-1})/2$ and in the same time $R\sin t = (z-z^{-1})/2i$, but yet there are those terms there involving $\xi t - r$ and this would be $\xi \arg(z)- r$, so I would have the functions:
$$f(z)=\dfrac{i}{2R}\dfrac{(z+z^{-1})(\xi \arg(z)-r)}{(R^2+(\xi \arg(z)-r)^2)^{3/2}}e^{-i\arg z}\qquad g(z)=-\dfrac{1}{2R}\dfrac{(z-z^{-1})e^{-i\arg z}}{(R^2+(\xi\arg(z)-r)^2)^{3/2}}$$
I see that, if $z\in S(R;0)$ and we parametrize it so that there are $N$ turns then $z=Re^{i t}$ and so
$$\int_{S(R;0)} f(z)dz=\int_0^{2N\pi}\dfrac{i}{R}\dfrac{(R\cos t)(\xi t-r)}{(R^2+(\xi t-r)^2)^{3/2}}e^{-it} iR e^{it}dt$$
and this is exactly one of the integrals I need. Now I can't see how to find the poles and the residues of $f$. How should I proceed?
Thanks very much again.
 A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
\begin{align}&\color{#c00000}{\int_{0}^{2N\pi}
{-R\pars{\xi t - r}\cos\pars{t} + \xi R\sin\pars{t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t}
=R\ \Re\int_{0}^{2N\pi}
{-\pars{\xi t - r}\expo{\ic t} - \ic\xi\expo{\ic t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t
\\[3mm]&=R\ \Re\int_{0}^{2N\pi}
{\pars{r -\ic\xi}\expo{\ic t} - \xi t\expo{\ic t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t
\\[3mm]&=R\ \Re\bracks{\pars{R - \ic\xi}\int_{0}^{2N\pi}{\expo{\ic t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t
-\xi\int_{0}^{2N\pi}{t\expo{\ic t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t}
\end{align}

Now, define
  $$
{\cal F}\pars{\mu} \equiv
\int_{0}^{2N\pi}{\expo{\ic\mu t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t
$$

such that
\begin{align}&\color{#c00000}{\int_{0}^{2N\pi}
{-R\pars{\xi t - r}\cos\pars{t} + \xi R\sin\pars{t}\over
\bracks{R^{2} + \pars{\xi t - r}^{2}}^{3/2}}\,\dd t}
=R\ \Re\bracks{\vphantom{\LARGE A}
\pars{R - \ic\xi}{\cal F}\pars{1} + \ic\xi\,{\cal F}'\pars{1}}
\end{align}

Also
  \begin{align}
{\cal F}\pars{\mu}&
=\int_{-r/\xi}^{2N\pi - r/\xi}{\expo{\ic\mu\pars{t + r/\xi}}\over
\bracks{R^{2} + \xi^{2}t^{2}}^{3/2}}\,\dd t
={1 \over \verts{R}^{3}}\,\expo{\ic\mu r/\xi}\int_{-r/\xi}^{2N\pi - r/\xi}{\expo{\ic\mu t}\over
\bracks{1 + \pars{\xi^{2}/R^{2}}t^{2}}^{3/2}}\,\dd t
\end{align}

With $\ds{x \equiv {\verts{\xi} \over \verts{R}}\,t\quad\imp\quad t = {\verts{R} \over \verts{\xi}}\,x}$:
\begin{align}
{\cal F}\pars{\mu}&
={1 \over \verts{\xi}\verts{R}^{2}}\,\expo{\ic\mu r/\xi}\int_{x_{-}}^{x_{+}}{\expo{\ic\pars{\mu\verts{R}/\verts{\xi}}x}\over
\pars{1 + x^{2}}^{3/2}}\,\dd x\,,\qquad
\left\lbrace\begin{array}{rcl}
x_{-} & \equiv & -\,{r \over \verts{R}}\,\sgn\pars{\xi}
\\[3mm]
x_{+} & \equiv & \pars{2N\pi - {r \over \xi}}\,{\verts{\xi} \over \verts{R}}
\end{array}\right.
\end{align}

$\ds{\tt\mbox{Can you take it from here ?.}}$

