I was attempting to answer this question, but then I came across a question of my own involving my attempt.

Task: Prove $$\int_0^\infty\frac{\exp(-x^2)}{1+x^2}\mathrm dx=\frac{\pi e}2\text{erfc}(1)$$ Attempt: $$I=\int_0^{\infty}\frac{\exp(-x^2)}{1+x^2}\mathrm dx$$ We then use the Taylor series for the exponential function to find that $$I=\sum_{n\geq0}\frac{(-1)^n}{n!}\int_0^\infty\frac{x^{2n}}{1+x^2}\mathrm dx$$ Setting $x=\tan u$, $$I=\sum_{n\geq0}\frac{(-1)^n}{n!}\int_0^{\pi/2}\tan(u)^{2n}\mathrm{d}u$$ $$I=\sum_{n\geq0}\frac{(-1)^n}{n!}\int_0^{\pi/2}\sin(u)^{2n}\cos(u)^{-2n}\mathrm{d}u$$ And using $$\int_0^{\pi/2}\sin(t)^a\cos(t)^b\mathrm{d}t=\frac{\Gamma(\frac{a+1}{2})\Gamma(\frac{b+1}{2})}{2\Gamma(\frac{a+b}{2}+1)}$$ We have $$I=\frac12\sum_{n\geq0}\frac{(-1)^n}{n!}\Gamma\bigg(\frac{1+2n}{2}\bigg)\Gamma\bigg(\frac{1-2n}{2}\bigg)$$ $$I=\frac12\sum_{n\geq0}\frac{(-1)^n}{n!}\Gamma\bigg(\frac12+n\bigg)\Gamma\bigg(\frac12-n\bigg)$$ Recall the Gamma reflection formula: $$\Gamma(s)\Gamma(1-s)=\pi\csc\pi s\ ,\qquad s\not\in\Bbb Z$$ Since $n\in\Bbb N_0$, we have $\frac12+n\not\in\Bbb Z$, which means we may plug in $s=\frac12+n$: $$I=\frac12\sum_{n\geq0}\frac{(-1)^n}{n!}\pi\csc\bigg(\frac\pi2+\pi n\bigg)$$ $$I=\frac\pi2\sum_{n\geq0}\frac{(-1)^n}{n!}\csc\bigg(\frac\pi2(2n+1)\bigg)$$ Then we recall that $$\sin\bigg(\frac\pi2(2n+1)\bigg)=(-1)^n,\qquad n\in\Bbb Z$$ So we have $$I=\frac\pi2\sum_{n\geq0}\frac{(-1)^n}{n!}\frac1{(-1)^n}$$ $$I=\frac\pi2\sum_{n\geq0}\frac1{n!}$$ $$I=\frac{\pi e}2$$

But $$\frac{\pi e}2\neq \frac{\pi e}2\text{erfc}(1)$$ What did I do wrong? Thanks.


I see that $$\int_{\Bbb R^+}\frac{x^{2n}}{1+x^2}\mathrm dx$$ diverges, and as was pointed out in the comments, I can't interchange the $\sum$ and $\int$, but why? The Taylor series converges for all $x\in\Bbb R_0^+$, so what's wrong with the swappage?

  • 2
    $\begingroup$ you can't interchange the sum for the Taylor series with the integral. you secretly know that such an interchange cannot be justified, since $\int_0^\infty \frac{x^{2n}}{1+x^2}dx $ diverges $\endgroup$ – mathworker21 Dec 16 '18 at 22:29
  • $\begingroup$ @mathworker21 see the edit I just made $\endgroup$ – clathratus Dec 16 '18 at 22:31
  • 3
    $\begingroup$ so the technical reason as to why you cannot interchange the taylor series and the integral even though the taylor series converges pointwise, is that the taylor series does not converge uniformly. There are various conditions that say when you can make such "swappages", but conceptually, the reason is that the Taylor series oscillates so much that we need to let it cancel itself out before we integrate it (btw, the swappage is valid if everything involved is non-negative). Admittedly, I find it pretty hard to think about conceptually $\endgroup$ – mathworker21 Dec 16 '18 at 22:36
  • 1
    $\begingroup$ it's fine. but I am curious what goes wrong when you calculate the integral, since you do end up with a finite number $\endgroup$ – mathworker21 Dec 16 '18 at 22:44
  • 3
    $\begingroup$ @mathworker21 $$B(x,y):=2\int_0^{\pi/2}\sin^{2x-1}t\cos^{2y-1}t~\mathrm dt=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$ is true only if $\Re x>0$ and $\Re y >0$. $\endgroup$ – Tianlalu Dec 16 '18 at 22:51

the integral $\int_{R_+}dx x^{2n}/(1+x^2)$heavily diverges, so your first step is already completly wrong (Taylor of $\exp$ is useless here, you can't interchange Summation and Integration as pointed out in the comments)!

Usually this integral is solved by Feynman's trick...

  • 1
    $\begingroup$ that's not the direct reason $\endgroup$ – mathworker21 Dec 16 '18 at 22:29
  • $\begingroup$ what else?????? $\endgroup$ – gdsadas Dec 16 '18 at 22:30
  • $\begingroup$ I was just trying to emphasize the point that it's not directly because the integral diverges. It's the fact that you are not allowed to interchange the sum and the integral $\endgroup$ – mathworker21 Dec 16 '18 at 22:30
  • $\begingroup$ you are Right! :) $\endgroup$ – gdsadas Dec 16 '18 at 22:32
  • $\begingroup$ I know how to solve the integral, I was just trying to find another way involving series $\endgroup$ – clathratus Dec 16 '18 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.