Re: a couple of gripes

• To: mathgroup at smc.vnet.net
• Subject: [mg29772] Re: [mg29751] a couple of gripes
• From: "Mark Harder" <harderm at ucs.orst.edu>
• Date: Sun, 8 Jul 2001 01:00:16 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Joshua,
In response to:
>When I evaluate
>Integrate[f[x]*If[x==y,1,0],{x,-Infinity,Infinity}]
>I don't get
>f[y].

That's because Mathematica doesn't recognize that your If[] is equivalent to
DiracDelta[x-y].  In general (see numerous postings in the MathGroup
archive), one should use the Generalized Function construction equivalent to
the "black box" If[] function. Observe:

In[967]:=Clear[f]
Integrate[f[x]*DiracDelta[x - y ], {x, -Infinity, Infinity}]
Out[968]= f[y]

and re:
>When I evaluate
>PDF[NormalDistribution[x,0],x]
>I don't get
>1.
I believe this is an incorrect expectation as follows:

In[974]:= Limit[PDF[NormalDistribution[mu, a], x], a -> 0]
Out[974]= Indeterminate

The NormalDistribution is not defined for sigma<=0, and in the limit
sigma->Infinity, I think the PDF of the NormalDistribution at x=mu goes
infinite.

However, the *area* under the PDF over its infinite domain is 1:
In[988]:=Simplify[Integrate[PDF[NormalDistribution[mu, a], x],
{x, -Infinity,
Infinity}], {a \[Element] Reals, a > 0 }]
Out[988]=1
For an example of this behavior, see 3.5.12 in The MathematicaBook,
concerning Generalized Functions.

-mark harder

-----Original Message-----
From: Joshua A. Solomon <J.A.Solomon at city.ac.uk>
To: mathgroup at smc.vnet.net
Subject: [mg29772] [mg29751] a couple of gripes

>When I evaluate
>Integrate[f[x]*If[x==y,1,0],{x,-Infinity,Infinity}]
>I don't get
>f[y].
>
>When I evaluate
>PDF[NormalDistribution[x,0],x]
>I don't get
>1.
>
>js
>--
>Joshua A. Solomon
>Department of Optometry and Visual Science
>City University
>London EC1V 0HB
>Voice: (44) 20 7040 0192
>Secretary/Fax: (44) 20 7040 0182
>J.A.Solomon at city.ac.uk
>http://www.staff.city.ac.uk/~solomon
>
>

```

• Prev by Date: RE: Rotating tick marks
• Next by Date: Re: Mathematica generating gifs for avi's
• Previous by thread: Re: a couple of gripes
• Next by thread: Opening Directory