# Thread: Solving integral using residue

1. ## Solving integral using residue

Need help to complete the following integral using the residue theorem:

$\displaystyle \displaystyle\int_{0}^{\infty}\frac{cos x}{x^{4}+4}dx= \frac{1}{2}\int_{-\infty}^{\infty}\frac{cos x}{x^{4}+4}dx=\frac{1}{2}Re\int_{-\infty}^{\infty}\frac{e^{ix}}{x^{4}+4}dx\displayst yle\implies$

$\displaystyle \displaystyle\implies f(z)=\frac{e^{iz}}{z^{4}+4}=\frac{e^{iz}}{(z^{2}+2 i)(z^{2}-2i)}$

$\displaystyle \displaystyle{z_{1}=(1+i)$
$\displaystyle \displaystyle{z_{2}=(-1+i)$
$\displaystyle \displaystyle{z_{3}=(-1-i)$
$\displaystyle \displaystyle{z_{4}=(-1-i)$

The residue at $\displaystyle z_1$ is:

$\displaystyle \displaystyle\frac{1}{2} \mathrm{Res}_{z \to z_1} f(z)\lim_{z \to z_1}=\frac{e^{iz}}{4z^{3}}= \frac{1}{4} \frac{e^{iz}}{z^{3}}|_{z=z_1}=(-1-i)\frac{e^{(i-1)}}{32}$ (1)

The residue at $\displaystyle z_2$ is:

$\displaystyle \displaystyle\frac{1}{2} \mathrm{Res}_{z \to z_2} f(z)\lim_{z \to z_2}=\frac{e^{iz}}{4z^{3}}= \frac{1}{4} \frac{e^{iz}}{z^{3}}|_{z=z_2}=(1-i)\frac{e^{(-i-1)}}{32}$ (2)

$\displaystyle \displaystyle I=2\pi i (((-1-i)\frac{e^{(i-1)}}{32})+((1-i)\frac{e^{(-i-1)}}{32}))=$

$\displaystyle \displaystyle=\pi i (((-1-i)\frac{e^{(i-1)}}{16})+((1-i)\frac{e^{(-i-1)}}{16}))=...$ (3)

How do I simplify (3)? DO I take the real part of the expression
(3)? In that case how do I do that?

I appriciate any guidance.

Thank you

2. Originally Posted by 4Math
$\displaystyle \displaystyle{z_{4}=(-1-i)$
It should be $\displaystyle z_4=1-i$.

The residue at $\displaystyle z_1$ is:

$\displaystyle \displaystyle\frac{1}{2} \mathrm{Res}_{z \to z_1} f(z)\lim_{z \to z_1}=\frac{e^{iz}}{4z^{3}}= \frac{1}{4} \frac{e^{iz}}{z^{3}}|_{z=z_1}=(-1-i)\frac{e^{(i-1)}}{32}$
I don't know what are you doing here. We have:

$\displaystyle \textrm{Res}[f,z_1]=\displaystyle\lim_{z \to z_1}{\dfrac{e^{iz}}{(z-z_2)(z-z_3)(z-z_4)}}=\\ \dfrac{e^{iz_1}}{(z_1-z_2)(z_1-z_3)(z_1-z_4)}=\ldots$

Regards.

Fernando Revilla

3. Originally Posted by FernandoRevilla
It should be $\displaystyle z_4=1-i$
Thank you for the correction.

I don't know what are you doing here.
I initially used the following:
$\displaystyle \displaystyle\mathrm{Res}_{z \to a} \frac{f_1(z)}{f_2(z)}=\frac{f_1(a)}{f{'}_2(a)}$ there $\displaystyle f_2$ has a single solution $\displaystyle z=a$. But I realized that I can't apply this since there are two possible solutions in the north region $\displaystyle z_1$ and $\displaystyle z_2$.

We have:

$\displaystyle \textrm{Res}[f,z_1]=\displaystyle\lim_{z \to z_1}{\dfrac{e^{iz}}{(z-z_2)(z-z_3)(z-z_4)}}=\\ \dfrac{e^{iz_1}}{(z_1-z_2)(z_1-z_3)(z_1-z_4)}=\ldots$
Can you please clarify and generalize this rule for this kind of problem ( which theorem etc...)

$\displaystyle \textrm{Res}[f,z_1]=\displaystyle\lim_{z \to z_1}{\dfrac{e^{iz}}{(z-z_2)(z-z_3)(z-z_4)}}=\\\dfrac{e^{iz_1}}{(z_1-z_2)(z_1-z_3)(z_1-z_4)}=$

$\displaystyle \displaystyle=(-1-i)\\\dfrac{e^{(i-1)}}{8(-1+i)(-1-i)}=(-1-i)\\\dfrac{e^{(i-1)}}{16}$ (4)
$\displaystyle \textrm{Res}[f,z_2]=\displaystyle\lim_{z \to z_2}=\\\dfrac{e^{iz_2}}{(z_2-z_1)(z_2-z_3)(z_2-z_4)}=$

$\displaystyle =(1-i)\\\dfrac{e^{(-1-i)}}{16}$(5)

$\displaystyle \displaystyle I=2\pi i \frac{1}{2}(((-1-i)\\\dfrac{e^{(i-1)}}{16})+((1-i)\\\dfrac{e^{(-1-i)}}{16}))=$

$\displaystyle \displaystyle=\pi i \frac{1}{2}(\\\dfrac{(-1-i)e^{i}+((1-i)e^{-i})}{8e}))=$

$\displaystyle \displaystyle=\pi \frac{1}{2}(\\\dfrac{(-ie^{i}+e^{i}+ie^{-i}+e^{-i})}{8e})=$

$\displaystyle \displaystyle=\frac{1}{2}(-ie^{i}+e^{i}+ie^{-i}+e^{-i})(\frac{\pi}{8e})$ (6)

$\displaystyle \displaystyle\frac{1}{2}(e^{i}+e^{-i})= cos 1$

$\displaystyle \displaystyle\frac{1}{2}(ie^{-i}-ie^{i})=\frac{i}{2}(e^{-i}-e^{i})=\frac{-1}{2i}(e^{-i}-e^{i})=\frac{1}{2i}(e^{i}-e^{-i})= sin 1$

$\displaystyle \displaystyle\implies\int_{0}^{\infty}\frac{cos x}{x^{4}+4}dx=\frac{\pi}{8e}(cos 1 + sin1)$

Thank you

Kind regards

4. Originally Posted by 4Math
Can you please clarify and generalize this rule for this kind of problem ( which theorem etc...)
We only use the decomposition of $\displaystyle z^4+4$:

$\displaystyle \textrm{Res}[f,z_1]=\displaystyle\lim_{z \to z_1}{\dfrac{e^{iz}\cancel{(z-z_1)}}{\cancel{(z-z_1})(z-z_2)(z-z_3)(z-z_4)}}=$

$\displaystyle \displaystyle\lim_{z \to z_1}{\dfrac{e^{iz}}{(z-z_2)(z-z_3)(z-z_4)}}= \dfrac{e^{iz_1}}{(z_1-z_2)(z_1-z_3)(z_1-z_4)}=\ldots$