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?
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?
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