It's good you found the method. solve will also try to detect such cases:
>>> solve(f(x)-g(x),(a,b,c))
{c: 1, b: 4, a: -1}
On Monday, May 25, 2015 at 5:17:56 PM UTC-5, Renan Birck Pinheiro wrote:
>
> Hi,
>
> Say I have two expressions, for example, f(x) = (a+b)*x^2 + (b+c)*x + c
> and g(x) = 3*x^2 + 5*x + 1.
>
> In this case one can see that a+b = 3, b+c = 5 and c = 1, then setting a =
> -1, b = 4 and c=1 makes the two expressions equivalent (that is, f(x) -
> g(x) = 0 for all x - I don't know the correct term).
>
> How can I, using SymPy, find the values of a, b, c, that make those
> expressions equivalent?
>
> Thanks!
>
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/6005addd-582c-4678-92fe-762dd8b07fa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.