Proving a function has a local minimum If $f(x)=2x^2+x^2\sin(1/x)$ for $x ≠ 0$ and $f(0)=0$, how can I prove $f(x)$ has a local minumum when $x= 0$ and (Df)(0)=0?
I'm thinking the first step is proving $(Df)(0)=0$ with
$$\lim_{x\to 0}(Df)=\lim_{x\to 0}(4x+2x\sin(1/x)-\cos(1/x))=0$$
But here I get stuck because I can't say anything about what happens to $\cos(1/x)$.
 A: You have $f(0)=0$ and, if $x\ne0$,\begin{align}f(x)&=2x^2+x^2\sin\left(\frac1x\right)\\&=x^2\left(2+\sin\left(\frac1x\right)\right)\\&\geqslant x^2\\&>0.\end{align}So, $f$ even has an absolute minimum at $0$.
A: You're right you can't say what $\cos\frac 1x$ is at $x=0.$ However, you can use the definition:
$$\begin{align}
Df(0) & = \lim_{x\to 0}\frac{f(x)-f(0)}{x-0} \\ \\
& = \lim\,\frac{x^2(2+\sin(1/x))}x \\ \\
& = \lim \,x\cdot(2+\sin(1/x))
\end{align} $$
Whatever the $x$ is, its sine is between $-1$ and $1$, inclusive, so the whole parenthesized expression's values belong to an interval $[1,3]$.
Multiplying it by $x$ squeezes those values into a range $[x, 3x]$ for positive $x$ and to $[3x, x]$ for negative. Anyway both ranges converge to zero as $x$ tends to zero, hence our limit
$$Df(0) = \lim_{x\to 0}\frac{f(x)-f(0)}{x-0} = 0$$
See a graph at Wolfram Alpha: https://www.wolframalpha.com/input/?i=y%3Dx%5E2%282%2Bsin%281%2Fx%29%29
By the way you can notice that the values of $f(x)$ are always between $x^2$ and $3x^2$, which also implies $f(0)=0$ is the absolute minimum – without any calculus. :)
