Hi, I am not mathematician. (I am computer science)

I need your help to construct a compact support gaussian function

It is ok for an interval [a, b]?

[tex]f(x) = \exp(-0.5\frac{(x-\mu)^2}{\sigma^2})[x/tex]

$\displaystyle f(x) = \exp(-0.5\frac{(x-\mu)^2}{\sigma^2})$

if x \in (a, b)

and

$\displaystyle f(x) = 0$ otherwise

And how I can to prove this