3
$\begingroup$

How can I find the integer numbers a, b, c, m,n so that the funtion f[x]=(a x^2 + b x + c)/(m x + n) with the equation D[f[x], x]] == 0 have two integer solutions x1, x2 and the values f[x1] and f[x2] are also integer numbers?

I tried

Clear["Global`*"]
f[x_] = (a x^2 + b x + c)/(m x + n);
x1 = (-a n - Sqrt[a c m^2 - a b m n + a^2 n^2])/(a m);
x2 = (-a n + Sqrt[a c m^2 - a b m n + a^2 n^2])/(a m);
list = Table[
  If[GCD[a, b, c] == 1 && GCD[m, n] == 1 && 
    a c m^2 - a b m n + a^2 n^2 > 0 && a n - b m  != 0 && 
    a (c m^2 - b m n + a n^2) > 0 && b^2 - 4 * a * c < 0 && 
    IntegerQ[x1] && IntegerQ[x2] && b c m n x1 x2 f[x1]* f[x2] != 0 &&
     IntegerQ[f[x1]] && 
    IntegerQ[f[x2]], {(a x^2 + b x  + c)/(m x + n), {x1, f[x1]}, {x2, 
     f[x2]}}, Nothing], {a, 1, 10}, {b, 1, 10}, {c, 1, 10}, {m, 1, 10}, {n, 1, 10}]

enter image description here

How can I remove the empty sets in my results?

$\endgroup$

2 Answers 2

3
$\begingroup$

Try

f[x_]:=(a x^2+b x+c)/(d x^2+e x+m);
FindInstance[{D[f[x1],x1]==0,D[f[x2],x2]==0,
  0<a<=1,0<b<=1,0<c<=1,0<d<=1,0<e<=1,0<m<=1,
  x1!=x2,Element[x1|x2,Integers]},{a,b,c,d,e,m,x1,x2}]

which finds an instance which seems to satisfy your conditions.

If you change all those <= to < then it finds a different solution.

$\endgroup$
3
$\begingroup$

I tried

Clear["Global`*"]
f[x_] = (a x^2 + b x + c)/(m x + n);
x1 = (-a n - Sqrt[a c m^2 - a b m n + a^2 n^2])/(a m);
x2 = (-a n + Sqrt[a c m^2 - a b m n + a^2 n^2])/(a m);
list = Table[
   If[GCD[a, b, c] == 1 && GCD[m, n] == 1 && 
     a c m^2 - a b m n + a^2 n^2 > 0 && a n - b m  != 0 && 
     a (c m^2 - b m n + a n^2) > 0 && b^2 - 4 * a * c < 0 && 
     IntegerQ[x1] && IntegerQ[x2] && b c m n x1 x2 f[x1]* f[x2] != 0 &&
      IntegerQ[f[x1]] && 
     IntegerQ[f[x2]], {(a x^2 + b x  + c)/(m x + n), {x1, f[x1]}, {x2,
       f[x2]}}, Nothing], {a, 1, 10}, {b, 1, 10}, {c, 1, 10}, {m, 1, 
    10}, {n, 1, 10}];
Flatten[list, 4]

{{(7 + x + x^2)/(2 + x), {-5, -9}, {1, 3}}, {(10 + x + x^2)/( 3 + x), {-7, -13}, {1, 3}}, {(3 + 2 x + x^2)/( 1 + 2 x), {-2, -1}, {1, 2}}, {(5 + 2 x + x^2)/( 1 + x), {-3, -4}, {1, 4}}, {(7 + 2 x + x^2)/( 1 + 2 x), {-3, -2}, {2, 3}}, {(7 + 2 x + x^2)/( 3 + 2 x), {-4, -3}, {1, 2}}, {(10 + 2 x + x^2)/( 1 + x), {-4, -6}, {2, 6}}, {(3 + 3 x + x^2)/( 2 + x), {-3, -3}, {-1, 1}}, {(5 + 3 x + x^2)/( 4 + x), {-7, -11}, {-1, 1}}, {(6 + 3 x + x^2)/( 1 + x), {-3, -3}, {1, 5}}, {(6 + 3 x + x^2)/( 5 + x), {-9, -15}, {-1, 1}}, {(7 + 3 x + x^2)/( 6 + x), {-11, -19}, {-1, 1}}, {(8 + 3 x + x^2)/( 7 + x), {-13, -23}, {-1, 1}}, {(9 + 3 x + x^2)/( 8 + x), {-15, -27}, {-1, 1}}, {(10 + 3 x + x^2)/( 9 + x), {-17, -31}, {-1, 1}}, {(5 + 4 x + x^2)/( 2 + x), {-3, -2}, {-1, 2}}, {(6 + 4 x + x^2)/( 5 + 2 x), {-4, -2}, {-1, 1}}, {(7 + 4 x + x^2)/( 1 + x), {-3, -2}, {1, 6}}, {(7 + 4 x + x^2)/( 3 + x), {-5, -6}, {-1, 2}}, {(8 + 4 x + x^2)/( 1 + 2 x), {-3, -1}, {2, 4}}, {(8 + 4 x + x^2)/( 7 + 2 x), {-6, -4}, {-1, 1}}, {(10 + 4 x + x^2)/( 3 + 2 x), {-4, -2}, {1, 3}}, {(10 + 4 x + x^2)/( 9 + 2 x), {-8, -6}, {-1, 1}}, {(7 + 5 x + x^2)/( 2 + x), {-3, -1}, {-1, 3}}, {(7 + 5 x + x^2)/( 3 + x), {-4, -3}, {-2, 1}}, {(8 + 5 x + x^2)/( 1 + x), {-3, -1}, {1, 7}}, {(8 + 5 x + x^2)/( 4 + x), {-6, -7}, {-2, 1}}, {(10 + 5 x + x^2)/( 3 + x), {-5, -5}, {-1, 3}}, {(10 + 5 x + x^2)/( 6 + x), {-10, -15}, {-2, 1}}, {(10 + 6 x + x^2)/( 3 + x), {-4, -2}, {-2, 2}}, {(7 + x + 2 x^2)/( 1 + x), {-3, -11}, {1, 5}}, {(5 + 2 x + 2 x^2)/( 1 + 2 x), {-2, -3}, {1, 3}}, {(9 + 3 x + 2 x^2)/( 1 + x), {-3, -9}, {1, 7}}, {(4 + 5 x + 2 x^2)/( 2 + x), {-3, -7}, {-1, 1}}, {(5 + 5 x + 2 x^2)/( 3 + x), {-5, -15}, {-1, 1}}, {(6 + 5 x + 2 x^2)/( 4 + x), {-7, -23}, {-1, 1}}, {(7 + 5 x + 2 x^2)/( 5 + x), {-9, -31}, {-1, 1}}, {(8 + 5 x + 2 x^2)/( 6 + x), {-11, -39}, {-1, 1}}, {(9 + 5 x + 2 x^2)/( 7 + x), {-13, -47}, {-1, 1}}, {(10 + 5 x + 2 x^2)/( 8 + x), {-15, -55}, {-1, 1}}, {(5 + 6 x + 2 x^2)/( 3 + 2 x), {-2, -1}, {-1, 1}}, {(7 + 6 x + 2 x^2)/( 1 + 2 x), {-2, -1}, {1, 5}}, {(7 + 6 x + 2 x^2)/( 5 + 2 x), {-4, -5}, {-1, 1}}, {(9 + 6 x + 2 x^2)/( 7 + 2 x), {-6, -9}, {-1, 1}}, {(8 + 7 x + 2 x^2)/( 2 + x), {-3, -5}, {-1, 3}}, {(10 + x + 3 x^2)/( 1 + x), {-3, -17}, {1, 7}}, {(7 + 2 x + 3 x^2)/( 1 + 2 x), {-2, -5}, {1, 4}}, {(8 + 4 x + 3 x^2)/( 1 + 2 x), {-2, -4}, {1, 5}}, {(5 + 7 x + 3 x^2)/( 2 + x), {-3, -11}, {-1, 1}}, {(6 + 7 x + 3 x^2)/( 3 + x), {-5, -23}, {-1, 1}}, {(7 + 7 x + 3 x^2)/( 4 + x), {-7, -35}, {-1, 1}}, {(8 + 7 x + 3 x^2)/( 5 + x), {-9, -47}, {-1, 1}}, {(9 + 7 x + 3 x^2)/( 6 + x), {-11, -59}, {-1, 1}}, {(10 + 7 x + 3 x^2)/( 7 + x), {-13, -71}, {-1, 1}}, {(6 + 8 x + 3 x^2)/( 3 + 2 x), {-2, -2}, {-1, 1}}, {(7 + 8 x + 3 x^2)/( 2 + x), {-3, -10}, {-1, 2}}, {(8 + 8 x + 3 x^2)/( 5 + 2 x), {-4, -8}, {-1, 1}}, {(9 + 8 x + 3 x^2)/( 3 + x), {-5, -22}, {-1, 2}}, {(10 + 8 x + 3 x^2)/( 1 + 2 x), {-2, -2}, {1, 7}}, {(10 + 8 x + 3 x^2)/( 7 + 2 x), {-6, -14}, {-1, 1}}, {(9 + 10 x + 3 x^2)/( 3 + 2 x), {-2, -1}, {-1, 2}}, {(6 + 9 x + 4 x^2)/( 2 + x), {-3, -15}, {-1, 1}}, {(7 + 9 x + 4 x^2)/( 3 + x), {-5, -31}, {-1, 1}}, {(8 + 9 x + 4 x^2)/( 4 + x), {-7, -47}, {-1, 1}}, {(9 + 9 x + 4 x^2)/( 5 + x), {-9, -63}, {-1, 1}}, {(10 + 9 x + 4 x^2)/( 6 + x), {-11, -79}, {-1, 1}}, {(7 + 10 x + 4 x^2)/( 3 + 2 x), {-2, -3}, {-1, 1}}}

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.