Problem with matches()

0 views
Skip to first unread message

Aaron S. Meurer

unread,
May 21, 2009, 10:33:14 PM5/21/09
to sy...@googlegroups.com
I tried the following,

>>> 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

Ondrej Certik

unread,
May 21, 2009, 10:36:52 PM5/21/09
to sy...@googlegroups.com

It's a bug. Thanks for discovering it. Please create a new issue for it.

Ondrej

Aaron S. Meurer

unread,
May 21, 2009, 10:45:12 PM5/21/09
to sy...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages