How can I get a single solution of a diophantine equation when the solution
is returned
in terms of independent parameters?
>>> from sympy.abc import x, y, z, t
>>> from sympy import diophantine, Symbols
>>> diophantine(x + y + z, t)
{(t_0, t_1, -t_0 - t_1)}
>>> x, y, z = _.pop()
Substitution does not work:
>>> t_0, t_1 = Symbols('t_0 t_1')
>>> x.subs(t_0, 1)
t_0
>>> y.subs(t_1, 1)
t_1
>>> z.subs({t_0: 1, t_1: 1})
-t_0 - t_1
Thanks
Faisal Riyaz
--
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/CAEe-xqTSsGgc4a55jKYmn-52L7%2BoqXGZWizEP5zEOvWDg8NVnw%40mail.gmail.com.