Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

algebra of differential operators

I'm trying to use Sage to check if an explicit function satisfies a PDE. As an example, I would like to be able to apply the operator $\prod_{n=1}^5(t \frac{\partial}{\partial t} - n)$ to $zt e^{t/z}$. What are my options for doing this in Sage?

I found a relevant post on this site, which almost does what I want, but not quite. In the context of that post, I'd like to be able to do something like this:

def Dt(f):
    return t*f.derivative(t)

operator = prod([ Dt - n-1 for n in range(5) ])
operator(z*t*exp(t/z))

But of course, this doesn't work. (Because my PDEs can get large, I'm looking for a way to get Sage to expand them for me. I don't want to do it by hand and then input the expanded form.) Thanks!

algebra of differential operators

I'm trying to use Sage to check if an explicit function satisfies a PDE. As an example, I would like to be able to apply the operator $\prod_{n=1}^5(t \frac{\partial}{\partial t} - n)$ to $zt e^{t/z}$. What are my options for doing this in Sage?

I found a relevant post on this site, which almost does what I want, but not quite. In the context of that post, I'd like to be able to do something like this:

def Dt(f):
    return t*f.derivative(t)

operator = prod([ Dt - n-1 for n in range(5) ])
operator(z*t*exp(t/z))

But of course, this doesn't work. (Because my PDEs can get large, Thanks!

To be clear, I'm looking for a way to get Sage to expand them for me. asking about the following operator: $$\prod_{n=1}^5(t \frac{\partial}{\partial t} - n) = (t\frac{\partial}{\partial t} - 1)(t\frac{\partial}{\partial t}-2)(t\frac{\partial}{\partial t}-3)$$ $$=\bigg(t\frac{\partial}{\partial t}-1\bigg)\bigg(\big(t\frac{\partial}{\partial t} + t^2 \frac{\partial^2}{\partial t^2}\big) - 5t\frac{\partial}{\partial t} + 6\bigg)$$ $$= \ldots $$ I don't want to finish the expansion by hand. I want Sage to do it by hand and then input the expanded form.) Thanks!for me. :)

algebra of differential operators

I'm trying to use Sage to check if an explicit function satisfies a PDE. As an example, I would like to be able to apply the operator $\prod_{n=1}^5(t \frac{\partial}{\partial t} - n)$ to $zt e^{t/z}$. What are my options for doing this in Sage?

I found a relevant post on this site, which almost does what I want, but not quite. In the context of that post, I'd like to be able to do something like this:

def Dt(f):
    return t*f.derivative(t)

operator = prod([ Dt - n-1 for n in range(5) ])
operator(z*t*exp(t/z))

But of course, this doesn't work. Thanks!

To be clear, I'm asking about the following operator: $$\prod_{n=1}^5(t \frac{\partial}{\partial t} - n) = (t\frac{\partial}{\partial t} - 1)(t\frac{\partial}{\partial t}-2)(t\frac{\partial}{\partial t}-3)$$ $$=\bigg(t\frac{\partial}{\partial t}-1\bigg)\bigg(\big(t\frac{\partial}{\partial t} + t^2 \frac{\partial^2}{\partial t^2}\big) - 5t\frac{\partial}{\partial t} + 6\bigg)$$ $$= \ldots $$ I don't want to finish the expansion by hand. I want Sage to do it for me. :)me, and then apply the whole mess to the function $zt e^{t/z}$.