What's wrong in this expansion of this erfc-like function?

50 Views Asked by At

Given the function $$H(x)=\int_{-x}^{+\infty}dy \frac{e^{-y^2/2}}{\sqrt{2\pi}}$$, I would like to write it as a series expansion employing integration by parts: $$\int_{-x}^{+\infty}dy \frac{e^{-y^2/2}}{\sqrt{2\pi}}=y\frac{e^{-y^2/2}}{\sqrt{2\pi}}\vert_{-x}^{+\infty}+\int_{-x}^{+\infty}dy y^2 \frac{e^{-y^2/2}}{\sqrt{2\pi}}=\frac{e^{-x^2/2}}{\sqrt{2\pi}}\left(x+\frac{x^3}{3}+...+\frac{x^{2k+1}}{(2k+1)!!}+...\right)$$. The problem is evident: in $x=0$ the expansion doesn't seem to be equal to $1/2$ as it should. What am I doing wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

firstly you did integration by parts correctly (which was useless here) but you cant use series because of infinity.

So you need just to use partition of an interval $$ H(x)=\int_{-x}^{\infty} \frac{e{-\frac{y^2}{2}}}{\sqrt{2\pi}}dy=\int_{0}^{\infty} \frac{e^{-\frac{y^2}{2}}}{\sqrt{2\pi}}dy+\int_{-x}^{0} \frac{e^{-\frac{y^2}{2}}}{\sqrt{2\pi}}dy$$ then for the first integral its Gaussian integral which give us $$ \int_{0}^{\infty} \frac{e^{-\frac{y^2}{2}}}{\sqrt{2\pi}}dy=\frac{1}{2}$$ also for the second $$\int_{-x}^{0} \frac{e^{-\frac{y^2}{2}}}{\sqrt{2\pi}}dy=\int_{-x}^{0} \frac{1}{\sqrt{2\pi}}\sum_{n=0}^\infty \frac{1}{n!}\left(\frac{-y^2}{2}\right)^ndy=\frac{1}{\sqrt{2\pi}} \sum_{n=0}^\infty \frac{-(-x)^{2n+1}}{n!(2n+1)}\left(\frac{-1}{2}\right)^n$$ using the series form for the error function and get $$ H(x)=\frac{1}{2}+\frac{1}{2}\frac{2}{\sqrt{\pi}}\sum_{n=0}^\infty \frac{(-1)^n}{n!(2n+1)}\left(\frac{x}{\sqrt{2}}\right)^{2n+1}$$ finally $$ H(x)=\frac{1}{2} \left( \text{erf} \left(\frac{x}{\sqrt{2}}\right)+1 \right) $$