[Date Index]
[Thread Index]
[Author Index]
Re: regularize a function (proof function)
*To*: mathgroup at smc.vnet.net
*Subject*: [mg72476] Re: [mg72404] regularize a function (proof function)
*From*: "Josef Otta" <josef.otta at gmail.com>
*Date*: Sun, 31 Dec 2006 05:15:02 -0500 (EST)
Hi,
I tried to understand your problem and i think that i found approximate
solution for you.
a = -1; b = 1;
theta[x_] := (-x^2) + 1
f[x_] := If[x < b && x > a, theta[x], 0]
phi[epsilon_, x_] := If[x >=epsilon || x
<= (-epsilon), 0, Exp[(-epsilon^2)/((epsilon^2 - x^2))]]
(*This is Modified to numerical integration*)
g[epsilon_, x_] := (NIntegrate[phi[epsilon, Abs[x - y]] f[y], {y, -Infinity,
Infinity}])/(NIntegrate[phi[epsilon, Abs[y]] , {y, -Infinity,
Infinity}])
gPom[epsilon_?NumericQ, x_?NumericQ] := g[epsilon, x]
Plot[Evaluate[gPom[0.001, x]], {x, -2, 2}, PlotRange -> All]
I hope that the result satisfies your expectation.
With best regards,
Josef Otta
http://home.zcu.cz/~jotta
2006/12/25, Wiso <giurrerotipiacerebbe at hotmailtipiacerebbe.itipiacerebbe>:
>
> 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?
>
>
Prev by Date:
**NDSolve with a constraint : how ?**
Next by Date:
**Minimization with constraint expresses as CDF[] >=**
Previous by thread:
**Re: regularize a function (proof function)**
Next by thread:
**Re: nestled plotting**
| |