Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The object you get out of Periodisation_int is not a symbolic function, but when you call it with x you get a symbolic expression anyway, so it doesn't really matter (and most symbolic machinery is for expressions anyway). If you really want a symbolic function you can do:

def per(f,a,b):
    x = SR.var('x')
    CSRx = CallableSymbolicExpressionRing( (x,))
    t = f((x-b)-(b-a)*floor((x-b)/(b-a)))
    h = CSRx(t)
    return h

where the whole bit with CSRx is to actually get a symbolic function (something you can call). I'm not so sure that integrate knows what to do with this symbolic function, though.