Differentiability of a certain piecewise function

978 Views Asked by At

Consider the function $$ f(x)=\begin{cases} x & \textrm{if } x \textrm{ is rational} \\ -x & \textrm{if } x \textrm{ is irrational} \end{cases} $$ It is well-known that $f(x)$ is continuous at $x=0$, and discontinuous everywhere else. Now, let's consider the modified function: $$ g(x)=\begin{cases} x^3 & \textrm{if } x \textrm{ is rational} \\ -x^3 & \textrm{if } x \textrm{ is irrational} \end{cases} $$ Then, $g(x)$ will be again continuous at $x=0$. But I am wondering:

Is $g(x)$ differentiable at $x=0$?

I think the answer might be 'yes', because by introducing the higher power $x^3$, we have "smoothed out" the behaviour of the function around the origin. On the other hand, the function looks too pathological to admit any points of differentiability.

2

There are 2 best solutions below

8
On BEST ANSWER

For all $x\neq 0$ the following holds:

$$\dfrac{g(x)-g(0)}{x-0}=\dfrac {g(x)}x=\begin{cases} x^2, &\text{if }x\in \mathbb Q\\ -x^2, &\text{if }x\not \in \mathbb Q\end{cases},$$

therefore $$\lim \limits_{x\to 0}\left(\dfrac{g(x)-g(0)}{x-0}\right)=\underline ?$$ and $g'(0)=\underline ?$.

2
On

It's easy to prove that for every real valued function $f$, defined on an non-degenerated open interval containing $0$, which is continuos in $0$, the function $x\cdot f(x)$ is differentiable in $0$.