I need an example of a function that is continuous on some interval $I$, has a local minimum but doesn't have a global minimum. In other words, the problem of finding the global minimum of that function on an interval $I$ yields no solutions.
Does the function $Sinx^2, I=[-1;2)$ meet that condition?
Yes, $\sin(x^2)$ on $[-1,2)$ would work. $x=0$ is a local minimum, at which the value is $0$, but there is no global minimum as it never attains the infimum value of $\sin(4)$.