Let's say we have a linear differential operator ˆA=∑kakdkdxk and we want to solve the eigenvalue equation ˆAf(x)=af(x) which is an ODE that we put in sage and outputs a solution g(x). We now want to substitute f(x) with g(x) and simplify our expression in order to extract the eigenvalues of ˆA. The problem here is that I am not able to substitute the derivatives with my solution neither via eqn.substitute_expression(f(x) == g(x))
nor via eqn.substitute_function(f(x),g(x))
because D[0]f(x)
, ... D[0,0,...,0]f(x)
remain unchanged.