0

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?

Logan
  • 517
  • 1
  • 6
  • 15

1 Answers1

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

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

For example,

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

3.2661

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
  • 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 – Logan Oct 30 '14 at 05:58