I am calculating the Shannon entropy and stuck on this integral

103 Views Asked by At

I am calculating the Shannon entropy of $\left|\Psi_{+}\left(x_{+}\right)\right|^{2}=\frac{1}{\sigma^{3}_{+}\sqrt{2\pi}}x^{2}_{+}\exp\left\{-\frac{x^{2}_{+}}{2\sigma^{2}_{+}}\right\}$, which is given by $$ H=-\int\left|\Psi_{+}\left(x_{+}\right)\right|^{2}\ln\left|\Psi_{+}\left(x_{+}\right)\right|^{2}dx. $$ I am stuck on that. This is how I tried,

$ H=-\int Nx^{2}e^{-ax^{2}}\ln\left[Nx^{2}e^{-ax^{2}}\right]dx\quad,\textrm{ where }N\equiv\frac{1}{\sigma^{3}_{+}\sqrt{2\pi}}x^{2}_{+},a\equiv\frac{1}{2\sigma^{2}_{+}},x\equiv x_{+}\\ =-N\int x^{2}e^{-ax^{2}}\left[\ln N+\ln x^{2}+\ln e^{-ax^{2}}\right]dx\\ =-N\ln N\int x^{2}e^{-ax^{2}}dx-N\int x^{2}\ln x^{2}e^{-ax^{2}}dx+Na\int x^{4}e^{-ax^{2}}dx $

I have no clue to calculate the second term, $N\int x^{2}\ln x^{2}e^{-ax^{2}}dx$.

Please help me to solve the second term.

P.S. The answer of entropy $H$ is related to the Euler's constant. But this is the furthest I know.

1

There are 1 best solutions below

0
On

If you just need the answer, Mathematica gives \begin{equation} \int_{-\infty}^\infty x^2\log(x^2)\exp(-ax^2)\;dx = -\frac{\sqrt{\pi}}{2 a^{3/2}}\left(\log(a)+\log(4)-2+\gamma\right), \;\; \text{Re}(a) > 0 \end{equation} the antiderivative contained some large hypergeometric functions so it might be tricky to do it without a CAS.