# Proof Verification and Help: Differentiation

Let $f : \mathbb{R} \to \mathbb{R}$ be defined by $f(x) = x^2$ for $x \in \mathbb{Q}$ and $f(x) = 0$ for $x \in \mathbb{Q^c}$. Show that f is differentiable at $x=0$, and find $f'(0)$

My Attempt:

let $c \in \mathbb{Q}$. Then $\lim_{x \to c}\frac{x^2 -c^2}{x-c}$ = $\lim_{x \to c}{x+c} = 0 + 0 =0$. I don't know if the idea of doing this through this is right. In particular, now as I type it, I realise that it should be 2c instead of 0 since its not the value of function we're talking about.

Can anyone please guide as to how I should approach this proof?

Thank you.

• The value of $c$ that you are interested is $0$.

• $f(x)$ doesn't take the value $x^2$ all the time.

$$\lim_{x \to 0} \left|\frac{f(x)-f(0)}{x-0}\right|=\lim_{x \to 0} \left|\frac{f(x)}{x}\right| \le \lim_{x \to 0}\left|\frac{x^2}{x}\right|=\lim_{x \to 0}|x|=0,$$

hence

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

• Did you account for the irrationals' case by reducing the inequality to $|x|$? Can you please elaborate a bit on why you took the absolute of the function and why did you use the inequality bit?
– Alea
May 14 '18 at 22:09
• If we are expecting the answer to be $0$, using an absolute value gives us a lower bound and we just have to focus on the upper bound. $f(x)$ eitehr takes value $0$ or $x^2$ and an upper bound is $x^2$. May 14 '18 at 22:18
• Thank you. What do mean by lower bound? Do you mean that since x can be both positive and negative, then the absolute value will allow us to get rid of that issue?
– Alea
May 14 '18 at 22:24
• Yup, $x$ can take both positive and negative values, hence I think absolute value simplify things. I think it is just a style of attack that I pick up over time. May 14 '18 at 22:29
• ok! Thank you so much!
– Alea
May 14 '18 at 22:45