I have an exercise that reads:
Suppose $f:\mathbb{R}\rightarrow\mathbb{R}$ satisfies $0\leq f(x)\leq x^2$ for all $x\in \mathbb{R}$. What is $f(0)$? Show that $f$ is differentiable at $0$ and find $f'(0)$.
Here is my proof...
Part (a)
Since $0\leq f(x) \leq x^2$, we have $$\lim\limits_{x\rightarrow 0^+}0 \leq \lim\limits_{x\rightarrow 0^+}f(x) \leq \lim\limits_{x\rightarrow 0^+}x^2$$ $$0\leq \lim\limits_{x\rightarrow 0^+} f(x) \leq 0$$ and we have that $$\lim\limits_{x\rightarrow 0^-}0 \leq \lim\limits_{x\rightarrow 0^-}f(x) \leq \lim\limits_{x\rightarrow 0^-}x^2$$ $$0\leq \lim\limits_{x\rightarrow 0^-} f(x) \leq 0$$ we can conclude that $$\lim\limits_{x\rightarrow 0^+}0 \leq \lim\limits_{x\rightarrow 0^+}f(x) \leq \lim\limits_{x\rightarrow 0^+}x^2$$ $$\lim\limits_{x\rightarrow 0}f(x)=f(0)=0$$ by the Squeeze Theorem.
Part (b)
Since $0\leq f(x) \leq x^2$, we have $$\frac{0-f(0)}{x-0}\leq \frac{f(x)-f(0)}{x-0} \leq \frac{x^2-f(0)}{x-0}$$ $$0\leq \frac{f(x)-f(0)}{x-0} \leq x$$ further, we have that $$\lim\limits_{x\rightarrow 0^+}0\leq \lim\limits_{x\rightarrow 0^+}\frac{f(x)-f(0)}{x-0} \leq \lim\limits_{x\rightarrow 0^+}x$$ $$0\leq \lim\limits_{x\rightarrow 0^+}\frac{f(x)-f(0)}{x-0} \leq 0$$ and we have that $$\lim\limits_{x\rightarrow 0^-}0\leq \lim\limits_{x\rightarrow 0^-}\frac{f(x)-f(0)}{x-0} \leq \lim\limits_{x\rightarrow 0^-}x$$ $$0\leq \lim\limits_{x\rightarrow 0^-}\frac{f(x)-f(0)}{x-0} \leq 0$$ we can conclude that $$\lim\limits_{x\rightarrow 0}\frac{f(x)-f(0)}{x-0}=f'(0)=0$$ by the Squeeze Theorem.
Is my proof for this correct?