pw.mac problem



Hi List,

Someone pointed out that there is an error in pw.mac, for integration of delta functions and their derivatives.

Currently,

integrate(f(x)*diff_pwdelta(m, x-a), x); 
gives the wrong answer.  

This person says it should be.

integrate(f(x) * pwdelta(x-a, n), x); 
sum((-1)^k*binomial(n,k)*at(diff(f(x),x,k),x=a) * pwdelta(x-a,n-k-1),k,0,n)

where the two argument form of pwdelta(x,n) = diff_pwdelta(n,x) and pwdelta(x,0) = pwdelta(x) and pwdelta(x,-1)=unit_step(x).

Does anyone know exceptions to this answer? It is beyond me to verify the math. (Maybe I am not qualified to write pw.mac).

Rich