TITLE: Given $|f(x)|≤x^2$, is $f$ both continuous and differentiable at $x=0$?
QUESTION [5 upvotes]: Let $f:\mathbb R \to \mathbb R$ be a function such that $|f(x)|\le x^2$, for all $x\in \mathbb R$. Then, at $x=0$, is $f$ both continuous and differentiable ?
No idea how to begin. Can someone help?

REPLY [6 votes]: You need to use the squeeze theorem on the given condtition $|f(x)|\le x^2$ in order to prove that $f$ is both continuous and differentiable at $x=0$:

Continuity: You know that $|f(x)|\le x^2$. Substituting $x=0$ you find that $|f(0)|\le 0$ or $f(0)=0$. But this condition also can be written as $$|f(x)|\le x^2 \implies -x^2\le f(x)\le x^2$$ and so take limits ($x\to 0$) $$\lim_{x\to 0}-x^2\le \lim_{x\to 0}f(x)\le \lim_{x\to 0}x^2 $$ which gives you $$0\le \lim_{x\to 0}f(x)\le 0 \implies \lim_{x\to}f(x)=0$$
So the limit of $f$ as $x$ goes to $0$ and the value of $f$ at $x=0$ coincide which implies that $f$ is continuous at $x=0$.
Differentiability: $$\lim_{h\to 0}\frac{f(h)-f(0)}{h}\overset{1.}=\lim_{h \to 0}\frac{f(h)}{h}$$ And now bound again $$\lim_{h \to 0}\frac{-h^2}{h}\le \lim_{h \to 0}\frac{f(h)}{h}\le \lim_{h \to 0}\frac{h^2}{h}$$ which implies that $$\lim_{h \to 0}\frac{f(h)}{h}=0$$ or equivalently that $f'(0)=0$.