regularize a function (proof function)

*To*: mathgroup at smc.vnet.net*Subject*: [mg72404] regularize a function (proof function)*From*: Wiso <giurrerotipiacerebbe at hotmailtipiacerebbe.itipiacerebbe>*Date*: Mon, 25 Dec 2006 04:52:45 -0500 (EST)

I want to regularize a function, I want that it is C^inf and with compact support (proof function for distributions). I start with: a = -1; b = 1; theta[x_] := (-x^2) + 1 f[x_] := If[x < b && x > a, theta[x], 0] Plot[f[x], {x, -2, 2}]; Now f[x] is with compact support, but it's not C^inf. I do: phi[epsilon_, x_] := If[x >=epsilon || x <= (-epsilon), 0, Exp[(-epsilon^2)/((epsilon^2 - x^2))]]) Plot[phi[1,x],{x,-1,1}]; this is a proof function. I define g[epsilon_, x_] := (Int[phi[epsilon, Abs[x - y]] f[y] {y,-inf,inf}]) / (Int[phi[epsilon, Abs[y]] {y,-inf,inf}]) Now I want to see it: Plot[g[1,x],{x,-2,2}] It has a loss of precision, how can I solve it?