# Proving the $f$ is differential at $0$.

Hi guys so here is yet again another derivative-calculus problem. I understand $(a)$ so i don't really need any help with that (it seems to me that you essentially just write out the definition of $f'(0)$. However I'm having a hard time solving $(b)$. Any help would be great!

(a) Let

$f(x) = \begin{cases} x^2, & \text{if$x$is rational} \\ 0, & \text{if$x$is irrational} \\ \end{cases}$

$(a)$ Prove that $f$ is differentiable at $0$.

$(b)$ Let f be any function such that $|f(x)|$ <= $x^2$ for all $x \in R$. Prove that $f$ is differentiable at $0$.

(a) $f(0)=0$. if $x$ is rational, $$\frac{f(x)-f(0)}{x-0}=\frac{f(x)}x=x$$ and, if $x$ is irrational, $$\frac{f(x)-f(0)}{x-0}=0$$ It follows that $$\lim_{x\to0}\frac{f(x)-f(0)}{x-0}=0$$

(b) $f(0)=0$,so $$\frac{f(x)-f(0)}{x-0}=\frac{f(x)}x$$ then $$|\frac{f(x)-f(0)}{x-0}|=|\frac{f(x)}x|\le|x|$$ we get that

$$\lim_{x\to0}\frac{f(x)-f(0)}{x-0}=0$$

(b)

Note that $$|f(x)| \leq x^2 \implies f(0) = 0$$ We want to show that $$\lim_{h \to 0} \frac{f(0 + h) - f(0)}{h} = \lim_{h \to 0} \frac{f(h)}{h} = 0$$ Given some $\epsilon > 0$, we can choose $\delta = \epsilon$. If $|h| < \delta$, then $$|f(h)| \leq h^2 \implies \left|\frac{f(h)}{h}\right| \leq |h| < \epsilon$$ So $f$ is differentiable at $x = 0$.

Hint:

(b) includes (a) as a special case, so this is how you do (b): Use the definition of the derivative to find $f'(0)$. The conditions on $f$ imply $|\frac{f(h)}{h}| \leq |h|$ for $h \neq 0$, so $-|h| \leq \frac{f(h)}{h} \leq |h|$ for all $h\neq 0$. Use the Squeeze Theorem.