Calculus – How to Calculate a Complex Integral

calculusclosed-formdefinite integralsintegration

How to calculate this integral
$$ \int_{0}^{\infty} \left(\frac{x – 1}{\ln(x)}\right)^2 \cdot \frac{1}{1 + x^n} \,dx$$

This is how I start
$$f(a)=\int_{0}^{\infty} \frac{(x^a-1)^2}{\ln^2(x)}\frac{1}{1+x^n}dx$$
Feynman trick
$$f’’(a)=\int_{0}^{\infty} \frac{4x^{2a}}{1+x^n} – \frac{2x^a}{1+x^n} dx$$
used well known value of $$\int_{0}^{\infty} \frac{x^c}{1+x^b}dx $$

$$ \int_{0}^{\infty} \left(\frac{x – 1}{\ln(x)}\right)^2 \cdot \frac{1}{1 + x^n} \,dx=2 \int_0^1 \left( \ln \tan \frac{\pi(2t+1)}{2n}-\ln \tan \frac{\pi(t+1)}{2n} \right) dt$$

or

$$ \int_{0}^{\infty} \left(\frac{x – 1}{\ln(x)}\right)^2 \cdot \frac{1}{1 + x^n} \,dx=\frac{2n}{\pi} \left( \int_\frac{\pi}{n}^\frac{3\pi}{2n} \ln \tan x dx – \int_\frac{\pi}{2n}^\frac{\pi}{n} \ln \tan x dx\right) dt$$

which seems numerically correct. How would you suggest to proceed?

Best Answer

If the problem is $$I=\int \log (\tan (x))\,dx=\int \frac{\log (t)}{t^2+1}\,dt$$ write $(t^2+1)=(t+i)(t-i)$, use partial fraction decomposition to get $$I=-\frac{i}{2}\, \log (t)\, \log \left(\frac{i-t}{i+t}\right)+\frac{i}{2} \,(\text{Li}_2(i t)-\text{Li}_2(-i t))$$ The final integral write $$\log \left(\tan \left(\frac{\pi }{2 n}\right)\right)-4 \log \left(\tan \left(\frac{\pi }{n}\right)\right)+3 \log \left(\tan \left(\frac{3 \pi }{2 n}\right)\right)-i\,\frac{ n}{\pi } \large A$$ with $$A=\text{Li}_2\left(-i \tan \left(\frac{\pi }{2 n}\right)\right)-\text{Li}_2\left(i \tan \left(\frac{\pi }{2 n}\right)\right)-2 \text{Li}_2\left(-i \tan \left(\frac{\pi }{n}\right)\right)+$$ $$2 \text{Li}_2\left(i \tan \left(\frac{\pi }{n}\right)\right)+\text{Li}_2\left(-i \tan \left(\frac{3 \pi }{2 n}\right)\right)-\text{Li}_2\left(i \tan \left(\frac{3 \pi }{2 n}\right)\right)$$

Edit

Asymptotically $$I_n=\log \left(\frac{27}{16}\right)+\frac{\pi ^2}{3 n^2}+\frac{7 \pi ^4}{40 n^4}+\frac{713 \pi ^6}{7560 n^6}+\frac{39497 \pi ^8}{725760 n^8}+O\left(\frac{1}{n^{10}}\right)$$ seems to be a quite good approximation even for small values of $n$ (for $n=5$, the above series gives $0.689242$ while the exact value is $0.689678$).

Related Question