Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integrating exponential

  1. Feb 7, 2009 #1


    User Avatar


    I want to know how to intergrat e^(-(x^2)/2) . Someone told me to use the intergration of e^x= 1+ x + (x^2) /2!+ ....(X^n)/n! ..... is that sounds right?? and if it is i got pi as an answer for e^(-(x^2)/2) , is that the right answer???
  2. jcsd
  3. Feb 7, 2009 #2
    Re: intergrating exponential

    We know that [tex]\int{e^x}dx = e^x[/tex] so try to get it into that form. Substitute u = (-(x^2)/2) and get [tex]\int{e^u}du = e^u * du/dx[/tex]. Solving du/dx gives you -x. You should get an answer of -xe^((-x^2)/2) - I'm pretty sure, anyway.
  4. Feb 7, 2009 #3


    User Avatar
    Science Advisor

    e-x2 cannot be integrated (indefinite) analytically. If you expand it into a power series, you can get the power series of the integral. There is no closed form solution.
    The integral (-oo,x) (divided by sqrt(2pi)) is called erf(x).
    Last edited: Feb 7, 2009
  5. Feb 7, 2009 #4


    User Avatar

    Re: intergrating exponential

    I don't think you can intergrate it like that because you have x^2 and so when trying to use another variable du it will gives dx equals du*fraction of x and you can't solve for x then
  6. Feb 7, 2009 #5


    User Avatar

    I actually meant to intergrate from negative infinity to positive infinity.
  7. Feb 8, 2009 #6
    The answer is

    [tex]\int_{-\infty}^{\infty} e^{-x^2} \,dx = \sqrt{\pi}.[/tex]

    Here's a proof: Let

    [tex]I = \int_{-\infty}^{\infty} e^{-x^2} \,dx = \sqrt{\pi}.[/tex]

    Clearly [itex]I[/itex] is positive, so if we can show that [itex]I^2 = \pi[/tex] we are done:

    [tex]I^2 = \left(\int_{-\infty}^{\infty} e^{-x^2} \,dx \right) \left(\int_{-\infty}^{\infty} e^{-y^2} \,dy \right)
    = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} e^{-(x^2 + y^2)} \,dx \,dy.[/tex]

    Switching to polar coordinates [itex](r, \theta)[/itex], we have [itex]x^2 + y^2 = r^2[/itex] and [itex]dx\,dy = r\,dr\,d\theta[/itex]. Thus,

    [tex]I^2 = \int_{0}^{2\pi} \int_{0}^{\infty} r e^{-r^2} \,dr \,d\theta.[/tex]

    Substituting [itex]u = -r^2[/itex] so that [itex]r \,dr = -du/2[/itex] will give the result.
  8. Feb 8, 2009 #7


    User Avatar

    Thank you for clearing up the problem, I haven't learn how to do double intergral yet so is there any other way of doing it without using double intergral??

    also [tex]\int_{-\infty}^{\infty} e^{-x^2/2} \,dx = \sqrt{\pi/2}.[/tex] ....is this correct??? what i did i just use [tex]e^{-x^2}[/tex] and substitute [tex]-x^2/2[/tex] with [tex]-x^2[/tex] ....
    Last edited: Feb 8, 2009
  9. Feb 8, 2009 #8
    No, you should have
    [tex]\int_{-\infty}^{\infty} e^{-x^2/2} \,dx = \sqrt{2\pi}.[/tex]

    Unfortunately I don't know of any way to prove the Gaussian integral without using double integration.
  10. Feb 8, 2009 #9


    User Avatar
    Science Advisor

    If you look at adriank's method (which is the standard for this integral), you will see that it is simply a product of two integrals, both before and after the change of variables. The only tricky part is the change from rectangular to polar coordinates.
  11. Feb 8, 2009 #10


    User Avatar

    i found http://en.wikipedia.org/wiki/Gaussian_integral this online which helps....but I was just thinking if i was go have[tex]e^{x^2}[/tex] can i still use the double intergral?? or is there other way of doing it? (ie. using the theory property of exponential)
  12. Feb 8, 2009 #11
    If you have the positive exponent ex2, then the integral will diverge.
  13. Feb 8, 2009 #12


    User Avatar

    (\int_{-\infty}^{\infty}e^{-x^2}dx)^2=(\int_{-\infty}^{\infty}e^{-x^2}dx)\cdot (\int_{-\infty}^{\infty}e^{-y^2}dy)=

    (\int_{-\infty}^{\infty}e^{-(x^2+y^2)}dxdy)= \int_0^{2\pi}dw\int_0^\infty dr r e^{-r^2}=-\pi e^{-r^2}\vert^\infty_0=\pi

    THis is what i got....Also would [tex]e^x^2[/tex] be different if it is not from negative infinity to positive infinity. Could it intergral exists if i was to intergrat each term of [tex]e^x^2[/tex] ????
    Last edited: Feb 8, 2009
  14. Feb 8, 2009 #13


    User Avatar

    it would be diverge if i was to take from negative infinity or zero to positive infinity. What if i was to take the intergral for a small section. let say from 1 to 5. Would it still be diverge??
  15. Feb 9, 2009 #14
  16. Feb 9, 2009 #15
    The other way to look at this is to use the definition of the error function:
    Then split your integral into 2 sections: [tex]-\infty \rightarrow0 \mbox{ and }0 \rightarrow\infty\\[/tex]

    [tex]\int_{-\infty}^{\infty} e^{-x^2} \,dx=\int_{0}^{\infty} e^{-x^2} \,dx-\int_{0}^{-\infty} e^{-x^2} \,dx\\[/tex]


    [tex]\int_{a}^{b} f(x) \,dx=-\int_{b}^{a} f(x) \,dx\\[/tex].

    So your integral becomes

    [tex]\lim_{x\to\infty}\, (erf(x)-erf(-x))\frac{\sqrt{\pi}}{2}[/tex]

    which is [tex]\sqrt{\pi}[/tex] because [tex]\lim_{x\to\infty}\, erf(x) = 1 [/tex] and [tex]\lim_{x\to-\infty}\, erf(x) = -1 [/tex]
    Last edited: Feb 9, 2009
  17. Feb 9, 2009 #16


    User Avatar

    is this the only way of proving [tex]\int_{0}^{a} e^{x^2} \,dx[/tex]
  18. Feb 9, 2009 #17
    jacophile: But first you need to prove that [tex]\lim_{x\to\infty} \operatorname{erf}(x) = 1[/tex]!

    d_b: What about that integral are you trying to find?
  19. Feb 9, 2009 #18
    You already did that.
    My aim was to solve


    using the erf identity, not to prove it. Like I said in my post, just another way of looking at it.
    Last edited: Feb 10, 2009
  20. Feb 10, 2009 #19
    Actually, can someone help me to understand why using the following substitution is wrong?
    At least I am pretty sure it is...


    let [tex]y=z^{2}\;\rightarrow\; dy=2 z dz[/tex]

    [tex]\rightarrow\;z=\sqrt{y}\;\mbox{ }(\forall\,y\geq\;0)\mbox{ }\;\rightarrow\,dz= \frac{1}{2} y^{-\frac{1}{2}}\;dy[/tex]

    So that the integral becomes

    [tex]\frac{1}{2} \;\int_{0}^{x^{2}}\;e^{-y}\;y^{-\frac{1}{2}}\,dy[/tex]

    If it was ok to do this one could then integrate by parts using

    [tex]u=y^{-\frac{1}{2}}\;\rightarrow\;du=-\frac{1}{2} \;y^{-\frac{3}{2}}\;dy[/tex]


    and then build a power series (with increasingly -ve powers of y), by successive integration by parts, of the form


    Assuming you could show that the second term was zero...

    I'm just unsure about the first substitution.
    Last edited: Feb 10, 2009
  21. Feb 10, 2009 #20
    I didn't really check your work but how's that different than just rewriting

    [tex] e^{x^2} = \sum_{n=0}^{\infty} \frac{x^{2n}}{n!} [/tex]

    And then integrating it out.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook