Ask Your Question

Revision history [back]

I've attached some code below that defines your operator in a way that lets it operate on polynomials (it is the operator "op" after the code is run). However, I'm pretty new to Sage, so I'm not sure how to make it act on exponential functions. (Also, since I'm new to Sage, this might be a bad way to make this operator, but it does seem to work, at least.)

RR = PolynomialRing(QQ,'t')
t = RR.gens()[0]

id = lambda x : x
def comp(a,b):
    return lambda x: a(b(x))

def Dtn(n):
    return lambda f: t*f.derivative(t) - n*f

op = id
for n in range(5):
    optmp = op
    op = comp(optmp,Dtn(n+1))