Complete question: If $I_n$=$\int\limits_0^\infty\frac{x^{2n-2}}{(x^4-x^2+1)^n}dx$ and $I_5$=$\frac{p\pi}{q}$ where p and q are coprime natural numbers, then the value of 8p-q is what?

I have no clue how to go about this question. But I am thinking maybe $I_1$, $I_2$, $I_3$... are a part of some sequence and evauating a simpler integral will lead us to $I_5$ without actually solving for it. I got this idea since solving $I_1$ and $I_2$ is quite easy.

My level- High School.

  • $\begingroup$ Don't know if it will help, but try to start with $t=x^2$ and then $\int_0^\infty \frac{x^{2n-2}}{(x^4-x^2+1)^n} dx=\int_0^\infty \frac{t^{n-1}}{(t^2-t+1)^n}\frac{dt}{2\sqrt{t}}$ $\endgroup$ Commented Oct 29, 2023 at 14:14
  • $\begingroup$ @Chessplayer that doesn't help, the $\sqrt{t}$ is still a menace I think. $\endgroup$ Commented Oct 29, 2023 at 14:17
  • $\begingroup$ maybe try integration by parts with this? $\endgroup$ Commented Oct 29, 2023 at 14:21
  • $\begingroup$ Okay @Chessplayer I put it on integral-calculator.com and the anti-derivative of $I_n$ does not exist. It can calculate the definite integral for specific values of n but does not show any steps. $\endgroup$ Commented Oct 29, 2023 at 14:26
  • $\begingroup$ Where did you get this question? $\endgroup$ Commented Oct 29, 2023 at 14:32

4 Answers 4


Utilize $J(a)=\int_0^\infty\frac{1}{x^4-ax^2+1}dx=\frac\pi{2\sqrt{2-a}} $ to evaluate \begin{align} I_n=&\int_0^\infty\frac{x^{2n-2}}{(x^4-x^2+1)^n}dx = \frac1{(n-1)!}\frac{d^{n-1}J(a)}{da^{{n-1}}}\bigg|_{a=1} \end{align}

In particular \begin{align} I_5=&\frac1{4!}\frac{d^{4}J(a)}{da^{4}}\bigg|_{a=1} = \frac1{4!}\frac{d^{4}}{da^{{4}}} \bigg(\frac\pi{2\sqrt{2-a}}\bigg)\bigg|_{a=1}=\frac{35\pi}{256} \end{align} Thus, $8p-q=8(35)-256= 24.$

  • 2
    $\begingroup$ Very clever one. $\endgroup$
    – Zadig
    Commented Oct 29, 2023 at 15:07


Now we have to use $B(a,b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}=\int_0^{\infty}\frac{y^{a-1}}{(1+y)^{a+b}}dy$ for $a+b=n$ and various values of $(a,b).$ We have also to use the magic formula $$B(a,1-a)=\pi/\sin (a\pi)\ \ (*)$$ for $0<a<1.$ For example


$$I_2=\frac{1}{6}\left(B(1,1)+2B(5/6,7/6)+B(1/2,3/2)\right)$$ and you have for instance to observe that $\Gamma(7/6)=\Gamma(1/6)/6$ for using (*) and computing $B(5/6,7/6)$. And so on, choose a rainy day for computing $I_5.$

  • 1
    $\begingroup$ Mate I have no clue what the gamma there means. I am in high school. I should've specified that earlier. $\endgroup$ Commented Oct 29, 2023 at 15:18
  • 4
    $\begingroup$ The Quanto solution is so beautiful that I should withdraw mine. But cleverness against technique...both are useful. $\endgroup$ Commented Oct 29, 2023 at 15:20
  • $\begingroup$ If you do binomial expansion your solution would be better. $\endgroup$
    – Bob Dobbs
    Commented Oct 31, 2023 at 5:00

Splitting the integral into two, you have $$ I_n=\int_0^\infty\frac{x^{2n-2}}{(x^4-x^2+1)^n}dx= \int_0^1\frac{x^{2n-2}}{(x^4-x^2+1)^n}dx+\overset{x\to 1/x}{\int_1^\infty\frac{x^{2n-2}}{(x^4-x^2+1)^n}dx}=\int_0^1\frac{x^{2n-2}+x^{2n}}{(x^4-x^2+1)^n}dx= \int_0^1\frac{x^{-2}+1}{(x^2-1+x^{-2})^n}dx= \int_0^1\frac{1}{((x-x^{-1})^2+1)^n}d(x-x^{-1})= \int_{-\infty}^0\frac1{(x^2+1)^n}dx. $$ The last integral is easy to handle under $x=\tan x$ for $n=5$ and I think you can do it.


Let $$I_n=\int_0^{\infty} \frac{x^{2n-2}dx}{(x^4-x^2+1)^n}=\int_{0}^{\infty} \frac{(1/x^2)dx}{(x^1+x^{-2}-1)^n}$$ $$=\frac{1}{2}\int_{0}^{\infty} \left[\frac{(1+1/x^2)}{(x^2+x^{-2}-1)^n}-\frac{(1-1/x^2)}{(x^2+x^{-2}-1)^n}\right]dx.$$ $$I_n=\frac{1}{2}\int_{0}^{\infty} \left[\frac{(1+1/x^2)}{((x-1/x)^2+1)^n}-\frac{(1-1/x^2)}{((x+1/x)^2-3)^n}\right]dx.$$ Let us call the second integral as $J$, then $$J_n=\frac{1}{2}\int_{0}^{1} \frac{(1-1/x^2)}{((x+1/x)^2-3)^n}dx+\frac{1}{2}\int_{1}^{\infty} \frac{(1-1/x^2)}{((x+1/x)^2-3)^n}dx$$ Edited: Using $x+1/x=v$, we get

$$J_n=\frac{1}{2}\int_{\infty}^{2} \frac{dv}{(v^2-3)^n}+\frac{1}{2}\int_{2}^{\infty} \frac{dv}{(v^2-3)^n}=0$$. Let $x-1/x=u$, then $$I_n=\frac{1}{2}\int_{-\infty}^{\infty} \frac{du}{(u^2+1)^n}+\frac{1}{2}\int_{\infty}^{\infty} \frac{dv}{(v^2-3)^n}$$
Next, let $u=\tan t$, then by Beta-Integral $$I_n=\int_{0}^{\pi/2}\cos^{2n-2}t~ dt$$ So finally $I_5=\frac{35}{256}\pi$ Note that $\int_{0}^{\pi/2} \cos^8 t dt$ can be obtained by other methods like trigonometric expansion of $\cos^8 t=\sum_{k=0}^{8} A_k \cos kt.$

Added: Integration of $$K_m=\int_{0}^{\pi/2} \cos^m t dt=\int_{0}^{\pi/2} \cos ^{m-2} t ~ (1-\sin^2 t) dt=K_{m-2}- \int_{0}^{\pi/2} \sin t ~(\sin t \cos^{m-2} t dt.$$ Integration by parts gives $$K_m=K_{m-2}+\left.\sin t\frac{ \cos^{m-1} t}{m-1}\right|_{0}^{\pi/2}-\frac{K_m}{m-1}.$$ We get $$K_m=\frac{m-1}{m} K_{m-2}$$ Here, $$I=J_8=\frac{}{}\frac{\pi}{2}=\frac{35 \pi}{256}.$$

  • $\begingroup$ I think you made some mistake typing your answer in. Your answer is correct though. $\endgroup$ Commented Oct 29, 2023 at 16:21
  • $\begingroup$ I can't find any one. $\endgroup$
    – Z Ahmed
    Commented Oct 29, 2023 at 16:44
  • $\begingroup$ Well yeah cause you edited it. Thanks for the answer, it is the only one that got through my thick skull a little bit. Quanto's answer just went over my head. Any other way to solve the first one (i.e. without using Beta-Integral)? $\endgroup$ Commented Oct 29, 2023 at 16:48
  • $\begingroup$ Also I was told by my teacher that making substitution that makes the limits same is illegal. Is that not the case? $\endgroup$ Commented Oct 29, 2023 at 16:49
  • $\begingroup$ @calcandquant I have edited it up, it may help you now. $\endgroup$
    – Z Ahmed
    Commented Oct 29, 2023 at 17:58

You must log in to answer this question.

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