Let $$f(x)=\begin{cases} x^2\sin^2\left(\frac{1}{x}\right)&\text{ for }x \neq 0,\\ 0 & \text{ for }x=0. \end{cases}$$ I want to show that $f$ has a local minimum at $x=0$ but I think my reasoning isn't rigorous and want to know if it is valid in general, and less interested in an answer to the exercise.
My attempt: By Squeeze Theorem, we have the bound $0\leq x^2\sin^2(\frac{1}{x})\leq x^2$. Noting $\lim_{x\rightarrow 0}f(x)=0$, it must be true that $f(\epsilon)>0$ where $\epsilon$ is asserted to be the positive real closest to $0$ that is not a multiple of $\pi$. By the function being even, it follows $f(-\epsilon)>0$, hence I conclude there is a local minimum at $x=0$ $\blacksquare$
Is it valid to make this type of assertion in general?
Since $f(x) \geq 0$ for all $x$ and $f(0) = 0$, so you can conclude that $f$ has a minima at $0$. You don't need that $\epsilon$ condition that you mentioned. Moreover, the function will become $0$ infinite times near $x = 0$. Can you find those points?