3
$\begingroup$

Prove the function $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x)= \begin{cases}x^2 & x\in\mathbb{Q}\\-x^2 & else\end{cases}$

is differentiable at $x=0$ and that $f'(0)=0$.

Hey everyone, this is a simple calculus problem I've encountered, but I don't really know how to prove this using the definition $lim_{x\to 0} \frac{f(x)-f(0)}{x-0}=f'(x)$ because of the cases. It is trivial that if $x\in\mathbb{Q}$ then $f'(x)=2x$, else $f'(x)=-2x \Rightarrow$ both limits of these functions are zero when $x$ is approaching zero, but how do I formally prove the function is differentiable at $0$? Thanks :)

$\endgroup$
1
  • 1
    $\begingroup$ $f$ is not differentiable at any $x\neq0$. $\endgroup$ Mar 1, 2018 at 9:49

3 Answers 3

8
$\begingroup$

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

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

$\endgroup$
2
$\begingroup$

$$ \frac {f(x)-f(0)}{x-0}= \begin{cases} x & x\in\mathbb{Q}\\-x & else\end{cases}$$ Thus $$ \frac {f(x)-f(0)}{x-0}\to 0\implies $$

$$ f'(0)=0$$

$\endgroup$
1
$\begingroup$

Even more: $g$ differentiable at $0$, $g(0) = g'(0) = 0,|f|\le |g|\implies$ $f$ differentiable at $0$, $f'(0) = 0$. Proof: when $x\to 0$, $$ \left|\frac{f(x) - f(0)}{x - 0}\right| = \left|\frac{f(x)}{x}\right|\le \left|\frac{g(x)}{x}\right| = \left|\frac{g(x) - g(0)}{x - 0}\right|\rightarrow|g'(0)| = 0. $$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .