Show that $$\int_\mathbb R \frac{dx}{(e^x-x+1)^2+\pi^2}=\frac12$$ I encountered this integral in Victor H. Moll's note "Seized Opportunities". He mentions it can be solved using "elementary methods". I did a few substitutions that didn't work, and after that I tried this:
Consider the Laplace transform $$\mathcal L\{e^{-at}\sin(bt)\}=\frac{b}{(s+a)^2+b^2}$$ Setting $s=e^x+1$, $a=-x$, $b=\pi$, we have $$\int_\mathbb R \frac{dx}{(e^x-x+1)^2+\pi^2}=\frac1\pi\int_\mathbb R \int_{\mathbb R_{\ge 0}} e^{-te^x-t+xt}\sin(\pi t)dtdx=\frac1{\pi} \int_{\mathbb R_{\ge0}}e^{-t}\sin(\pi t)\int_{\mathbb R}e^{tx}e^{-te^x}dxdt$$ After $u=e^x$ we have $$\frac{1}{\pi} \int_{\mathbb R}e^{-t}\sin(\pi t)\int_{\mathbb R_{\ge 0}}u^{t-1}e^{-tu}dudt=\frac{1}{\pi} \int_{\mathbb R}e^{-t}\sin(\pi t)\int_{\mathbb R_{\ge 0}}u^{t-1}e^{-tu}dudt=\frac{1}{\pi} \int_{\mathbb R}e^{-t}\sin(\pi t)\frac{\Gamma(t)}{t^t}dt$$ Note that this is due to the formula $$\mathcal{L}\{u^t\}(s)=\frac{n!}{s^{n+1}}$$ Here I used Euler's reflection formula $$\Gamma(z)\Gamma(1-z)=\frac{\pi}{\sin(\pi z)}$$ to get the form $$\int_{0}^{\infty}\frac{dt}{(et)^t\Gamma(1-t)}$$
This looks really complicated, though, and I don't think it helps.