Integral for the New Year $2019$!

$$\int_0^{\pi } \frac{2 \sin (2018 x) \sin (x)}{1-2 e \cos (x)+e^2} \, dx=\frac{\pi }{e^{2019}}$$

$$\int_0^1 (-\ln (x))^{2018} \, dx=\Gamma (2019)$$

$$\int_0^1 \frac{\frac{1-x^{2018}}{1-x}-2018}{\ln (x)} \, dx=\ln (\Gamma (2019))$$

$$\int_0^{\infty } \frac{\tan ^{-1}(2018 x)}{x \left(1+x^2\right)} \, dx=\frac{1}{2} \pi \ln (2019)$$


Here $2019$ as the sum of the squares of $3$ primes in $6$ ways:

$$2019= 7^2 + 11^2 + 43^2 $$

$$2019= 7^2 + 17^2 + 41^2 $$

$$2019= 13^2 + 13^2 + 41^2 $$

$$2019= 11^2 + 23^2 + 37^2 $$

$$2019= 17^2 + 19^2 + 37^2 $$

$$2019= 23^2 + 23^2 + 31^2 $$

Actually $2019$ is the smallest integer to have such a property. Happy New Year!


I will show that $$\int_{-\infty}^{\infty} \frac{\sin(x-nx^{-1})}{x+x^{-1}}\,dx=\frac{\pi}{e^{n+1}}.$$ I will do this using residue theory. We consider the function $$F(z)=\frac{z\exp(i(z-nz^{-1}))}{z^2+1}.$$ On the real axis, this has imaginary part equal to our integrand. We integrate around a contour that goes from $-R$ to $R$, with a short half circle detour around the pole at $0$. Then we enclose it by a circular arc through the upper half plane, $C_R$. The integral around this contour is $2\pi i$ times the residue of the pole at $z=+i$. Using the formula (see Wikipedia, the formula under "simple poles") for the residue of the quotient of two functions which are holomorphic near a pole, we see that the residue is $$Res(F,i)=\frac{i\exp(i(i-i^{-1}n)}{2i}=\frac{1}{2}e^{-(n+1)}.$$ Thus the value of the integral is $2\pi iRes(F,i)=i\frac{\pi}{e^{n+1}}$. This is the answer we want up to a constant of $i$, which comes from the fact that our original integrand is the imaginary part of the function $F(z)$. We are therefore done if we can show that the integral around $C_R$ approaches $0$ as $R\to \infty$ as well as the integral around the little arc detour at the origin going to $0$ as its radius gets smaller. The fact that the $C_R$ integral approaches $0$ follows from Theorem 9.2(a) in these notes. This is because we can take $f(z)=\frac{z e^{-inz^{-1}}}{z^2+1}$ in that theorem to get $F(z)=f(z)e^{iz}$. The modulus $$|e^{-inz^{-1}}|=|e^{-inR^{-1}(\cos\theta-i\sin\theta)}|=e^{-\frac{n}{R}\sin\theta}.$$ Note that $\sin\theta \geq 0$ in the upper half plane, so we can bound this modulus by $1$. So we get that $|f(z)|\leq |z|/|z^2+1|$ and moreover $z/(z^2+1)$ behaves like $1/z$ as $R$ increases, so the hypotheses of Theorem 9.2a are satisfied.

The integral around the arc near the origin limits to zero by elementary estimates, concluding the proof.