0
$\begingroup$

As homework we were given 2 questions:

  1. Find a function that is continuous at exactly one point and not differentiable there.

  2. Find a function that is differentiable at exactly two points.

The answer to the first one was somewhat simple - $ f(x) = x*D(x) $, wherein $ D(x) $ stands for Dirichlet function.

I've been thinking about the second question for a while, and someone suggested me the following: $ g(x) = x^2*D(x) $

$ f(x) = (x-1)^2 * g(x) $

Claiming that $f(x)$ is only differentiable in $ x = 0, x = 1 $. Why is that?

$\endgroup$
  • 1
    $\begingroup$ It follows the exactly same proof to that $x^2D(x)$ is only differentiable in $x=0$. Note that $g(x-1) = (x-1)^2 D(x-1)$ and $D(x-1)=D(x)$. $\endgroup$ – Yanko Jan 12 '19 at 17:39
3
$\begingroup$

It is simplier to say that$$g(x)=\begin{cases}x^2(x-1)^2&\text{ if }x\in\mathbb Q\\0&\text{ otherwise.}\end{cases}$$And, yes, this exmple works. Outside $\{0,1\}$ $g$ is discontinuous, and therefore non-differentiable. And it follows from the definition of $g'$ that $g'(0)=g'(1)=0$.

$\endgroup$
  • $\begingroup$ Good example... $\endgroup$ – Cloud JR Jan 12 '19 at 17:45
  • $\begingroup$ An excellent example, thank you! $\endgroup$ – Tegernako Jan 12 '19 at 18:04
  • 1
    $\begingroup$ It's your example. I just used a different notation. Anyway, I'm glad I could help. $\endgroup$ – José Carlos Santos Jan 12 '19 at 18:06
1
$\begingroup$

Clearly, $f$ is not differentiable away from $0$ and $1$: the $x^2$ and $(x-1)^2$ factors don't fix the horribleness of the Dirichlet function there: a rational $y$ near some $x$ is sent near to $x^2(x-1)^2$, while an irrational $y$ near $x$ is sent to $0$, and those differ, so $f$ isn't even continuous away from $0$ and $1$.

So, why is it differentiable at $0$ and $1$: well, let's just check the definition.

$$\lim_{x\to 0}\frac{f(x)-f(0)}{x} = \lim_{x\to 0}\frac{x^2(x-1)^2D(x)}{x} = \lim_{x\to 0}x(x-1)^2D(x),$$ and $|x(x-1)^2D(x)| \leq |x|(x-1)^2 \to 0$ as $x \to 0$, so the limit exists, and is zero, at $0$. Similarly, $$\lim_{x\to 1}\frac{f(x)-f(1)}{x-1} = \lim_{x\to 1}x^2(x-1)D(x),$$ and $|x^2(x-1)D(x)| \leq x^2|x-1| \to 0$ as $x \to 1$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.