# Math Help - Differentiability of functions

1. ## Differentiability of functions

If the function f is defined as follows:
$f(x)=x^2$ for x rational
$f(x)=0$ for x irrational
How would you show that f is differentiable at $x=0$?

2. Originally Posted by CrazyCat87
If the function f is defined as follows:
$f(x)=x^2$ for x rational
$f(x)=0$ for x irrational
How would you show that f is differentiable at $x=0$?
$f'(x) = \lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$

We need to show this limit exists when $x=0$.

For this we need to compare $\limsup$ and $\liminf$.

For $x\neq 0$, $x^2 > 0$, so our $\limsup$ will only consider the sequence containing all points of the form $(x,x^2)$.

Thus $\limsup_{h\to 0}\frac{f(0+h)-f(0)}{h} = \lim_{h\to 0}\frac{(0+h)^2-0^2}{h} = \lim_{h\to 0}\frac{h^2}{h} = \lim_{h\to 0}h = 0$.

Clearly our $\liminf$ will only consider the sequence containing all points of the form $(x,0)$.

Thus $\liminf_{h\to 0}\frac{f(0+h)-f(0)}{h} = \lim_{h\to 0}\frac{0}{h} = 0$.

Since $\limsup=\liminf$, $\lim_{h\to 0}\frac{f(0+h)-f(0)}{h}$ exists and equals $0$.
Therefore $f'(0)=0$.