I came across this question: $$\int_0^\infty\frac{{\cos(x)}}{1+x^2}dx$$ I managed to solve and understand this question with the help of differential equations (Which was one of the solutions proposed). However, I had a doubt with the second method proposed in this solution.
In general \begin{align} \int_{x=0}^\infty e^{-(ax^2+bx)}\,dx&=\int_{x=0}^\infty \exp\left(-a\left(\left(x+\frac{b}{2a}\right)^2-\frac{b^2}{4a^2}\right)\right)\,dx\\ &=\exp\left(\frac{b^2}{4a}\right)\int_{x=0}^\infty \exp\left(-a\left(x+\frac{b}{2a}\right)^2\right)\,dx\\\end{align} Let $u=x+\frac{b}{2a}\;\rightarrow\;du=dx$, then \begin{align} \int_{x=0}^\infty e^{-(ax^2+bx)}\,dx&=\exp\left(\frac{b^2}{4a}\right)\int_{x=0}^\infty \exp\left(-a\left(x+\frac{b}{2a}\right)^2\right)\,dx\\ &=\exp\left(\frac{b^2}{4a}\right)\int_{u=0}^\infty e^{-au^2}\,du.\\ \end{align} The last form integral is the Gaussian integralthat equals to $\dfrac{1}{2}\sqrt{\dfrac{\pi}{a}}$ $$\int_{x=0}^\infty e^{-(ax^2+bx)}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}\exp\left(\frac{b^2}{4a}\right)$$
Clearly, they made the substitution $u=x+\frac{b}{2a}$, then the integral should become: $$\exp(\frac{b^2}{4a})\int_\frac{b}{2a}^\infty{e^{-au^2}}dx$$ Then how did it reduce to $$\exp(\frac{b^2}{4a})\int_0^\infty{e^{-au^2}}dx$$ Is this is a mistake or is there a proof for their equality which is not mentioned here? I believe so as the answer has a lot of upvotes. Assuming that this was a mistake, how did the user arrive at the right solution (which I presume to be $\frac{\pi}{2e}$) with the wrong method?