How can you perform a Taylor expansion with respect to function symbols in SymPy?
For example
from sympy import *
ode = f(x).diff(x, 2) - sin(f(x))
We would like to linearize the differential equation by doing something like
ode.series(f, 0, 1)
to obtain something like
f(x).diff(x, 2) - f(x)
But I can't figure it out how to do this in SymPy. In Maxima, I could define a dependency like
depends(y, x);
ode: diff(y, x, 2) - sin(y);
taylor(ode, y, 0, 8);
and it would result in
'diff(y,x,2) - y + y^3/6 - y^5/120 + y^7/5040 + ...
This could be really useful to linearize non-linear differential equations or in perturbation theory.