Nearly from the beginning, `solve` has recognized the `undetermined 
coefficients` case wherein a single equation is solved for a set of symbols 
which will simultaneously set it equal to zero. This is different than the 
normal use of `solve`, however, and might be considered a bug or feature. 
As an example, consider:

[in1] solve(a*x + b - (2*x + 4), (a, b))  # solve for a and b
{a: 2, b: 4}
[in2] solve(a*x + b - (2*x + 4), exclude=[x])  # solve for as many as 
possible, but not x
{a: 2, b: 4}
[in3] solve(a*x + b - (2*x + 4), a)  # solve for a
[(-b + 2*x + 4)/x]
[in4] solve(a*x + b - (2*x + 4))  # solve for anything and tell me what you 
did
[{a: (-b + 2*x + 4)/x}]

The "undetermined coefficients" case is returned from inputs 1 and 2 while 
the more usual "solution" is returned from 3 and 4.

The request for comment is whether this feature should be removed from 
`solve` so a better defined equation set is provided rather than building 
that equation set automatically when this case is detected as 
one-equation-many-symbols. 

To me it feels natural to get the undetermined coefficients solution when I 
ask for many symbols from one equation. If I want sympy to pick any 
variable other than some I would use `exclude=some` (where `some` is a list 
or set of things to ignore). But not everyone feels this way and refusing 
the temptation to guess is important, too.

Since this behavior is described in the docstring and has been present for 
many years it feels like a regression of this feature to me (though to 
others it feels like a bug fix). If you use this feature and/or have 
comments, please let us know your thoughts on this: 

1) should it be kept?
2) if removed, should there be deprecation?

Thanks,
 Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/b3553af5-0df2-49cb-bfaa-b3c354429864n%40googlegroups.com.

Reply via email to