DiracDelta



BTW In case there is any confusion.  The functions f[i](x) are not 
approximates of diracdelta() they are approximates of the ith derivative of 
diracdelta().  f[0](x) is diracdelta().

Sorry if that confused anyone.  I am not just trying to solve 
integrate(pwdelta(x-a)*f(x),x) but also integrate(diff_pwdelta(i,x-a) 
*f(x),x).

Rich

-----Original Message----- 
From: Richard Hennessy
Sent: Monday, April 15, 2013 12:16 PM
To: Rupert Swarbrick ; maxima at math.utexas.edu
Subject: Re: [Maxima] DiracDelta

"I'm a little bit confused. Why are you using approximants to delta at
all? I haven't looked at your pw.mac code, but presumably you have some
rule that transforms
  integrate(delta(x)*phi(x), x, a, b)
to something like
  if is (a < 0 and b > 0) then <some expression with limits> else 0"

No, the situation is more complicated than that, it basically does
substitution

expr : subst(1, delta(x), expr)

and then if expr is free of delta() you get

z : expr * (signum(x) + 1) / 2.

Then

answer : at(z, [x=b])-at(z, [x=a]).

The purpose is to use the approximates to verify that I am using the right
formulas, once the right formulas are found and other conditions are
satisfied then I can use the formula.  I could assume phi(x) can be any
function but by way of approximates it is possible to show my answer is
wrong for phi(x) = unit_step(x).

"As far as I understand it, the whole point of these "idealised functions"
(ie distributions) is to avoid the icky business of computing with the
approximants in the first place."

I agree, but I got it wrong, I was assuming integrate(pwdelta(x) *
f(x),x,minf, inf) = f(0) which is not true for phi(x) = unit_step(x).  I now
need to test each case for continuity at 0.  Hence, I think I have to use
continuousp() for each case.

"Yes, definitely. For example, take the approximants

dd (x, t, a) =     { a*t        when x ? [-1/t, 0]
                         { (1-a)*t    when x ? [0, 1/t]
                         { 0          otherwise"

This is a good approximate, it is not an even function.

(%i30) display2d:false;
(out30) false
(%i31) if x >= -1/t and x < 0 then a*t else (if x >= 0 and x < 1/t then
(1-a)*t else 0);

(out31) if x >= -1/t and x < 0 then a*t else (if x >= 0 and x < 1/t then
(1-a)*t else 0)
(%i32) ddelta(x,t,a):=''(ifthen2sum(%));

(out32)
ddelta(x,t,a):=a*t*between(x,-1/t,0,lclosed)+(1-a)*t*between(x,0,1/t,lclosed)*(1-between(x,-1/t,0,lclosed))
(%i33) pwlimit(pwint(ddelta(x,t,a),x,minf,inf),t,inf);

(out33) 1
(%i34) pwlimit(pwint(ddelta(x,t,a)*unit_step(x),x,minf,inf),t,inf);

(out34) 1-a
(%i35) pwlimit(pwint(ddelta(x,t,a)*signum(x),x,minf,inf),t,inf);

(out35) 1-2*a

If I tested signum(x) and unit_step(x) for continuity an 0 then I would know
to just return the noun form of pwint.  Instead I get an incorrect result.

Remember the purpose of this exercise for me is to get the right conditions
under which my formulas work and then just apply them when applicable.
pw.mac does not attempt to compute a limit as of this writing.

Richard



_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima