The absolute value function $|\cdot|$ is elementary, but not differentiable

derivativeselementary-functions

As usual, define the absolute value function $|\cdot|:\mathbb R \rightarrow \mathbb R$ by

$$|x| = \left\{
\begin{array}{ll}
x & \text{for } x \geq 0,\\
-x & \text{for } x < 0.\\
\end{array} \right.$$

Observe that the absolute value function can also defined by:

$$|x| = \sqrt {x^2}.$$

And so by ProofWiki's definition of elementary functions, the absolute value function is the composition of two elementary functions and is itself elementary.

According to Wikipedia, the set of elementary functions "is also closed under differentiation". I believe this implies the claim that every elementary function is differentiable. But I know that the absolute value function isn't.

What is the flaw/error in the above argument?


Addendum: I also found in Edwards and Larson (Calculus, 2018) the claim that "you can differentiate any elementary function".

enter image description here

Best Answer

The Wikipedia article does not state that every elementary function is differentiable. I suppose that you read that is closed under differentiation and you thought that it meant that every elementary function is differentiable. But what it means is that if $f$ is elementary and differentiable, then $f'$ is elementary too.