# compute the integral using residue theory

I am trying to compute an integral in an example in my complex analysis textbook:

$$\int_{-\infty}^\infty {xsinx\over x^4+1}dx$$

The book gives some startup hints, but I don't quite follow, I set $f(z)={e^{iz}z\over z^4+1}$. Then the function has poles of order 1 at $\sqrt i$ and $-\sqrt i$, or $e^{i\pi/4}$ and $-e^{i\pi/4}$.

Next, I need to find the residue of $f$ at $e^{i\pi/4}, -e^{i\pi/4}$. After that I think I know what to do next. But the step of finding the residue is getting me.

-
Might want to be careful about your poles; $z^4+1=0$ will have 4 roots. I'm thinking you'll want to integrate over a semicircular contour in the upper half plane, where there are two poles, but you've only got one of them. You'll have $e^{i\frac{\pi}{4}}$ and $e^{i\frac{3\pi}{4}}$ in the upper half plane. –  FireGarden Apr 13 '14 at 23:30

You can calculate the residue by using $f/f'$.

$\displaystyle \lim_{z\to e^{\frac{\pi i}{4}}}\frac{ze^{iz}}{4z^{3}}$

Then do the case for $e^{3\pi i/4}$ the same way and add them.

-

if the function has pole of order 1 at p

take lim, z goes to p, (z-p)f(z)

Think of f(z) at p in laurent series at p: b/(z-p)+some thing analytic at p

-