Sorry for my poor English, I'm trying to find the global and local minima of a quadratic function: $x^2 - 3x$, with $x \in Z $. Here is my solution:
It is straightforward to find the global minima over $R$: you take the derivative and set it to 0; here we find that it is x=3/2. But that's not what we want, so we take the 2 closest integers to x=3/2, those are: x=1 and x=2. We then find f(1)= -2, f(2)=-2, so they are both global minimas.
But the problem is about local minimas. I use the fact that : f(1)<= f(x) $\forall x<=1$ and f(2)<=f(x) $\forall x>=2$, so in a domain small enough from 1 (which does not include 2) , x=1 is actually the local minima, since there is no integer greater that x=1 in that domain. The same argument applies for x=2.
I'm not really sure about my solution. Can anyone help me? Thank you very much!
You've found both local minimums - you're done. Your task is to minimise $x^2-3x$, and BOTH $x=1$ and $x=2$ as you've discovered do this.
There is no "better minimum" with the information you're given. They're both equally good.