Thread: Calculating residues to solve an integral

1. Calculating residues to solve an integral

The integral is $\displaystyle I=\int _0 ^{+\infty} \frac{x \sin (x)}{x^2+2}dx$. I'll probably choose a semi circle as contour since the poles aren't on the real axis. Furthermore I think that $\displaystyle I=\frac{1}{2} \int _{-\infty}^{+\infty } \frac{x \sin (x)}{x^2+2}dx$.
Let $\displaystyle f(z)=\frac{z \sin z}{z^2+2}$. The singularities of f are when $\displaystyle z=\pm i \sqrt 2$.
Now I want to calculate the residue of f at say one singularity. But it gives infinity I think. So I believe it's a pole of order greater than 1 but I'm unsure. I tried to use the Taylor series of sin(z) in order to see what happens in $\displaystyle z=i \sqrt 2$ but I didn't reach anything.
So I don't know how to go further.

2. There shouldn't be a problem there. Can you show me your calculation of the residue of f?

3. Generally for integrals like this involving $\displaystyle \sin(z)$ or $\displaystyle \cos(z)$, you'll need to switch them out for $\displaystyle e^{iz}$. Otherwise the integrals over parts of your contour might not go to zero.

Therefore I would integrate $\displaystyle \displaystyle f(z)=\frac{z e^{iz}}{z^2+2}$.

Note that $\displaystyle \displaystyle \int _{-\infty}^{\infty } \frac{x\sin (x)}{x^2+2}dx = \text{Im}\left(\int _{-\infty}^{\infty } \frac{ze^{iz}}{z^2+2}dz\right)$.

4. Good idea chip. However I didn't have more chance.
$\displaystyle Res(f,i \sqrt 2 ) = \lim _{z \to i \sqrt 2} \frac{z^2e^{iz}}{z^2+2}=\frac{e^{iz}}{1+\frac{2}{z ^2}}$. The numerator tends to $\displaystyle e^{-i \sqrt 2}$ while the denominator goes to 0 which is really dramatic. It happens whether or not I choose $\displaystyle e^{iz}$ or $\displaystyle \sin (z)=\frac{e^{iz} - e^{-iz}}{2i}$ since the denominator doesn't change.

5. $\displaystyle \displaystyle f(z)=\frac{ze^{iz}}{z^2+2}=\frac{ze^{-iz}}{(z-i\sqrt{2})(z+i\sqrt{2})}$

Now take the limit

$\displaystyle \displaystyle \lim_{z \to i\sqrt{2}}(z-i\sqrt{2})\frac{ze^{-iz}}{(z-i\sqrt{2})(z+i\sqrt{2})}=\lim_{z \to i\sqrt{2}}\frac{ze^{-iz}}{(z+i\sqrt{2})}=\frac{i\sqrt{2}e^{\sqrt{2}}}{i 2\sqrt{2}}=\frac{e^{\sqrt{2}}}{2}$

6. Thanks TheEmptySet! I missed that despite you've done the same yesterday!

7. Originally Posted by TheEmptySet
$\displaystyle \displaystyle f(z)=\frac{ze^{iz}}{z^2+2}=\frac{ze^{-iz}}{(z-i\sqrt{2})(z+i\sqrt{2})}$

Now take the limit

$\displaystyle \displaystyle \lim_{z \to i\sqrt{2}}(z-i\sqrt{2})\frac{ze^{-iz}}{(z-i\sqrt{2})(z+i\sqrt{2})}=\lim_{z \to i\sqrt{2}}\frac{ze^{-iz}}{(z+i\sqrt{2})}=\frac{i\sqrt{2}e^{\sqrt{2}}}{i 2\sqrt{2}}=\frac{e^{\sqrt{2}}}{2}$
I think the residue should be $\displaystyle \displaystyle \frac{e^{-\sqrt{2}}}{2}$.

You accidently had $\displaystyle \displaystyle e^{-iz}$ instead of $\displaystyle \displaystyle e^{iz}$.

8. Originally Posted by chiph588@
I think the residue should be $\displaystyle \displaystyle \frac{e^{-\sqrt{2}}}{2}$.

You accidently had $\displaystyle \displaystyle e^{-iz}$ instead of $\displaystyle \displaystyle e^{iz}$.
I was about to ask the same. I get the residue = $\displaystyle \frac{e^{-\sqrt{2}}}{2}$.
Edit: I get the answer now. I hope my justification is good enough. (it's very similar to the one of Chip in a previous thread).