I'm trying to solve an equation of the kind:
f1(x)*m^2 + f2(x)*m*n + f3(x)*n = 0.
f1
, f2
, f3
are known linear functions with rational coefficients, x
is inside the closed known interval [x_0, x_1]
of reals, and m
, n
are unknown positive integers.
My idea was to make a list of some rational elements in the interval and solve the resulting Diophantine equation using a solver. If the Diophantine has no solution, the idea would be to refine the list using new elements from the interval with increasing numerator and denominator factors, and putting them again inside the solver, recursively until a solution is found. However, this solution is terribly ineffective, as the criterion of elements choice is almost completely arbitrary.
Any idea for a more efficient algorithm?
x0 <= x <= x1
for givenx0, x1
? aref1, f2, f3
given exactly? (with rational slope?) And do you have constraints onm, n
? Or just need some (non-zero?) solution? Or every possible solution?n