Results 1 to 8 of 8

Math Help - Help evaluating an integral

  1. #1
    Junior Member
    Joined
    Oct 2008
    Posts
    62

    Help evaluating an integral

    I want to integrate:
    p^2

    Are there any shortcuts I can use?
    Last edited by bluebiro; August 28th 2009 at 05:10 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Bruno J.'s Avatar
    Joined
    Jun 2009
    From
    Canada
    Posts
    1,266
    Thanks
    1
    Awards
    1
    Is that

    \int_0^\infty \frac{2}{\lambda}x^2e^\frac{-x^2}{\lambda}\: dx ?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Chicago, IL
    Posts
    2,844
    Thanks
    3
    Quote Originally Posted by Bruno J. View Post
    Is that

    \int_0^\infty \frac{2}{\lambda}x^2e^\frac{-x^2}{\lambda}\: dx ?
    If that is the integral, we know that the variance of \mathcal{N}\left(0,\sigma^2\right)\sim\mathcal{N}\  left(0,\tfrac{\lambda}{2}\right) is defined to be \frac{1}{\sqrt{\lambda\pi}}\int_{-\infty}^{\infty}x^2e^{-x^2/\lambda}\,dx=\frac{\lambda}{2}

    So \frac{2}{\lambda}\int_0^{\infty}x^2e^{-x^2/\lambda}\,dx=\frac{1}{\lambda}\int_{-\infty}^{\infty}x^2e^{-x^2/\lambda}\,dx =\frac{\sqrt{\lambda\pi}}{\lambda}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\lambda\pi}}x^2e^{-x^2/\lambda}\,dx=\frac{\sqrt{\lambda\pi}}{\lambda}\cdo  t\frac{\lambda}{2}=\frac{\sqrt{\lambda\pi}}{2}



    EDIT: Here's another way. (Probably the way that most people would take...when I saw it originally, I thought Variance of the Normal Distribution... )


    Let u=\frac{1}{\lambda}x^2. Then \,du=\frac{2x}{\lambda}\,dx

    So \frac{2}{\lambda}\int_0^{\infty}x^2e^{-x^2/\lambda}\,dx\xrightarrow{u=x^2/\lambda}{}\int_0^{\infty}\sqrt{\lambda u}e^{-u}\,du =\sqrt{\lambda}\int_0^{\infty}u^{\frac{1}{2}}e^{-u}\,du=\sqrt{\lambda}\Gamma\left(\tfrac{3}{2}\righ  t)=\sqrt{\lambda}\left(\tfrac{1}{2}\Gamma\left(\tf  rac{1}{2}\right)\right)=\sqrt{\lambda}\left(\frac{  \sqrt{\pi}}{2}\right)=\frac{\sqrt{\lambda\pi}}{2}

    (Aside)

    Spoiler:
    To show that \Gamma\left(\tfrac{1}{2}\right)=\sqrt{\pi}, note that \Gamma\left(\tfrac{1}{2}\right)=\int_0^{\infty}e^{-t}t^{-\frac{1}{2}}\,dt.

    Let t=u^2\implies \,dt=2u\,du.

    Thus, \int_0^{\infty}e^{-t}t^{-\frac{1}{2}}\,dt\xrightarrow{t=u^2}{}\int_0^{\inft  y}e^{-u^2}u^{-1}\left(2u\right)\,du=2\int_0^{\infty}e^{-u^2}\,du=2\left(\frac{\sqrt{\pi}}{2}\right)=\sqrt{  \pi}.


    Spoiler:
    To show that \int_0^{\infty}e^{-ax^2}=\frac{1}{2}\sqrt{\frac{\pi}{a}}, suppose that I=\int_0^{\infty}e^{-ax^2}\,dx=\int_0^{\infty}e^{-ay^2}\,dy.

    Thus, I^2=\left(\int_0^{\infty}e^{-ax^2}\,dx\right)\left(\int_0^{\infty}e^{-ay^2}\,dy\right)=\int_0^{\infty}\int_0^{\infty}e^{-a\left(x^2+y^2\right)}\,dx\,dy.

    Now convert to polar to get \int_0^{\infty}\int_0^{\infty}e^{-a\left(x^2+y^2\right)}\,dx\,dy=\int_0^{\frac{\pi}{  2}}\int_0^{\infty}e^{-ar^2}r\,dr\,d\theta.

    Now from here, let u=ar^2\implies \,du=2ar\,dr

    So \int_0^{\frac{\pi}{2}}\int_0^{\infty}e^{-ar^2}r\,dr\,d\theta\xrightarrow{u=ar^2}\frac{1}{2a  }\int_0^{\frac{\pi}{2}}\int_0^{\infty}e^{-u}\,du\,d\theta=\frac{1}{2a}\int_0^{\frac{\pi}{2}}  \lim_{b\to\infty}\left.\left[-e^{-u}\right]\right|_0^b\,d\theta =\frac{1}{2a}\int_0^{\frac{\pi}{2}}\,d\theta=\frac  {\pi}{4a}.

    Since I^2=\frac{\pi}{4a}, it follows that I=\int_0^{\infty}e^{-ax^2}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}.
    Last edited by Chris L T521; August 16th 2009 at 04:39 PM. Reason: added another way to do the integration
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Oct 2008
    Posts
    62
    Quote Originally Posted by Chris L T521 View Post
    If that is the integral, we know that the variance of \mathcal{N}\left(0,\sigma^2\right)\sim\mathcal{N}\  left(0,\tfrac{\lambda}{2}\right) is defined to be \frac{1}{\sqrt{\lambda\pi}}\int_{-\infty}^{\infty}x^2e^{-x^2/\lambda}\,dx=\frac{\lambda}{2}

    So \frac{2}{\lambda}\int_0^{\infty}x^2e^{-x^2/\lambda}\,dx=\frac{1}{\lambda}\int_{-\infty}^{\infty}x^2e^{-x^2/\lambda}\,dx =\frac{\sqrt{\lambda\pi}}{\lambda}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\lambda\pi}}x^2e^{-x^2/\lambda}\,dx=\frac{\sqrt{\lambda\pi}}{\lambda}\cdo  t\frac{\lambda}{2}=\frac{\sqrt{\lambda\pi}}{2}



    EDIT: Here's another way. (Probably the way that most people would take...when I saw it originally, I thought Variance of the Normal Distribution... )


    Let u=\frac{1}{\lambda}x^2. Then \,du=\frac{2x}{\lambda}\,dx

    So \frac{2}{\lambda}\int_0^{\infty}x^2e^{-x^2/\lambda}\,dx\xrightarrow{u=x^2/\lambda}{}\int_0^{\infty}\sqrt{\lambda u}e^{-u}\,du =\sqrt{\lambda}\int_0^{\infty}u^{\frac{1}{2}}e^{-u}\,du=\sqrt{\lambda}\Gamma\left(\tfrac{3}{2}\righ  t)=\sqrt{\lambda}\left(\tfrac{1}{2}\Gamma\left(\tf  rac{1}{2}\right)\right)=\sqrt{\lambda}\left(\frac{  \sqrt{\pi}}{2}\right)=\frac{\sqrt{\lambda\pi}}{2}

    (Aside)

    Spoiler:
    To show that \Gamma\left(\tfrac{1}{2}\right)=\sqrt{\pi}, note that \Gamma\left(\tfrac{1}{2}\right)=\int_0^{\infty}e^{-t}t^{-\frac{1}{2}}\,dt.

    Let t=u^2\implies \,dt=2u\,du.

    Thus, \int_0^{\infty}e^{-t}t^{-\frac{1}{2}}\,dt\xrightarrow{t=u^2}{}\int_0^{\inft  y}e^{-u^2}u^{-1}\left(2u\right)\,du=2\int_0^{\infty}e^{-u^2}\,du=2\left(\frac{\sqrt{\pi}}{2}\right)=\sqrt{  \pi}.


    Spoiler:
    To show that \int_0^{\infty}e^{-ax^2}=\frac{1}{2}\sqrt{\frac{\pi}{a}}, suppose that I=\int_0^{\infty}e^{-ax^2}\,dx=\int_0^{\infty}e^{-ay^2}\,dy.

    Thus, I^2=\left(\int_0^{\infty}e^{-ax^2}\,dx\right)\left(\int_0^{\infty}e^{-ay^2}\,dy\right)=\int_0^{\infty}\int_0^{\infty}e^{-a\left(x^2+y^2\right)}\,dx\,dy.

    Now convert to polar to get \int_0^{\infty}\int_0^{\infty}e^{-a\left(x^2+y^2\right)}\,dx\,dy=\int_0^{\frac{\pi}{  2}}\int_0^{\infty}e^{-ar^2}r\,dr\,d\theta.

    Now from here, let u=ar^2\implies \,du=2ar\,dr

    So \int_0^{\frac{\pi}{2}}\int_0^{\infty}e^{-ar^2}r\,dr\,d\theta\xrightarrow{u=ar^2}\frac{1}{2a  }\int_0^{\frac{\pi}{2}}\int_0^{\infty}e^{-u}\,du\,d\theta=\frac{1}{2a}\int_0^{\frac{\pi}{2}}  \lim_{b\to\infty}\left.\left[-e^{-u}\right]\right|_0^b\,d\theta =\frac{1}{2a}\int_0^{\frac{\pi}{2}}\,d\theta=\frac  {\pi}{4a}.

    Since I^2=\frac{\pi}{4a}, it follows that I=\int_0^{\infty}e^{-ax^2}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}.
    Thank you so much. The variance method is so clever, saves a lot of time!
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Oct 2008
    Posts
    62
    Also, how could you tell what the variance was? Could you explain to me how I'd be able to tell the variance of this?

    \int_0^\infty \frac{2}{\lambda}xe^\frac{-x^2}{\lambda}\: dx

    thank you
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Moo
    Moo is offline
    A Cute Angle Moo's Avatar
    Joined
    Mar 2008
    From
    P(I'm here)=1/3, P(I'm there)=t+1/3
    Posts
    5,618
    Thanks
    6
    Quote Originally Posted by bluebiro View Post
    Also, how could you tell what the variance was? Could you explain to me how I'd be able to tell the variance of this?

    \int_0^\infty \frac{2}{\lambda}xe^\frac{-x^2}{\lambda}\: dx

    thank you
    The pdf of \mathcal{N}(0,\sigma^2), where \sigma^2 is the variance, is :

    \frac{1}{\sigma\sqrt{2\pi}} \cdot\exp\left(-\frac{x^2}{2\sigma^2}\right)

    Now, you can see that this looks like e^{-\frac{x^2}{\lambda}} (if we let \sigma^2=\frac \lambda 2)

    Then, we have an integral in the form \int_{-\infty}^\infty x^2 f(x) ~dx

    which is \mathbb{E}(X^2), where X has the pdf f.

    And since its expectation is 0, it corresponds to the variance \text{Var}(X)=\mathbb{E}(X^2)-(\mathbb{E} X)^2=\mathbb{E}(X^2)


    the one you've just put is more like an expectation than a variance, because it's x, not x.


    when I saw it originally, I thought Variance of the Normal Distribution...
    That's normal I bet he took it from a probability problem.
    Given his previous threads
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Oct 2008
    Posts
    62
    Quote Originally Posted by Moo View Post
    The pdf of \mathcal{N}(0,\sigma^2), where \sigma^2 is the variance, is :

    \frac{1}{\sigma\sqrt{2\pi}} \cdot\exp\left(-\frac{x^2}{2\sigma^2}\right)

    Now, you can see that this looks like e^{-\frac{x^2}{\lambda}} (if we let \sigma^2=\frac \lambda 2)

    Then, we have an integral in the form \int_{-\infty}^\infty x^2 f(x) ~dx

    which is \mathbb{E}(X^2), where X has the pdf f.

    And since its expectation is 0, it corresponds to the variance \text{Var}(X)=\mathbb{E}(X^2)-(\mathbb{E} X)^2=\mathbb{E}(X^2)


    the one you've just put is more like an expectation than a variance, because it's x, not x.



    That's normal I bet he took it from a probability problem.
    Given his previous threads
    thanks I did get it from a stats problem

    I got the integral as lambda, and therefore the variance would be lambda?

    Something I don't understand though is why E(X) = 0, and not the integral of x.f(x)?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Chicago, IL
    Posts
    2,844
    Thanks
    3
    Quote Originally Posted by bluebiro View Post
    thanks I did get it from a stats problem

    I got the integral as lambda, and therefore the variance would be lambda?

    Something I don't understand though is why E(X) = 0, and not the integral of x.f(x)?
    They're both the same. Since the distribution for X is \mathcal{N}\left({\color{red}0},\tfrac{\lambda}{2}  \right), we know its pdf is of the form f\left(x\right)=\frac{1}{\sqrt{\lambda\pi}}e^{-x^2/\lambda}. Now, it follows that E\left(X\right)=\frac{1}{\sqrt{\lambda\pi}}\int_{-\infty}^{\infty}xe^{-x^2/\lambda}\,dx=\mu={\color{red}0}, since \mu was known when we defined the distribution.

    So \frac{2}{\lambda}\int_0^{\infty}xe^{-x^2/\lambda}\,dx=\frac{\sqrt{\lambda\pi}}{\lambda}\int  _{-\infty}^{\infty}\frac{1}{\sqrt{\lambda\pi}}xe^{-x^2/\lambda}\,dx=\frac{\sqrt{\lambda\pi}}{\lambda}\cdo  t{\color{red}0}={\color{red}0}
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Evaluating an integral
    Posted in the Calculus Forum
    Replies: 2
    Last Post: May 18th 2011, 12:55 AM
  2. Evaluating an Integral
    Posted in the Calculus Forum
    Replies: 11
    Last Post: February 26th 2011, 08:07 AM
  3. evaluating the integral - and there is an e
    Posted in the Calculus Forum
    Replies: 1
    Last Post: October 18th 2009, 12:23 PM
  4. Evaluating this integral
    Posted in the Calculus Forum
    Replies: 2
    Last Post: February 9th 2009, 05:42 PM
  5. Replies: 6
    Last Post: May 18th 2008, 06:37 AM

Search Tags


/mathhelpforum @mathhelpforum