How to calculate $\int_0^\infty \frac{1}{(1+x^2)(1+x^{2018})}\,dx$?

You are on the right track. You have $$\tag1 I=\int_0^{\pi/2}\frac1{1+\tan^{2018}x}\,dx. $$ Do the substitution $u=\pi/2-x$. Then, after you do your algebra,
$$\tag2 I=\int_0^{\pi/2}\,\frac{\tan^{2018}u}{1+\tan^{2018}u}\,du. $$ Now combine $(1)$ and $(2)$ to get $$ 2I=\int_0^{\pi/2}\frac1{1+\tan^{2018}u}\,du+\int_0^{\pi/2}\,\frac{\tan^{2018}u}{1+\tan^{2018}u}\,du=\int_0^{\pi/2}\,1\,dx=\frac\pi2. $$ So $I=\pi/4$. Of course, the $2018$ is irrelevant, any positive number will give the same value.


Let $$I=\int_0^{\infty} \frac {dx}{(1+x^n)(1+x^2)}$$

Now substitute $x=\frac 1y$ to get $$I=\int_0^{\infty} \frac {y^n dy}{(1+y^n)(1+y^2)}=\int_0^{\infty} \frac {x^n dx}{(1+x^n)(1+x^2)}$$

Now since $$I=\int_0^{\infty} \frac {dx}{(1+x^n)(1+x^2)}=\int_0^{\infty} \frac {(1+x^n-x^n)dx}{(1+x^n)(1+x^2)}=\int_0^{\infty} \frac {(1+x^n)dx}{(1+x^n)(1+x^2)}-\int_0^{\infty} \frac {x^n dx}{(1+x^n)(1+x^2)}=\arctan x\big\vert_0^{\infty}-I$$

Hence $$2I=\frac {\pi}{2}\Rightarrow I=\frac {\pi}{4}$$

Tags:

Integration