Having imported the following:
from sympy.solvers.diophantine.diophantine import diop_ternary_quadratic
from sympy.abc import x,y,z,d,h,c
Running the code diop_ternary_quadratic(-7938*x**2+14436*x*y-98*y**2-z**2)
returns (761, 441, 15120)
, however running diop_ternary_quadratic(-7938*d**2+14436*d*h-98*h**2-c**2)
, which is equivilent to the first line, the only difference being the symbols used, returns (None,None,None)
. Why does this happen? Furthermore how would one remedy this?
I've found that this issue only happens for some expressions, for example diop_ternary_quadratic(d**2+h**2-c**2)
spits out (1,0,1)
as expected.
This problem is not on my end as running it in SymPy's online shell produses the same results.
A possible fix could be exchanging d,h,c
for x,y,z
, however that would make my code harder to parse by humans, and introduce other "icky" problems, as well as not assuage my question.
Any help would be appreciated, and thanks in advance.