# prove that $\int_{-\infty}^{\infty} \frac{x^4}{1+x^8} dx= \frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$ [duplicate]

This question already has an answer here:

prove that $$\int_{-\infty}^{\infty} \frac{x^4}{1+x^8} dx= \frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$$

My attempt: C is semicircle in upper half complex plane

Simple poles = $e^{i\frac{\pi}{8}}, e^{i\frac{3\pi}{8}},e^{i\frac{5\pi}{8}},e^{i\frac{7\pi}{8}}$ lie in upper semi-circle C and real axis

Given integral value $= 2\pi i \cdot (\text{sum of residues}) = 2 \pi i \left(\frac{-1}{8}\right) \left[e^{i\frac{5\pi}{8}}+e^{i\frac{15\pi}{8}}+e^{i\frac{25\pi}{8}}+e^{i\frac{35\pi}{8}}\right] = 0.27059 \pi$

This is numerically equal to $\frac{\pi}{\sqrt 2} \sin \frac{\pi}{8}$. But without using calculator, how to get this expression.

## marked as duplicate by Guy Fsone, Did, Namaste integration StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 17 '18 at 0:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 4 Answers

Just extending what you've got so far. Let's note $z=e^{i\frac{5\pi}{8}}$ and recall that $\cos{z}=\frac{e^{iz}+e^{-iz}}{2}$, then: $$2 \pi i \left(\frac{-1}{8}\right) \left[e^{i\frac{5\pi}{8}}+e^{i\frac{15\pi}{8}}+e^{i\frac{25\pi}{8}}+e^{i\frac{35\pi}{8}}\right]= 2 \pi i \left(\frac{-1}{8}\right) \left[z+z^3+z^5+z^7\right]=\\ 2 \pi i \left(\frac{-1}{8}\right) z \left[1+z^2+z^4+z^6\right] = 2 \pi i \left(\frac{-1}{8}\right) z \left[1+z^2+z^4(1+z^2)\right]=\\ 2 \pi i \left(\frac{-1}{8}\right) z (1+z^2)(1+z^4)= 2 \pi i \left(\frac{-1}{8}\right) z^4 (z^{-1}+z)(z^{-2}+z^2)=\\ 2 \pi i \left(\frac{-1}{8}\right) e^{i\frac{5\pi}{2}} 2\cos\left(\frac{5\pi}{8}\right)2 \cos\left(\frac{5\pi}{4}\right)=\pi i(-1)i \cos\left(\frac{\pi}{2}+\frac{\pi}{8}\right)\left(-\frac{1}{\sqrt{2}}\right)=\\ \frac{\pi}{\sqrt{2}}\sin\left(\frac{\pi}{8}\right)$$

A couple of alternative approaches to Euler's Beta function or contour integration.

1) The reflection formula for the digamma function

By parity we have $I=\int_{-\infty}^{+\infty}\frac{x^4}{1+x^8}\,dx = 2\int_{0}^{+\infty}\frac{x^4}{1+x^8}\,dx$ and by splitting $\mathbb{R}^+$ as $(0,1]\cup(1,+\infty)$, then enforcing the substitution $x\mapsto \frac{1}{x}$ on the second interval,

$$I = 2\int_{0}^{1}\frac{x^2+x^4}{1+x^8}\,dx = 2\sum_{n\geq 0}\left[\frac{1}{16n+3}+\frac{1}{16n+5}-\frac{1}{16n+11}-\frac{1}{16n+13}\right]$$ where the RHS is a sort of BBP-type formula. Since $\sum_{n\geq 0}\frac{1}{(n+a)(n+b)}=\frac{\psi(a)-\psi(b)}{a-b}$ and $\psi(x)-\psi(1-x)=-\pi\cot(\pi x)$, $$\sum_{n\geq 0}\left[\frac{1}{16n+3}-\frac{1}{16n+13}\right]=\frac{\pi}{16}\cot\frac{3\pi}{16},$$ $$\sum_{n\geq 0}\left[\frac{1}{16n+5}-\frac{1}{16n+11}\right]=\frac{\pi}{16}\cot\frac{5\pi}{16},$$ and finally $$I = \frac{\pi}{8}\left[\cot\frac{3\pi}{16}+\cot\frac{5\pi}{16}\right] = \color{blue}{\frac{\pi}{\sqrt{2}}\sin\frac{\pi}{8}}=\frac{\pi}{2}\sqrt{1-\frac{1}{\sqrt{2}}}.$$

We have $$I = \int_{\mathbb{R}}\frac{dx}{x^4+\frac{1}{x^4}}=\int_{\mathbb{R}}\frac{dx}{\left(x^2+\frac{1}{x^2}\right)^2-2}=\int_{\mathbb{R}}\frac{dx}{\left[\left(x-\frac{1}{x}\right)^2+2\right]^2-2}$$ hence, by the residue theorem and de l'Hopital rule, $$I = \int_{\mathbb{R}}\frac{dz}{(z^2+2)^2-2}=2\pi i\sum_{\zeta\in Z}\operatorname*{Res}_{z=\zeta}\frac{1}{z^4+4z^2+2}\stackrel{\text{d.H.}}{=}\frac{\pi i}{2}\sum_{\zeta\in Z}\frac{1}{z^3+2z}$$ where $Z=\{i\sqrt{2-\sqrt{2}},i\sqrt{2+\sqrt{2}}\}$. Of course the outcome is the same.

• Every time i learn from you. You introduce new concepts for me. thnx – Magneto Jan 15 '18 at 1:43

An alternative approach using complex analysis.

It is not nice to have to calculate many residues. Just reduce it by noting the following: \begin{align} I=\int^{\infty}_{-\infty}\frac{x^4}{x^8+1}\,dx=\Re\left(2\int^\infty_{0}\frac{1}{x^4-i}\,dx\right) \end{align} Now calculate the RHS by considering: \begin{align} \oint_C\frac{1}{z^4-i}\,dz \end{align} Where $C$ is a quarter circle with radius $R>1$ in the first quadrant. There is only one pole inclosed instead of four! Call that number $\alpha$. So you only have to find 1 residue (one fourth of the original number!). By the residue theorem we have: \begin{align} \oint_C\frac{1}{z^4-i}\,dz=2\pi i \text{Res}_{z=\alpha}\frac{1}{z^4-i} \end{align} On the other hand we have: \begin{align} \oint_C\frac{1}{z^4-i}\,dz=-i\int^R_0\frac{1}{x^4-i}\,dx+\int^R_0 \frac{1}{x^4-i}\,dx+\int_{B_R}\frac{1}{z^4-i}\,dz \end{align} where $B_R$ is the circular part. After letting $R\to\infty$ you can verify that: \begin{align} (1-i)\int^{\infty}_0 \frac{1}{x^4-i}\,dx=2\pi i \text{Res}_{z=\alpha}\frac{1}{z^4-i} \end{align}

Hence:

\begin{align} I=\Re\left[4\pi \frac{i}{1-i}\text{Res}_{z=\alpha}\frac{1}{z^4-i} \right] \end{align}

The calculation are left for you.

• That's not what the question asks for! – rtybase Jan 14 '18 at 15:39
• @rtybase it was more like giving an alternative approach – Shashi Jan 14 '18 at 15:41
• It's not giving anything, OP calculated the residues already, they want to see how that is equal to $\frac{\pi}{\sqrt{2}}\sin\left(\frac{\pi}{8}\right)$ read the question again! – rtybase Jan 14 '18 at 15:42
• Maybe using this approach he/she could arrive at the goal easier? Maybe this would help the OP in the future? If the OP tells me he/she did not have anything good from this answer I kindly delete this answer.. – Shashi Jan 14 '18 at 15:44
• Personally, if I would post the OP's question and would see different answers using the same strategy as mine , I would be really happy. It stays in complex analysis so I do not see why it is possibly problematic.. – Shashi Jan 14 '18 at 15:46

$$\int_{-\infty}^{\infty} \frac{x^4}{1+x^8} dx=2\int_{0}^{\infty} \frac{x^4}{1+x^8} dx=2\int_{0}^{\infty} \frac{(x^8)^{1/2}}{1+x^8} dx\\ =\frac{1}{4} \int_{0}^{\infty} \frac{u^{5/8-1}}{(1+u)^{1}} du=\frac{1}{4}B\left(\frac{5}{8}, 1-\frac{5}{8}\right) =\frac{1}{4}\frac{\Gamma(5/8)\Gamma(1-5/8)}{\Gamma(1) }\\=\color{blue}{\frac{1}{4}\frac{π}{\sin(\frac{5π}{8}) } =\frac{1}{4}\frac{π}{\sin(\frac{3π}{8}) }}\color{red}{=\frac{π}{\sqrt2}\sin(\frac{π}{8})}$$

where we made use of the beta and Gamma function and the Schwartz duplication formula Along with the the below relations $$-\frac{\sqrt2}{2}= \cos(\frac{3π}{4}) = \left(\cos^2(\frac{3π}{8})-\sin^2(\frac{3π}{8})\right)=\left(1-2\sin^2(\frac{3π}{8})\right) \\\implies\color{blue}{\sin (\frac{3π}{8}) =\frac{\sqrt{2+\sqrt2}}{2}}$$ And by the same token, $$\color{red}{\sin (\frac{π}{8}) =\frac{\sqrt{2-\sqrt2}}{2} = \frac{\sqrt{2}}{2\sqrt{2+\sqrt2}} =\frac{\sqrt{2}}{4\sin (\frac{3π}{8}) }.}$$

• could you please explain how did you get $(1+u)^{1-1}$ ? – Markoff Chainz Jan 14 '18 at 14:58
• simple and beautiful!. Any idea thru contour integration? – Magneto Jan 14 '18 at 15:16
• @anirudhb you will certainly have to deal with four poles . and compute the corresponding residues as well. which I am lazy to type here – Guy Fsone Jan 14 '18 at 15:32
• @MarkoffChainz see the edit now – Guy Fsone Jan 15 '18 at 10:13