[Math] Looking for differentiable functions $f$ such that the set of points at which $|f|$ is not differentiable has some particular properties

derivativesreal-analysis

I know that $\sin x$ is differentiable at all points but $|\sin x|$ is not differentiable at countably many points namely at integer multiples of $\pi$ . So I am asking the following questions

i) Give example of a differentiable function $f:\mathbb R \to \mathbb R$ such that the set of points at which $|f|$ is not differentiable is countable and dense in $\mathbb R$

ii) Give example of a differentiable function $f:\mathbb R \to \mathbb R$ such that the set of points at which $|f|$ is not differentiable is uncountable and not dense in $\mathbb R$

iii) Give example of a differentiable function $f:\mathbb R \to \mathbb R$ such that the set of points at which $|f|$ is not differentiable is uncountable and dense in $\mathbb R$

$ UPDATE$:- As mentioned in the comments if $f$ is differentiable and and at some point non-zero then since by continuity $f$ will have same sign in a neighborhood of that point , $|f|$ will be differentiable ; thus $|f|$ is not differentiable $c$ only when $f(c)=0$ but then as John pointed out , if such points are dense then this leads to a contradiction , resolving i) and iii) in the negative ; this leaves us with (ii) only

Best Answer

I CLAIM THAT THE ANSWER TO (ii) IS NEGATIVE. PROOF.

Lemma: If $f$ is differentiable over $% %TCIMACRO{\U{211d} }% %BeginExpansion \mathbb{R} %EndExpansion $ and $c$ is a SIMPLE zero of $f$ then it is isolated, it means there exists $\varepsilon >0$ such that $for$ all $x\in \left( c-\varepsilon ,c+\varepsilon \right) ,$ $f(x)=0$ iff $x=c.$ Proof. Assume the contrary holds. Then there exists a sequence $x_{n}$ of zeros of $f$ converging to $c, $ then $$f^{\prime }(c)=\lim_{x\rightarrow c}\frac{f(x)-f(c)}{x-c}% =\lim_{n\rightarrow \infty }\frac{f(x_{n})-f(c)}{x_{n}-c}=\lim_{n\rightarrow \infty }\frac{0-0}{x_{n}-c}=0.$$ Then $$f(c)=f^{\prime }(c)=0.$$ Contradicting the simplicity of the zero $c.$

It follows that the Answer to (ii) is negative. In fact, every isolated subset of $% %TCIMACRO{\U{211d} }% %BeginExpansion \mathbb{R} %EndExpansion $ is countable.

Related Question