Hello,

I'm looking at convolution products of Lebesgue integrable functions,
and to get a better visualization, I want to compute some convolutions
of indicator functions.

So, want to have a function f:R->R defined by

f(x)=1 when x \in [0,1],
f(x)=0 when x \notin [0,1],

and, I need the function to have the attribute integral().

I've tried two things (working through a notebook):

(1)
<code>
f1(x) = 1
f2(x) = 0
f = Piecewise([[(-oo,0),f2],[[0,1],f1],[(1,oo),f2]])
</code>
But, then the result has f(0)=1/2.

(2)
<code>
g = lambda x: x >= 0 and 1 or 0
h = lambda x: x <= 1 and 1 or 0
k(x)=g(x)*h(x)
</code>
But, k is not defined correctly.  I don't know how to combine g and h.

Ultimately, I want to be able to integrate, so I don't know if either
of these is even in the right direction.

Thanks for any help.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to