>>> a = Wild('a', exclude=[f(x).diff(x)])
>>> b = Wild('b', exclude=[f(x).diff(x)])
>>> eq = x+f(x) - (x - f(x))*diff(f(x), x)
>>> r = eq.match(a+b*diff(f(x),x))
r is None. I need it to be{a:x+f(x), b:-(x-f(x))}. This works for
other things similarly formatted, for example:
>>> eq1 = 2*x+f(x)*cos(x)+(2*f(x)+sin(x)-sin(f(x)))*f(x).diff(x)
>>> eq1.match(a+b*diff(f(x),x))
{a: 2⋅x + cos(x)⋅f(x), b: -sin(f(x)) + 2⋅f(x) + sin(x)}
Is this a bug in matches or am I missing something here?
Aaron Meurer
It's a bug. Thanks for discovering it. Please create a new issue for it.
Ondrej