# Thread: Help with a Generalized integral

1. ## Help with a Generalized integral

How can we calculate this generalized integral:

$\displaystyle \int_{0}^{+oo} \frac{x^2}{x^4+1} dx$

2. Let $\displaystyle f(z) = \frac {z^{2}}{z^{4}+1}$

There are two simple poles in the upper half complex plane

$\displaystyle \frac {\sqrt{2}}{2} + \frac{\sqrt{2}}{2}i$ and $\displaystyle -\frac {\sqrt{2}}{2} + \frac{\sqrt{2}}{2}i$

$\displaystyle Res [f, z_{0}] = \lim_{z \to z_{0}} (z-z_{0}) \frac {z^{2}}{z^{4}+1}$$\displaystyle = \lim_{z \to z_{0}} \frac {3z^{2}-2z_{0}z}{4z^3} = \frac {1}{4z_{0}}$

$\displaystyle Res[f, \frac {\sqrt{2}}{2} + \frac{\sqrt{2}}{2}i] = \frac {\sqrt{2}-\sqrt{2} i}{8}$

$\displaystyle Res[f, \frac {\text{-}\sqrt{2}}{2} + \frac{\sqrt{2}}{2}i] = \frac {-\sqrt{2}-\sqrt{2} i}{8}$

$\displaystyle \int^{\infty}_{- \infty} \frac {x^{2}}{x^{4}+1} \ dx = 2 \pi i \Big(\frac {\sqrt{2}-\sqrt{2} i}{8} + \frac {-\sqrt{2}-\sqrt{2} i}{8} \Big)$ $\displaystyle = \frac{\sqrt{2} \pi}{2}$

and since $\displaystyle \frac {x^{2}}{x^{4}+1}$ is an even function

$\displaystyle \int^{\infty}_{0} \frac {x^{2}}{x^{4}+1} \ dx = \frac{\sqrt{2} \pi}{4}$

3. There are many ways to skin an integral, but here goes:

$\displaystyle \int_{-\infty}^{\infty}\frac{x^{2}}{x^{4}+1}dx$

The integral is given by $\displaystyle 2{\pi}i\sum(\text{residues in upper half plane})$

We can find the residues by considering the complex function:

$\displaystyle f(z)=\frac{z^{2}}{z^{4}+1}$

The singularities are at $\displaystyle z^{4}+1=0$

The equation can be solved by $\displaystyle z=(-1)^{\frac{1}{4}}$.

But, remember that $\displaystyle -1=e^{{\pi}i}$

The 4 roots are:

$\displaystyle z=e^{\frac{1}{4}({\pi}i)(2n+1)}=\begin{Bmatrix}e^{ \frac{{\pi}i}{4}}\\e^{\frac{3{\pi}i}{4}}\\e^{\frac {5{\pi}i}{4}}\\e^{\frac{7{\pi}i}{4}}\end{Bmatrix}$

Two of the roots are in the upper half plane and two in the lower half

plane. Don't pay attention to the roots in the lower half plane because we

are choosing a closed semicircle in the upper half plane as our contour.

We consider the singularities that are inside the contour, so the others do not contribute anything.

Now, lets compute the residues:

$\displaystyle \lim_{z\to e^{\frac{{\pi}i}{4}}}\frac{(z-e^{\frac{{\pi}i}{4}})z^{2}}{(z-e^{\frac{{\pi}i}{4}})(z-e^{\frac{3{\pi}i}{4}})(z-e^{\frac{5{\pi}i}{4}})(z-e^{\frac{7{\pi}i}{4}})}$

This whittles down to:

$\displaystyle \frac{i}{2e^{\frac{{\pi}i}{4}}(e^{\frac{{\pi}i}{2} }-e^{\frac{3{\pi}i}{2}})}$

$\displaystyle =\frac{-1}{4}e^{\frac{3{\pi}i}{4}}$

So, the residues corresponding to the pole at $\displaystyle z=e^{\frac{3{\pi}i}{4}}$ is given by $\displaystyle z=e^{\frac{3{\pi}i}{4}}\Rightarrow (\frac{-1}{4})e^{\frac{{\pi}i}{4}}$

$\displaystyle \sum(\text{residues})=\frac{-1}{4}e^{\frac{{\pi}i}{4}}-\frac{1}{4}e^{\frac{3{\pi}i}{4}}$

$\displaystyle =\frac{-1}{4}(cos(\frac{\pi}{4})+isin(\frac{\pi}{4})+cos(\ frac{3{\pi}}{4})+isin(\frac{3{\pi}}{4}))$

$\displaystyle =\frac{-1}{4}\frac{1}{\sqrt{2}}(1+i-1+i)=\frac{-1}{4\sqrt{2}}\cdot 2i=\frac{-i}{2\sqrt{2}}$

Therefore, hence, heretofore, and whence the integral evaluates to:

$\displaystyle 2{\pi}i\sum(\text{residues in upper half plane})=2{\pi}i\left(\frac{-i}{2\sqrt{2}}\right)$

$\displaystyle =\frac{\pi}{\sqrt{2}}$

Now, because we want from 0 to infinity, divide by 2 and we get:

$\displaystyle \boxed{\frac{\pi}{2\sqrt{2}}=\frac{{\pi}\sqrt{2}}{ 4}}$

We could also do this by regular old integration by trying a partial fraction:

$\displaystyle x^{4}+1=(x^{2}+\sqrt{2}x+1)(x^{2}-\sqrt{2}x+1)$

This leads to the rather onerous looking:

$\displaystyle \frac{\sqrt{2}}{4}\left(\frac{1}{2}\int\frac{2x-\sqrt{2}}{x^{2}-\sqrt{2}x+1}dx+\frac{1}{2}\int\frac{\sqrt{2}}{x^{2 }-\sqrt{2}x+1}dx\right)-\frac{1}{4}\int\frac{\sqrt{2}x}{x^{2}+\sqrt{2}x+1} dx$

For the first one, the sub $\displaystyle u=x^{2}-\sqrt{2}x+1, \;\ du=(2x-\sqrt{x})dx$ will simplify it nicely.

For the second one, try letting $\displaystyle x=\frac{2u+\sqrt{2}}{2}, \;\ dx=du$

4. $\displaystyle \int_0^{\infty} \frac{x^2}{1+x^4}$

Sub. $\displaystyle x = \sqrt{\tan{t}}$

$\displaystyle dx = \frac{\sec^2{t}}{2 \sqrt{\tan{t}}} dt$

The integral = $\displaystyle \int_0^{\frac{\pi}{2}} \frac{ \sqrt{\tan{x}}}{2} ~dt$

$\displaystyle = (1/2) \int_0^{\frac{\pi}{2}} \sin^{1/2}{t} \cos^{-1/2}{t} ~ dt$

$\displaystyle = (1/4) \frac{\Gamma(3/4) \Gamma(1/4)}{\Gamma(1)}$

$\displaystyle = (1/4) \frac{ \pi}{ \sin( \frac{\pi}{4})}$

$\displaystyle = \frac{ \pi}{ 2 \sqrt{2}}$

In general ,

$\displaystyle \int_0^{\infty} x^a ( 1 + x^b)^{-c} ~dx$

$\displaystyle = \frac{ \Gamma( c - \frac{ a + 1 }{b} ) \Gamma ( \frac{ a+1}{b})}{ b \Gamma(c) }$