# How can I get numerical answers to integrals involving the error function?

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?

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

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]}] //
Simplify]


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

For example,

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


3.2661

• 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 Oct 30 '14 at 5:58