ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 31 Mar 2011 13:56:34 -0500How can I Integrate the dirac_delta and heaviside functions in sage?https://ask.sagemath.org/question/8041/how-can-i-integrate-the-dirac_delta-and-heaviside-functions-in-sage/Is it possible to integrate the dirac_delta and the heaviside function in sage. I can't seem to do it. For the dirac_delta I've tried the following code:
reset()
var('x,a')
integral(x^2*dirac_delta(-a + x), x, -infinity, +infinity)
from which, after evaluating, I get:
integrate(x^2*dirac_delta(-a + x), x, -Infinity, +Infinity)
i.e. the integration is not performed. I am expecting a^2.
For the heaviside fucntion I've tried:
reset()
var('x,x1,x2')
k(x,x1,x2)=heaviside(x-x1)*heaviside(x2-x)
integrate(k(x,x1,x2),x,-infinity,infinity)
from which, after evaluating, I get:
integrate(heaviside(-x + x2)*heaviside(x - x1), x, -Infinity, +Infinity)
I am expecting x2-x1. Am I doing something wrong or is it just not possible to do these integrations in sage?rtrwalkerThu, 31 Mar 2011 13:56:34 -0500https://ask.sagemath.org/question/8041/