On Jun 20, 2:42 am, "Aaron S. Meurer" <[email protected]> wrote:
> I have been working on getting separable equations in dsolve, and I  
> noticed this:
>  >>> c = Wild('c', exclude=[y])
>  >>> d = Wild('d', exclude=[x])
>  >>> (x).match(c*d)
> {c: x, d: 1}
>  >>> (log(x)).match(c*d)
> {c: log(x), d: 1}
>  >>> (x*log(x)).match(c*d)
> <Returns None>
>
> I would like for the last one to return {c:x*log(x), d:1}.  Presently,  
> I don't *need* this to work, because there is a workaround I can use  
> where I multiply the expression by x*y to ensure that it has x's and  
> y's in it and then they cancel out. But this is kind of hacky, and,  
> unless I am mistaken, this is not the expected behavior of match.  I  
> searched the issues and I didn't see it, unless I missed it.
>
> Aaron Meurer

In my opinion this is inconsistent behaviour that is to be fixed. I
also expect your last example to return {c:x*log(x), d:1}.
Also, the docstring should be clear about such behaviour, so ideally
you should not have to ask the list whether some behaviour is expected
or not.

Please feel free to fix this and to improve the docstring.

Vinzent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to