2
$\begingroup$

I am trying to find $\sigma=\displaystyle\sqrt{\int _{-\infty \:}^{\infty \:}x^2e^{-\frac{x^2}{w}}dx}$ for the function $f(x)=e^{-\frac{x^2}{w}}$. I have tried tabular integration by parts, but it quickly got messy and I stopped after the second integration $\sqrt{w}\frac{\sqrt{\pi }}{2}\text{erf}\left(\frac{x}{\sqrt{w}}\right)$. From some quick research no elementary function exists for the indefinite integral. So how would I find the definite integral in this case? I would be grateful for any help.

$\endgroup$
2
$\begingroup$

Starting with $\displaystyle \int_{-\infty}^{\infty}e^{- x^2}\,\mathrm{dx} = \sqrt{\pi}$, let $x \mapsto \sqrt{\lambda} x$ then $\displaystyle \int_{-\infty}^{\infty}e^{-\lambda x^2}\,\mathrm{dx} = \frac{\sqrt{\pi}}{\sqrt{\lambda}}$

Define $\displaystyle $ $\displaystyle f(\lambda) := \int_{-\infty}^{\infty}e^{-\lambda x^2}\,\mathrm{dx} = \frac{\sqrt{\pi}}{\sqrt{\lambda}} $ then $\displaystyle f'(\lambda)=-\int_{-\infty}^{\infty}x^2 e^{-\lambda x^2}\,\mathrm{dx} = -\frac{\sqrt{\pi}}{2\lambda^{3/2}} $

so that $$\int_{-\infty}^{\infty}x^2 e^{-\frac{1}{w} x^2}\,\mathrm{dx} = \frac{1}{2}w^{3/2}\sqrt{\pi}.$$

$\endgroup$
5
  • 1
    $\begingroup$ Thank you that works with the standard deviation for my model. $\endgroup$
    – user809100
    Jul 18 '20 at 6:38
  • $\begingroup$ Quick question, if you have a moment, I'm not really following the notation and why is it a function of $\lambda$? $\endgroup$
    – user809100
    Jul 18 '20 at 6:51
  • 1
    $\begingroup$ We introduce the $\lambda$-parameter so that we can differentiate under the integral sign; after we define $f(\lambda)$ both sides are functions of $\lambda$ and we differentiate both sides with respect to $\lambda$. $\endgroup$
    – Zach N
    Jul 18 '20 at 6:57
  • 1
    $\begingroup$ Oh, so similar to Feynman's method. Get it now, thanks. $\endgroup$
    – user809100
    Jul 18 '20 at 7:00
  • $\begingroup$ It's indeed the Feyman technique. I should say the notation $x \mapsto \sqrt{\lambda} x$ is the same as subbing $x = \sqrt{\lambda} t$ in case it causes confusion. $\endgroup$
    – Zach N
    Jul 18 '20 at 7:44
0
$\begingroup$

Hint: Try integration by parts with $u = x(-\frac{w}{2})$ and $v = e^{-\frac{x^2}{w}}$. Then use that $\int_{-\infty}^\infty e^{-\frac{x^2}{w}}dx = \sqrt{2\pi w}$.

$\endgroup$
3
  • $\begingroup$ For integration by parts doesn't $\int \:udv=uv-\int \:vdu$. So wouldn't, $e^{-\frac{x^2}{w}}=dv$ instead of $v$. Then two integration would be required. I'm probably missing something. $\endgroup$
    – user809100
    Jul 18 '20 at 6:27
  • $\begingroup$ Close, $dv = -\frac{2x}{w}e^{-\frac{x^2}{w}}$. Also I forgot a scaling term and have made the edit for $u$. $\endgroup$ Jul 18 '20 at 6:29
  • $\begingroup$ Thanks for the pointers: I'm working though it now. $\endgroup$
    – user809100
    Jul 18 '20 at 6:39

Your Answer

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