Definite Integral of a Rational Function

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 3K views
Euge
Gold Member
MHB
POTW Director
Messages
2,072
Reaction score
245
Evaluate the definite integral $$\int_0^\infty \frac{x^2 + 1}{x^4 + 1}\, dx$$
 
Physics news on Phys.org
[tex]z^4=-1[/tex] has the solutions
[tex]z=e^{i\pi/4},e^{i3\pi/4},e^{-i3\pi/4},e^{-i\pi/4}[/tex]
[tex]\int_0^\infty \frac{x^2+1}{x^4+1}dx=\frac{1}{2}\int_{-\infty}^\infty \frac{x^2+1}{x^4+1}dx[/tex]
by complex integral along the real axis and upper semicircle contour
[tex]=i\pi [\ Res (\frac{z^2+1}{z^4+1},e^{i\pi/4})+ \ Res (\frac{z^2+1}{z^4+1},e^{i3\pi/4})]=\frac{\pi}{\sqrt{2}}[/tex]

Another approach:
transforming x by
[tex]x=\tan\theta[/tex]
The integral is
[tex]\int_0^\pi \frac{d\phi}{1+\cos^2 \phi}=\sum_{n=0}^\infty (-1)^n \int_0^\pi \cos^{2n}\phi d\phi=\pi \sum_{n=0}^\infty (-1)^n \frac{(2n-1)!!}{(2n)!!}[/tex]
where
[tex]\phi=2\theta[/tex]
The series converges slowly. The sum from n=0 upto 50,000 gives the estimation between 0.7058
and 0.7083 for the expected ##1/\sqrt{2}##=0.70710...

Or not in series,
[tex]\int_0^\pi \frac{d\phi}{1+\cos^2 \phi}=2\int_0^\infty \frac{dt}{2+t^2}=\sqrt{2}[\arctan \ s]^\infty_0=\frac{\pi}{\sqrt{2}}[/tex]
where
[tex]t=\tan \phi[/tex]
[tex]s=\frac{t}{\sqrt{2}}[/tex]
 
Last edited:
anuttarasammyak said:
Another approach:
transforming x by
[tex]x=\tan\theta[/tex]
The integral is
[tex]\int_0^\pi \frac{d\phi}{1+\cos^2 \phi}=\sum_{n=0}^\infty (-1)^n \int_0^\pi \cos^{2n}\phi d\phi=\pi \sum_{n=0}^\infty (-1)^n \frac{(2n-1)!!}{(2n)!!}[/tex]
where
[tex]\phi=2\theta[/tex]
The series converges slowly. The sum from n=0 upto 50,000 gives the estimation between 0.7058
and 0.7083 for the expected ##1/\sqrt{2}##=0.70710...
Using ##(2n)!! = 2n (2n-2) \cdots 2 = 2^n n!##,

\begin{align*}
\sum_{n=0}^\infty (-1)^n \frac{(2n-1)!!}{(2n)!!} = \sum_{n=0}^\infty \frac{(-1)^n}{n!} \frac{(2n-1)!!}{2^n}
\end{align*}

We have

\begin{align*}
\frac{1}{\sqrt{x+1}} = \sum_{n=0}^\infty \frac{(-1)^n}{n!} \frac{(2n-1)!!}{2^n} x^n
\end{align*}

So that

\begin{align*}
\frac{1}{\sqrt{2}} = \sum_{n=0}^\infty \frac{(-1)^n}{n!} \frac{(2n-1)!!}{2^n} .
\end{align*}
 
Last edited:
Reply
  • Like
Likes   Reactions: anuttarasammyak
I think you can do it in the first quadrant as the limit as [itex]R \to \infty[/itex] of [tex] \oint_C \frac{1 + z^2}{1 + z^4}\,dz = \underbrace{\int_0^R \frac{1 + x^2}{1 + x^4}\,dx}_{\mbox{real}} - i \underbrace{\int_0^R \frac{1 - y^2}{1 + y^4}\,dy}_{\mbox{real}} + \underbrace{\int_0^{\pi/2} \frac{1 + R^2e^{2it}}{1 + R^4e^{4it}}iRe^{it}\,dt}_{=O(R^{-1})}[/tex] which reduces to [tex] \DeclareMathOperator*{\Res}{\operatorname{Res}}<br /> \int_0^\infty \frac{1 + x^2}{1 + x^4}\,dx = \operatorname{Re} \left(2\pi i \Res\limits_{z = e^{i\pi/4}} \frac{1 + z^2}{1 + z^4}\right).[/tex]
 
Method #1

Using ##u = x^4##,

\begin{align*}
\int_0^\infty \dfrac{x^2+1}{x^4+1} dx = \frac{1}{4} \int_0^\infty \dfrac{u^{-1/4}+u^{-3/4}}{u+1} du \qquad (*)
\end{align*}

Here:

www.physicsforums.com/threads/exponential-type-integrals.1046843/

in post #12 I proved that, if ##0< a < 1##, then

$$
\int_0^\infty \frac{u^{a-1}}{1+u} du = \frac{\pi}{\sin a \pi}
$$

Using this in ##(*)##, we have

\begin{align*}
\int_0^\infty \dfrac{x^2+1}{x^4+1} dx & = \frac{\pi}{4} \left( \frac{1}{\sin 3 \pi / 4} + \frac{1}{\sin \pi / 4} \right)
\nonumber \\
& = \frac{\pi}{\sqrt{2}}
\end{align*}Method #2:

\begin{align*}
\int_0^\infty \dfrac{x^2 + 1}{x^4 + 1} dx & = \int_0^\infty \dfrac{1 + \dfrac{1}{x^2}}{x^2 + \dfrac{1}{x^2}} dx
\nonumber \\
& = \int_0^\infty \dfrac{1 + \dfrac{1}{x^2}}{\left( x - \dfrac{1}{x} \right)^2 + 2} dx
\nonumber \\
& = \int_0^\infty \dfrac{d \left( x - \dfrac{1}{x} \right)}{\left( x - \dfrac{1}{x} \right)^2 + 2}
\nonumber \\
& = \int_{-\infty}^\infty \dfrac{d u}{u^2 + 2}
\nonumber \\
& = \frac{1}{\sqrt{2}} \int_{-\infty}^\infty \dfrac{d u}{u^2 + 1}
\nonumber \\
& = \frac{\pi}{\sqrt{2}} .
\end{align*}Method #3

\begin{align*}
\int_0^\infty \dfrac{x^2 + 1}{x^4 + 1} d x & = \frac{1}{2} \int_0^\infty \frac{1}{x^2 - \sqrt{2} x + 1} dx + \frac{1}{2} \int_0^\infty \frac{1}{x^2 + \sqrt{2} x + 1} dx
\nonumber \\
& = \frac{1}{2} \int_{-\infty}^\infty \frac{1}{x^2 - \sqrt{2} x + 1} dx
\nonumber \\
& = \frac{1}{2} \int_{-\infty}^\infty \frac{1}{\left( x - \frac{1}{\sqrt{2}} \right)^2 + \frac{1}{2}} dx
\end{align*}

Using ##u = x - \frac{1}{\sqrt{2}}##, the above becomes

\begin{align*}
\int_0^\infty \dfrac{x^2 + 1}{x^4 + 1} d x & = \int_{-\infty}^\infty \frac{1}{2 u^2 + 1} du
\nonumber \\
& = \frac{\pi}{\sqrt{2}} .
\end{align*}
 
Reply
  • Like
Likes   Reactions: dextercioby
julian said:
Method #1

Using ##u = x^4##,

\begin{align*}
\int_0^\infty \dfrac{x^2+1}{x^4+1} dx = \frac{1}{4} \int_0^\infty \dfrac{u^{-1/4}+u^{-3/4}}{u+1} du \qquad (*)
\end{align*}

Here:

www.physicsforums.com/threads/exponential-type-integrals.1046843/

in post #12 I proved that, if ##0< a < 1##, then

$$
\int_0^\infty \frac{u^{a-1}}{1+u} du = \frac{\pi}{\sin a \pi}
$$

Using this in ##(*)##, we have

\begin{align*}
\int_0^\infty \dfrac{x^2+1}{x^4+1} dx & = \frac{\pi}{4} \left( \frac{1}{\sin 3 \pi / 4} + \frac{1}{\sin \pi / 4} \right)
\nonumber \\
& = \frac{\pi}{\sqrt{2}}
\end{align*}

In method #1, doing the contour integration directly also gets the value of [tex] \int_0^\infty \frac{1 - x^2}{1 + x^4}\,dx.[/tex]

Placing a branch cut along the positive real axis so that [itex]0 \leq \arg z < 2\pi[/itex], we can calculate [tex] \frac14\oint_C \frac{z^{-3/4} + z^{-1/4}}{1 + z}\,dz = \frac{\pi i}2 \left( e^{-\frac34 \pi i} + e^{-\frac14 \pi i} \right) = \frac{\pi}{\sqrt 2}[/tex] where [itex]C[/itex] conists of the positive real axis ([itex]\arg z = 0[/itex]), a large circle of radius [itex]R[/itex] about the origin, the positive real axis ([itex]\arg z \to 2\pi^{-}[/itex]) and a small circle of radius [itex]\epsilon[/itex] about the origin. In the limit [itex]R \to \infty[/itex] and [itex]\epsilon \to 0[/itex] the contributions from the circles vanish and we are left with [tex]\begin{split}<br /> \frac14 \oint_C \frac{z^{-3/4} + z^{-1/4}}{1 + z}\,dz &= <br /> \frac14\int_0^\infty \frac{u^{-3/4} + u^{-1/4}}{1 + u}\,du - \frac i4\int_0^\infty \frac{u^{-3/4} - u^{-1/4}}{1 + u}\,du \\<br /> &= \int_0^\infty \frac{1 + x^2}{1 + x^4}\,dx - i \int_0^\infty \frac{1 - x^2}{1 + x^4}\,dx. \end{split}[/tex] Taking real and imaginary parts gives the results.
 
pasmith said:
In method #1, doing the contour integration directly also gets the value of [tex] \int_0^\infty \frac{1 - x^2}{1 + x^4}\,dx.[/tex]
Yes, you get out the additional result:

\begin{align*}
\int_0^\infty \frac{1-x^2}{1+x^4} dx = 0
\end{align*}

You can see this also by doing ##y=1/x## in the following integral:

\begin{align*}
\int_0^\infty \frac{1}{1+x^4} dx = \int_0^\infty \frac{y^2}{1+y^4} dy
\end{align*}