How do I evaluate this?

  • 4
    $\begingroup$ Is complex analysis (the residue theorem) an option? $\endgroup$ Jan 31, 2014 at 17:04
  • $\begingroup$ First and foremost it is your level of math background that would determine your path. If you are a bright Calc II student and were asked this then p.f.d. would ensue IF you could successfully factor and get: $1+x^6 = (1+x^2)(1-3^{1/2} x + x^2)(1+3^{1/2}x + x^2)$ Then after having decomposed it into 3 parts you would get a couple of log's and several arctans. The logs cancel in the limit (after combining to a single log) and the remaining arctans produce $\pi/3$. Have fun. $\endgroup$
    – user125275
    Jan 31, 2014 at 18:54
  • 6
    $\begingroup$ An overly rated question with no background/attempts/context $\endgroup$
    – Lost1
    Feb 2, 2014 at 12:38

9 Answers 9


Method 1 (beta function)

If one don't want to use complex analysis, one can evaluate the integral as a beta function.

For any $\alpha > -1, \beta > \alpha + 1$. Let $y = x^\beta$ and $\gamma = \frac{\alpha+1}{\beta}$. It is clear $0 < \gamma < 1$ and

$$\int_0^\infty \frac{x^\alpha}{1+x^\beta}dx = \frac{1}{\beta}\int_0^\infty \frac{y^{\gamma - 1}}{1+y} dy = \frac{1}{\beta}\int_0^\infty \left(\frac{y}{1+y}\right)^{\gamma - 1}\left(\frac{1}{1+y}\right)^{2-\gamma} dy $$ Let $z = \frac{y}{1+y}$ and notice $1 - z = \frac{1}{1+y}$ and $dz = \frac{dy}{(1+y)^2}$, one can rewrite above integral into that for a beta function: $$\frac{1}{\beta}\int_0^1 z^{\gamma-1} (1-z)^{-\gamma} dz = \frac{1}{\beta}\frac{\Gamma(\gamma)\Gamma(1-\gamma)}{\Gamma(1)} = \frac{1}{\beta}\frac{\pi}{\sin \pi\gamma} = \frac{\pi}{ \beta\sin\pi\left(\frac{\alpha+1}{\beta}\right) } $$ For the question at hand, $\alpha = 0, \beta = 6$. The integral we want becomes $$\frac{\pi}{6\sin\left(\frac{\pi}{6}\right)} = \frac{\pi}{3}$$

Method 2 (partial fraction decomposition)

To obtain the integral in a more elementary manner, one can perform partial fraction decomposition to the integrand. Instead of breaking the integrand into linear factors, one can break it into quadratic factors to avoid the introduction of any complex numbers. Notice $$x^6 + 1 = (x^2+1)(x^4 - x^2 + 1) = (x^2 + 1)((x^2+1)^2 - 3x^2) = (x^2 + 1)(x^2 + \sqrt{3}x + 1)(x^2 - \sqrt{3}x + 1)$$ We will have

$$\frac{1}{x^6+1} = \frac{A + A'x}{x^2+1} + \frac{B+Cx}{x^2 + \sqrt{3}x + 1} + \frac{B'+C'x}{x^2 - \sqrt{3}x + 1}$$ for some suitable chosen constants $A,A', B,B',C,C'$. Because LHS is a an even function in $x$, symmetry tell us $A' = 0$, $B = B'$ and $C = -C'$. After a little bit of algebra, we have

$$\begin{align} \frac{1}{x^6+1} = & \frac{1}{6}\left\{ \frac{2}{x^2+1} + \frac{2+\sqrt{3}x}{x^2 + \sqrt{3}x + 1} + \frac{2-\sqrt{3}x}{x^2 - \sqrt{3}x + 1} \right\}\\ = & \frac{1}{6}\left\{ \frac{2}{x^2+1} + \frac{\frac12+\sqrt{3}\left(x+\frac{\sqrt{3}}{2}\right)}{ \left(x+\frac{\sqrt{3}}{2}\right)^2 + \frac14} + \frac{\frac12-\sqrt{3}\left(x-\frac{\sqrt{3}}{2}\right)}{ \left(x-\frac{\sqrt{3}}{2}\right)^2 + \frac14} \right\} \end{align} $$ Introduce variables $y = 2 \left(x + \frac{\sqrt{3}}{2}\right)$ and $z = 2 \left(x - \frac{\sqrt{3}}{2}\right)$. Using the fact the integrand is an even function again, we obtain:

$$ \require{cancel} \begin{align} \int_0^\infty \frac{dx}{1+x^6} = & \frac12\int_{-\infty}^\infty \frac{dx}{1+x^6}\\ = & \frac{1}{12}\left\{ 2 \int_{-\infty}^{\infty} \frac{dx}{1+x^2} + \int_{-\infty}^{\infty} \frac{1+ \color{red}{\cancelto{0}{\color{gray}{\sqrt{3}y}}} }{1+y^2} dy + \int_{-\infty}^{\infty}\frac{1- \color{red}{\cancelto{0}{\color{gray}{\sqrt{3}z}}} }{1+z^2} dz \right\}\\ = & \frac{1}{12} ( 2\pi + \pi + \pi )\\ = & \frac{\pi}{3} \end{align}$$

As Steven Stadnicki pointed out, we don't really need to care about the $\sqrt{3}y$ and $\sqrt{3}z$ part in the the integrals above. This is because they are odd functions in the new variables. At the end, what we need is the value of the integral:

$$\int_{-\infty}^\infty \frac{dx}{1+x^2} = \left[\tan^{-1} x \right]_{-\infty}^{\infty} = \pi.$$

Method 3

Inspired by Barry Cipra's "rabbit from a hat", here is another way to perform the integral. Let $\mathcal{I}$ be the desired integral. By variable substitution $x \leftrightarrow \frac{1}{x}$, we have

$$\mathcal{I} = \int_0^\infty \frac{dx}{1+x^6} = \int_0^\infty \frac{x^{-2} dx}{1+x^{-6}} = \int_0^\infty \frac{x^4 dx}{1+x^6}$$ This implies $$ \mathcal{I} = \frac12 \int_0^\infty \frac{1+ x^4}{1+x^6} dx = \frac12 \int_0^\infty \frac{x^2 + x^{-2}}{x^3 + x^{-3}}\frac{dx}{x} = \frac12 \int_0^\infty \frac{x^2 + x^{-2}}{x^3 + x^{-3}}\ \frac{d(x-x^{-1})}{x+x^{-1}} $$ Introduce variable $u = x-x^{-1}$, we get $$\mathcal{I} = \frac12 \int_{-\infty}^\infty\frac{u^2+2}{(u^2+4)(u^2+1)} du =\frac16 \int_{-\infty}^\infty \left(\frac{1}{1+u^2}+\frac{2}{4+u^2}\right) du =\frac16 (\pi + \pi ) = \frac{\pi}{3} $$

  • $\begingroup$ +1 for the very clean partial-fraction explanation! One tiny tweak I'd suggest: you might note explicitly that we don't need to care about the $\sqrt{3}y$ term and the similar $z$ term in our final integrals because of the new domain of integration (as odd functions, their integral will be zero). $\endgroup$ Jan 31, 2014 at 19:16
  • $\begingroup$ @StevenStadnicki Thanks for pointing that out. I was planning to include a note about that too but haven't figure out how to say that it previous edit. $\endgroup$ Jan 31, 2014 at 19:30

The easiest way, if you know the residue theorem, is to consider the following integral:

$$\oint_C \frac{dz}{1+z^6} $$

where $C$ is a wedge of radius $R$ of angle $\pi/3$ in the upper half plane in the complex plane. The integral over the circular arc vanishes as $R\to\infty$, and we have that

$$\left ( 1-e^{i \frac{\pi}{3}} \right ) \int_0^{\infty} \frac{dx}{1+x^6} = i 2 \pi \frac1{6 e^{i 5 \pi/6}} = \frac{\pi}{3} e^{-i \pi/3}$$

by the residue theorem. (Pole at $z=e^{i \pi/6}$.) Therefore,

$$\int_0^{\infty} \frac{dx}{1+x^6} = \frac{\pi}{3}$$

  • $\begingroup$ It seems a person of Class 12 will not get such a question in the test. Residue theorem is not covered in class 12 syllabus. $\endgroup$ Jan 31, 2014 at 17:34
  • 1
    $\begingroup$ Sorry, but what is Class 12? $\endgroup$
    – user61318
    Jan 31, 2014 at 18:41
  • 6
    $\begingroup$ If you don't give the context of your question, then I think this answer is perfectly fine. $\endgroup$ Jan 31, 2014 at 19:00

Here's a rabbit-from-a-hat approach that avoids doing anything messy or complex:

Note that $1+x^6=(1+x^2)(1-x^2+x^4)$ implies


Now we know that


The change of variable $u=x^3$, so that $du=3x^2dx$, gives


Finally, letting $x=1/u$, so that $dx=-du/u^2$, shows

$$I=\int_0^\infty{1-x^4\over1+x^6}dx=-\int_\infty^0{1-(1/u^4)\over1+(1/u^6)}{du\over u^2}=\int_0^\infty{u^4-1\over u^6+1}du=-I$$

which implies $I=0$. Putting everything together, we have


I'd rather not say how long it took me to find this "simple" solution!

  • $\begingroup$ +1 the cancellation in the integral $I$ is really a "rabbit from a hat". $\endgroup$ Jan 31, 2014 at 22:28


$$f(z)=\frac1{z^6+1}\;,\;\;C_R=[-R,R]\cup\gamma_R\;,\;\;\gamma_R:=\{z\in\Bbb C\;;\;z=Re^{it}\,,\,0<t<\pi\}$$


$$-1=e^{\pi i+2k\pi}=e^{\pi i(1+2k)}\implies z_k=e^{\frac{\pi i}6(1+2k)}\;,\;\;k=0,1,...,5$$

So the poles of $\;f\;$ within the domain enclosed by $\;C_R\;$ are $\;z_0,z_1,z_2\;$ , and

$$\text{Res}_{z=z_n}(f)=\lim_{z\to z_n}(z-z_n)f(z)\stackrel{\text{l'H}}=\frac1{6z_n^5}$$

And thus CRT gives

$$\oint_{C_R}f(z)dz=2\pi i\frac16\left(e^{-5\pi i/6}+e^{-5\pi i/ 2}+e^{-\pi i/6}\right)$$

And since

$$\left|\;\int_{\gamma_R}f(z)dz\;\right|\le \pi R\frac1{R^6-1}\xrightarrow[R\to\infty]{}0$$

We finally get (the function is an even one):

$$\int_0^\infty \frac{dx}{x^6+1}=\frac12\text{Re}\left(\lim_{R\to\infty}\oint_{C_R}f(z)dz\right)=$$

$$=\frac12\text{Re}\left(\frac{\pi i}3\left(\frac{\sqrt3}2-\frac i2+0-i+\frac{\sqrt3}2-\frac i2\right)\right)=\frac\pi3$$


Let $t=\dfrac1{1+x^6}$ , then recognize the expression of the Beta function in the new integral, and apply the reflection formula for the $\Gamma$ function. In general, all integrals of the form $\displaystyle\int_0^\infty\frac{x^a}{(1+x^b)^c}dx$ can be evaluated in this same way.

  • $\begingroup$ +1 for the "all integrals of form..." I'll keep that in mind for some of the integrals I do in the future. :) $\endgroup$
    – apnorton
    Jan 31, 2014 at 22:41

Here is a somewhat unusual way to evaluate this integral. By splitting up the integral over $[0,1]$ and $[1,\infty]$ and making the change of variables $x \mapsto 1/x$ in the second integral, we find that your integral equals

$$\int_0^1 \left(\frac{1}{1+x^6} + \frac{x^4}{1+x^6}\right) dx = \sum_{n=1}^\infty \left(\frac{(-1)^n}{6n+1} + \frac{(-1)^n}{6n+5}\right) = L(\chi, 1)$$

where $\chi$ is the odd Dirichlet character of conductor $12$ defined by $\chi(1)=\chi(5)=1$ and $\chi(-1)=\chi(-5)=-1$. This character is not primitive, being induced by the primitive quadratic Dirichlet character $\eta$ of conductor $4$. The formula for the special value at $s=1$ of the $L$-function of an odd primitive Dirichlet character $\eta$ of conductor $f$ is

$$L(1, \eta) = -\frac{\tau(\eta)}{f}\frac{\pi}{if} \sum_{a=1}^f \overline{\eta}(a) a$$

where $\tau$ is the Gauss sum. In this case, the Gauss sum evaluates to $e^{2\pi i/4} - e^{6 \pi i /4} = 2i$ and the sum over $a$ evaluates to $1-3=-2$, so we get

$$L(1, \eta) = 1 - \frac{1}{3} + \frac{1}{5} - \dots = \frac{\pi}{4},$$

a formula which is anyways well-known. The $L$-function of the imprimitive character $\chi$ is related to the $L$-function of $\eta$ by removing the Euler factor at $3$,

$$L(\chi, s) = (1-\eta(3)3^{-s})L(\eta, s) = (1+3^{-s})L(\eta, s).$$

Evaluating both sides at $s=1$ we have

$$L(\chi, 1) = \frac{4}{3} \frac{\pi}{4} = \frac{\pi}{3}.$$


Without complex analysis nor special functions: $$x^6+1=(x^2+1)(x^4-x^2+1)=(x^2+1)(x^2+\sqrt3x +1)(x^2-\sqrt3x+1).$$ ($x=\pm i$ are obviously roots and $(x^4-x^2+1)$ is biquadratic)

And now you have the following partial fraction decomposition: $${1\over x^6+1} = {Ax+B\over x^2+1} + {Cx+D\over x^2+\sqrt3x +1} + {Ex+F\over x^2 -\sqrt3x + 1}.$$ $\cdots$


\begin{align}\int_0^\infty\frac{1}{1+x^6}\overset{x\to\frac1x}{dx} =&\ \frac12\int_0^\infty\frac{1+x^4}{1+x^6}dx = \frac12\int_0^\infty\frac{1}{1+x^2}+ \overset{x^3\to x}{\frac{x^2}{1+x^6} }\ dx\\ =& \ \frac23 \int_0^\infty\frac{1}{1+x^2}dx=\frac23\cdot\frac\pi2=\frac\pi3 \end{align}


$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ $\ds{\bbox[5px,#ffd]{}}$

\begin{align} &\bbox[5px,#ffd]{\int_{0}^{\infty}{\dd x \over 1 + x^{6}}} = {1 \over 6}\int_{0}^{\infty}{x^{1/6 - 1} \over 1 + x}\,\dd x = {1 \over 6}\,\ \overbrace{\Gamma\pars{1 \over 6}\Gamma\pars{1 - {1 \over 6}}} ^{\ds{\substack{\ds{Ramanujan's} \\[0.5mm] \ds{Master}\\[0.75mm] \ds{Theorem}}}} \\[5mm] = &\ {1 \over 6}\,{\pi \over \sin\pars{\pi/6}} = {1 \over 6}\,\pi\ \underbrace{\csc\pars{\pi \over 6}}_{\ds{2}}\ =\ \bbx{\pi \over 3} \approx 1.0472 \\ & \end{align}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .