@Stellos already gave the correct answer, but let me try to back it up with a bit of intuition:
Think of your function $f(x)$ as a function that would actually make sense for any real-valued argument $x$. Then, if that function happened to be of the form $f(x)=\sin(1000x)$, you would have lots of maxima and minima between each integer point and, in essence, which integer value happens to minimize $f(x)$ comes down to chance: where the integers happen to line up with the minima of the high frequency sine function. In other words, just because you know $f(15)$ and $f(17)$ tells you nothing about $f(16)$, and consequently the only way to find which integer $x$ minimizes $f(x)$ is to try them all.
On the other hand, imagine that you knew that $f(x)$ only varies slowly, on lengthscales much larger than the distance between integers. Then if you know that $f'(16)\approx\frac{f(17)-f(16)}{1}$, and you can run a derivative based search to find the minimum of the function.
Likewise, if you knew that the function only changes slowly, you could use something like bisection search to find where $f'(x)\approx 0$, and the minimum is likely going to be one of the adjacent integers to all of these critical points.
Even better, if you knew that your function is, for example, convex or concave, then you would know that there is only one minimum or maximum, plus ones possibly located at the end points of your interval, and you can again find them through bisection.
In other words, it is often very valuable to establish such qualitative properties of your objective function because it allows you to choose more efficient algorithms than if you knew nothing at all about your $f(x)$.