This is the integral I am trying to evaluate in mathematica:

Integrate[Exp[-p^2/(m w h)], {p, -Infinity, Sqrt[h m w]}]

Can someone show me how to get a numerical answer out of this?

  • $\begingroup$ Can you read what you posted? $\endgroup$ Oct 30, 2014 at 4:33
  • $\begingroup$ @belisarius I can if I copy and paste it into mathematica :D Is that not ok? $\endgroup$
    – Logan
    Oct 30, 2014 at 4:40
  • $\begingroup$ @belisarius I wasn't sure how to write some of the stuff in latex. I'll look it up and re-type it though. $\endgroup$
    – Logan
    Oct 30, 2014 at 4:47
  • $\begingroup$ Please, Oh Please! Until you master Mathematica: 1) don't use subscripts/superscripts and 2) Don't use Greek letters for posting here $\endgroup$ Oct 30, 2014 at 4:53
  • $\begingroup$ Start reading this and then all the answers to that question $\endgroup$ Oct 30, 2014 at 4:55

1 Answer 1


To get a numeric result you would need to assign numeric values to m, w, and h

int = Assuming[{Element[{m, w , h}, Reals], m w h > 0},
  Integrate[Exp[-p^2/(m w h)],
    {p, -Infinity, Sqrt[h m w]}] //

1/2 Sqrt[[Pi]] Sqrt[h m w] (1 + Erf[1])

For example,

int /. {m -> 1., w -> 2. , h -> 2.}


  • $\begingroup$ Thanks, that would make since. I was thinking the variables m and w would cancel out in the process because they are arbitrary in the problem I am working on but I figured it out. Thanks $\endgroup$
    – Logan
    Oct 30, 2014 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.