On Wed, 9 Mar 2022 at 19:29, Chris Smith <[email protected]> wrote:
>
> For the case of `eqs = [x+y+a, x+y+1]` you get the solution for `a = 1` if 
> you give it the freedom to tell you that: `solve(eqs) -> {a: 1, x: -y - 1}`. 
> This gives you the conditions for a solution: a value for `a` and a 
> relationship between `x` and `y`.

In very simple cases that approach might seem to work but it's not
hard to show when it doesn't if you go beyond trivial examples:

In [22]: a, b, c, d, e, f, x, y = symbols('a:f, x, y')

In [23]: eqs = [a*x + b*y + c, a*x + b*y + d]

In [24]: solve(eqs, [x, y])
Out[24]: []

In [26]: print(solve(eqs))
[{a: -(b*y + d)/x, c: d}]

Clearly I didn't want to solve for a and c here: that's why solve has
an argument to say what the unknowns are.

--
Oscar

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxRqw_1da01a%2BUvkeGkF5xA3ge%3DRuPYWv5UZDE-ez_reyg%40mail.gmail.com.

Reply via email to