# Integration of $\int_{0}^{\infty}{\frac{1}{(x^2+1)(x^{2019}+1)}dx}$

The original problem is:

The proof of the equation show above is what I want. I found that the first integral equals $$\pi/4$$. The changes of 2019 from 1 to any real numbers bigger than 1 cause no change of the final integration.

• Is this a Mathematica problem or a mathematical proof? Please post your code for the pictures so that people can help.
– creidhne
Commented Dec 19, 2020 at 1:35
• Welcome to Mathematica.SE. Are you sure you are posting on the right site? There is nothing in your question making it clear that it is concerned with Mathematica software. Commented Dec 19, 2020 at 5:32

A numeric verification

Clear["Global*"]


The integrand of the lhs can be written as 1/(x^2 + 1) - 1/((x^2 + 1)(x^2019 + 1))

x^2019/((x^2 + 1) (x^2019 + 1)) ==
(1+x^2019)/((x^2+1)(x^2019+1)) - 1/((x^2+1)(x^2019+1)) ==
1/(x^2 + 1) - 1/((x^2 + 1) (x^2019 + 1)) // Simplify

(* True *)

lhs1 = Integrate[1/(x^2 + 1), {x, 0, ∞}]

(* π/2 *)


The numeric part of the verification:

lhs2 = π ((NIntegrate[1/((x^2+1)(x^2019 + 1)), {x, 0, ∞}]/π) //
RootApproximant)

(* π/4 *)

lhs = lhs1 - lhs2

(* π/4 *)

rhs = 1/2 Integrate[1/(x^2 + 1), {x, 0, ∞}]

(* π/4 *)

lhs == rhs

(* True *)


You should change the variable $$x\to \frac{1}{x}$$

(1/(1 + x^2)*1/(1 + x^2019) /. x -> 1/x)*D[x /. x -> 1/x, x] // Simplify


$$-\frac{x^{2019}}{\left(x^2+1\right) \left(x^{2019}+1\right)}$$

That is \begin{align} &\int_{0}^{\infty} \frac{1}{(1+x^2)(1+x^{2019})}\,\mathrm{d}x\\ =&\int_{\infty}^{0} \frac{1}{(1+(\frac{1}{x})^2)(1+(\frac{1}{x})^{2019})}\,\mathrm{d}\frac{1}{x}\\ =&\int_{\infty}^0-\frac{x^{2019}}{\left(x^2+1\right) \left(x^{2019}+1\right)}\,\mathrm{d}x \end{align}

So we get $$\int_{0}^{\infty} \frac{1}{(1+x^2)(1+x^{2019})}\,\mathrm{d}x=\int_{0}^{\infty}\frac{x^{2019}}{\left(x^2+1\right) \left(x^{2019}+1\right)}\,\mathrm{d}x$$

It means that all of them equal to $$\frac{1}{2}\int_{0}^{\infty} \frac{1}{(1+x^2)(1+x^{2019})}+\frac{x^{2019}}{\left(x^2+1\right) \left(x^{2019}+1\right)}\,\mathrm{d}x$$

Just equal to $$\frac{1}{2}\int_0^{\infty}\frac{1}{1+x^2}\,\mathrm{d}x=\frac{\pi}{4}$$

1/2 Integrate[1/(1 + x^2), {x, 0, ∞}]


π/4

Two chances:

(A)

(x^2019/((1 + x^2) (1 + x^2019)) -
1/2 (1 + x^2019)/((1 + x^2) (1 + x^2019))) // FullSimplify


(* (-1 + x^2019)/(2 (1 + x^2) (1 + x^2019)) *)

(B)

x^2019/((1 + x^2) (1 + x^2019)) -
1/2 (1 + x^2019)/((1 + x^2) (1 + x^2019))


(* -(1/(2 (1 + x^2))) + x^2019/((1 + x^2) (1 + x^2019)) *)

The [NIntegrate] results must be wrong too. We know for sure from NIntegrate that

NIntegrate[1/(1 + x^2), {x, 0, \[Infinity]}]


$$\frac{\pi}{4}$$

By the famous majorant criteria for infinite integrals we have ease to estimate that this has to be bigger then the

Take as a reference for example this page: Integral test for convergence

To do a harder attempt:

NIntegrate[1/(1 + x^2)*1/(1 + x^2019), {x, 0, 1},
PrecisionGoal -> 100, WorkingPrecision -> 200]


(*

0.78522650738967301568031546551813653513306507248637888350236342703381\
7598418491157836764104246377397390853048300788950931805991775817967566\
46995443684292857095545206581998393114079894683526201949452667


*)

That fails and is indeed as expected smaller than $$\frac{\pi}{4}$$.

Plot[{1/(1 + x^2) , 1/((1 + x^2) (1 + x^2019)),
1/((1 + x^2) (1 + x^2020))}, {x, 0.8, 1.2},
PlotLegends -> "Expressions", PlotRange -> {{0.8, 1.2}, Automatic}]


Just for value a little bigger than $$1$$ the second factor in the denominator explodes to very high values and the curves are really different.

Table[{1/(1 + x^2) , 1/((1 + x^2) (1 + x^2019)),
1/((1 + x^2) (1 + x^2020))}, {x, 0.5, 1.5, 0.5}] // TableForm


NIntegrate[1/((1 + x^2) (1 + x^2019)), {x, 0, 1}]


(* 0.785398 *) is a good approximation to the integral with the high requirements by [NIntegrate].

Despite it looks like a sharp jump it is not.

[NIntegrate] is much like Plot it needs the hand of an experienced Mathematician to give good results.

Plot[NIntegrate[1/(1 + x^2)*1/(1 + x^2019), {x, 0, y},

So the two calculations at the beginning of my answer did prove already the equation does not hold. The integral value is close to $$0.785398$$. The functions series $$f(x,n)=\frac{1}{(1+x^2)(1+x^n))}$$ with $$n$$ Integers` is strongly monoton dropping with increasing $$n$$. $$0.785398$$ is already close to the limit for $$n\rightarrow\infty$$.