1
$\begingroup$

Let $f:{\mathbb R} \to {\mathbb R}$ be defined by $$f(x)= \begin{cases} x^2, & x \text{ is rational} \\ 0, & x \text{ is irrational} \end{cases} $$ Show that $f'$ is differentiable at $x=0$ and find $f'(0).$

Thus far I have,

If $x$ is rational: $$\lim_{x \to 0} \frac{f(x)-f(0)}{x-0} = \lim_{x \to 0} \frac{f(x)}{x} = \lim_{x \to 0} \frac{x^2}{x} = \lim_{x \to 0} x = 0.$$

If $x$ is irrational, I have $\lim_{x \to 0} 0 = 0.$

How do I connect this to prove $f'$ is differentiable at $x=0,$ and show $f'(0)=0$?

  • 0
    Relevant: [Squeeze_theorem](http://en.wikipedia.org/wiki/Squeeze_theorem). Does this problem come from a certain textbook? [Verbatim question here](http://answers.yahoo.com/question/index?qid=20100728131755AAWUkDk).2012-04-02
  • 0
    Techincally, you can't say "If $x$ is rational", given that $x$ is approaching zero. What you *can* do is consider $x$'s that approach $0$ only along the rationals, i.e., $$\lim_{\stackrel{x\to 0}{x\in\mathbb{Q}}}\frac{f(x)-f(0)}{x-0}$$but then you would have to argue that you can consider just this and $x$s approaching along irrationals.2012-04-02

1 Answers 1

7

I don't think it's a good idea to split things up as you did. You could get the result from what you have, but it would take more work that using a more direct approach (or at least as much work).

You could try the following:

Set $$ g(x)={f(x)-f(0)\over x-0}={f(x)\over x}. $$ Then for $x\ne0$ $$ g(x)=\cases{x,& $x$ rational,\cr 0,& $x$ irrational }. $$

$f$ is differentiable at 0 if and only if $\lim\limits_{x\rightarrow0} g(x)$ exists. In this case, the value of the limit is $f'(0)$. (You should suspect the value is 0 from what you've done.)

Can you prove this? Hint: note $$ -|x|\le g(x)\le |x|; $$ so try using the squeeze theorem.

Alternatively, use an (easy) $\epsilon$-$\delta$ argument.

  • 0
    I have: lim x->0 |x| = lim x->0 x = lim x->0 0 = 0 & lim x->0 -|x| = lim x->0 -x = lim x->0 0 =0. Thus by Squeeze I know that lim x->0 g(x) = 0. That helps tremendously, I accepted your answer. Thanks!2012-04-02
  • 1
    @Quaternary Yes, that's correct.2012-04-02