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]

if x \in (a, b)

and

otherwise

And how I can to prove this