# Find lowest integer value with integer x of given function

I need to find integer x with which function's y gets lowest integer values $$f(x)=\frac{x^2-x-17}{x-2}$$

I tried to find derivative, but it never equals 0. Other steps was to change expression $$f(x)=\frac{x^2-x-17}{x-2}=1+\frac{(x-5)(x+3)}{x-2}=x-2+\frac{3(x-7)}{x-2}$$ But didn't notice any solutions

-
Ross & Templar: sorry for your comments but I somehow confused integer and natural. If you want, you can repost them... – Fabian Mar 8 '11 at 17:20

If you want $x$ and $f(x)$ to both be integers, you have a Diophantine equation. Expressing $f(x)=x+1-\frac{15}{x-2}$ is the key, as you need the fraction to be integral. The only ways to have that is for $x-2$ to equal $\pm 1,3,5$, or $15$ and you can just try all eight.

-

For $n < -13$ we have $n+1 < f(n) < n+2$ and so $f(n)$ is not an integer for integer $n$.

For $n > 17$ we have $n < f(n) < n+1$ amd so $f(n)$ is not an integer for integer $n$.

So you just have to check the 31 integers remaining. The integer values are $f(-13)=-11$, $f(-3)=1$, $f(-1)=5$, $f(1)=17$, $f(3)=-11$, $f(5)=1$, $f(7)=5$, $f(17)=17$. So the integer minima are $-11$ when $n=-13$ or $n=3$.

-

Suppose that $\rm\:p(x)\in \mathbb Z[x]\:.\$ By the root-factor theorem we have $\rm\ p(x)\ \equiv\ p(2)\ \ (mod\ x-2)\$ Therefore $\rm\ x-2\ |\ p(x)\ \Rightarrow\ x-2\ |\ p(2)\ \Rightarrow\ |x-2| \le |p(2)|\:.\$ This inequality constrains the possible solutions to a finite set which can be explicitly tested. Now put $\rm\ p(x) = x^2 -x - 17\:.$

-