Q:

Let f be a function such that $|f(x)| \leq x^2$ for all x. Prove f is differentiable at 0.

This question is straight from Spivak Chapter 9, Question 15. I have attempted the previous problem, which is another differentiable function I had to prove.
I want to attempt this problem using the definition of a derivative as a limit. The issue in this problem for me is the $\leq$ sign. How do you work with this restriction? Any hints are appreciated.
Surely I can take $f$ to be $x^2$ since this satisfies the condition that $|f(x)| \leq x^2$? Is this sufficient to prove the condition?

Proof. Let a function $f$ be defined as $|f(x)| < x^2$. Since $x^2$ is such a function, we know that the derivative of $x^2 = 2a$, and since $x^2$ is differentiable at 0, the (half-assed) proof is complete.

I have skipped many steps in the proof. I merely asserted that $x^2$ is differentiable at 0 and meets the restriction specified.

A:

You cannot take $f$ to be $x^2$. You can't assume anything more than what you're given, which is that $\vert f(x) \vert \leq x^2$. This does not imply that $f$ is actually equal to $x^2$. Instead, just work directly with the definition of the derivative as the limit of the difference quotient. Since $\vert f(x) \vert \leq x^2$, in particular $f(0) = 0$. Therefore for $h \neq 0$ we have
$$\frac{f(0 + h) - f(0)}{h} = \frac{f(h)}{h}.$$
Since $\vert f(h) \vert \leq h^2$, we have
$$0 \leq \left\vert \frac{f(h)}{h} \right\vert \leq \left\vert \frac{h^2}{h} \right\vert = \vert h \vert.$$
Since the left and right-hand sides both go to $0$ as $h \to 0$, this implies that
$$\lim_{h \to 0} \left\vert \frac{f(h)}{h} \right\vert = 0 \iff \lim_{h \to 0}  \frac{f(h)}{h} = 0,$$
so $f$ is differentiable at $0$ and $f'(0) = 0$.

