# Kinky functions

Are there functions whereby the left-handed and right-handed derivatives are always defined but different? What made me think about this is price elasticity of demand which for psychological reasons I think wouldn't be the same from the left and right.

• There are continuous functions which are not differentiable at any point, such as the Weierstrass function, if that's what you mean: en.wikipedia.org/wiki/Weierstrass_function Jan 7, 2017 at 22:11
• @TheCount "Are there functions whereby the left-handed and right-handed derivatives are always defined but different?" Jan 7, 2017 at 22:18
• But do the left and right limits of the difference quotient of the W-M function exist? Jan 7, 2017 at 22:31
• It's not difficult to construct functions where the left- and right-hand derivatives exist everywhere and fail to agree on a dense set (e.g., the rationals); I don't know the answer to your question, but offhand would guess the answer is "no". Jan 7, 2017 at 22:32
• @Alephnull: The construction I had in mind is outlined in my answer to Are all continuous one one functions differentiable?. There exists a strictly increasing function $f$ having a jump discontinuity at every rational; the integral $F$ of such a function has one-sided derivatives at each point by the fundamental theorem, but due to the jump discontinuities of $f$, the one-sided derivatives disagree at each rational number. Jan 7, 2017 at 23:15

In Klambauer's Real Analysis pg. 101, he proves that if $f$ is a function on the open interval $(a,b)$ then there are most a countable number of points $x$ such that both $f_l'(x)$ and $f_r'(x)$ exist (including the infinite cases) but not equal.

I'll repeat his argument. Let $$A=\{x\in(a,b): \text{both }f_l'(x)\text{ and } f_r'(x) \text{ exist, but }f_l'(x)< f_r'(x)\}$$ $$B=\{x\in(a,b): \text{both }f_l'(x)\text{ and } f_r'(x) \text{ exist, but }f_l'(x)> f_r'(x)\}$$

For each $x\in A$, chose a rational number $r_1^{(x)}$ such that $f_l'(x)<r_1^{(x)}<f_r'(x)$. After this, pick two more rational numbers $r_2^{(x)}$ and $r_3^{(x)}$ such that the following hold: $$a<r_2^{(x)}<r^{(x)}_3<b$$ $$\text{whenever } r_2^{(x)}<y<x\text{ we can infer }\frac{f(y)-f(x)}{y-x}>r_1^{(x)}$$ $$\text{whenever } x<y<r_3^{(x)}\text{ we can infer }\frac{f(y)-f(x)}{y-x}<r_1^{(x)}$$ These inequalities imply that $$f(y)-f(x)< r_1^{(x)}(y-x)$$ whenever $y\neq x$ and $r_2^{(x)}<y<r_3^{(x)}$.

This process (with the Axiom of Choice) let's us construct a function $\varphi$ from $A$ into $\mathbb{Q}^3$ given by $\varphi(x)=(r_1^{(x)}, r_2^{(x)}, r_3^{(x)})$.

This function $\varphi$ is also injective. For suppose that $\varphi(x)=\varphi(y)$. This implies that $$(r_2^{(x)}, r_3^{(x)})=(r_2^{(y)}, r_3^{(y)})\,.$$ Recall that both $x$ and $y$ are within this open interval. Thus we can infer both of these inequalities $$f(y)-f(x)< r_1^{(x)}(y-x)$$ $$f(x)-f(y)< r_1^{(y)}(x-y)$$ Since we assumed that $r_1^{(x)}=r_1^{(y)}$, adding these inequalities gives $0<0$. Which is nonsense.

This shows that $A$ is countable. And by the same reasoning, $B$ is countable.

• I don't have anything important to add, but I don't think you need the axiom of choice here. Namely, you can first enumerate the rationals with your favorite bijection between $\mathbb{N}$ and $\mathbb{Q}$, and then e.g., you let $r_1$ be the least such rational(with respect to this weird enumeration) between $f'_l(x)$ and $f'_r(x)$, etc. Jan 19, 2018 at 20:21