3
$\begingroup$

Graph of the fuction $y=\dfrac{(x-26)(x+9)}{(x+14)(x+19)}$ has maximum point and minimum point are (-16,-49) and (-4,-1) whose coordinates are integer numbers. I am trying to find four integer numbers a, b, c, d so that graph of the function $f(x) = \dfrac{(x+a)(x+b)}{(x+c)(x+d)}$ has two extremum $(x_1, f(x_1))$, $(x_2, f(x_2))$ where $x_1$, $x_2$, $f(x_1)$, $f(x_2)$ are four integer numbers. I tried

Clear["Global`*"];
f[x_] = ((x + a) (x + b))/((x + c) (x + d));
sol = Solve[f'[x] == 0, x] // Simplify;
x1 = x /. sol[[1]]
x2 = x /. sol[[2]]
f[x1] // FullSimplify
f[x2] // FullSimplify
Table[{IntegerQ[x1] && IntegerQ[x2] &&  IntegerQ[f[x1]] && 
   IntegerQ[f[x2]]}, {-30 <= a <= 30 && -30 <= b <= 30 && -30 <= c <= 
    30 && -30 <= d <= 30 && a > b  && c > d}]

I can not get the result. How can I get the results?

$\endgroup$
2
  • $\begingroup$ Your claim "has maximum point and minimum point are (-16,-49) and (-4,-1) " does not correspond to reality. In fact, you consider $y=\dfrac{(x-26)(x+9)}{(x+14)(x+19)}$ on integers only. In this case $f'(x)=0$ does not work for extrema. $\endgroup$
    – user64494
    Sep 1, 2023 at 12:53
  • $\begingroup$ @user64494 f[x_] = ((x + a) (x + b))/((x + c) (x + d)) /. {a -> -26, b -> 9, c -> 14, d -> 19}; define on real domain. The function also through two integer points. He want to find many {a,b,c,d}. The problem is extramly difficult. $\endgroup$
    – cvgmt
    Sep 1, 2023 at 13:08

1 Answer 1

6
$\begingroup$

My answer is based on another answer on this site which I do not remember its link. I am sorry the author of this answer.

PS. My answer is based on this answer

I use your result

Clear["Global`*"];
f[x_] = ((x + a) (x + b))/((x + c) (x + d));
sol = Solve[f'[x] == 0, x] // Simplify;
r1 = x /. sol[[1]]
r2 = x /. sol[[2]]
r3 = f[r1] // FullSimplify
r4 = f[r2] // FullSimplify

and input

Clear["Global`*"];
grid = Tuples[DeleteCases[Range[-30, 30], 0], 4];
cpicked = 
  With[{IntegerQ = FractionalPart[#] == 0 &}, 
   Compile[{{m, _Real, 1}}, 
    Module[{a = m[[1]], b = m[[2]], c = m[[3]], d = m[[4]], r1, r2, 
      r3, r4}, 
     If[(a - c) (b - c) (a - d) (b - d) < 0, 0, 
      r1 = -((-a b + Sqrt[(a - c) (b - c) (a - d) (b - d)] + c d)/(a +
             b - c - d));
      r2 = (a b + Sqrt[(a - c) (b - c) (a - d) (b - d)] - c d)/(a + 
          b - c - d);
      r3 = (b (c + d) + a (-2 b + c + d) - 
          2 (Sqrt[(a - c) (b - c) (a - d) (b - d)] + c d))/(c - d)^2;
      r4 = (2 Sqrt[(a - c) (b - c) (a - d) (b - d)] - 2 c d + 
          b (c + d) + a (-2 b + c + d))/(c - d)^2;
      a > b && c > d && a != b != c != d && IntegerQ[r1] && 
        IntegerQ[r2] && IntegerQ[r3] && IntegerQ[r4] // Boole]], 
    RuntimeAttributes -> {Listable}]];
(ans = Pick[grid, cpicked@grid, 1])

{{5, -30, 15, 10}, {6, -29, 16, 11}, {7, -28, 17, 12}, {8, -27, 18, 13}, {9, -26, 19, 14}, {10, -25, 20, 15}, {11, -24, 21, 16}, {12, -23, 22, 17}, {13, -22, 23, 18}, {14, -21, 24, 19}, {15, -20, -25, -30}, {15, -20, 25, 20}, {16, -19, -24, -29}, {16, -19, 26, 21}, {17, -18, -23, -28}, {17, -18, 27, 22}, {18, -17, -22, -27}, {18, -17, 28, 23}, {19, -16, -21, -26}, {19, -16, 29, 24}, {20, -15, -20, -25}, {20, -15, 30, 25}, {21, -14, -19, -24}, {22, -13, -18, -23}, {23, -12, -17, -22}, {24, -11, -16, -21}, {25, -10, -15, -20}, {26, -9, -14, -19}, {27,-8, -13, -18}, {28, -7, -12, -17}, {29, -6, -11, -16}, {30, -5, -10, -15}}

$\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.