Let $f: \mathbb R^n \to \mathbb R$ be a measurable function. Let $\mathcal L$ be the set of linear functions $\mathbb R \to \mathbb R$.


Define the roughness $\mathcal Rf(x)$ of $f$ at $x \in \mathbb R^n$ by


$$\inf\_{L \in \mathcal L} \limsup\_{y \to x} \left | \frac{f(y) - f(x) - L(y-x)}{|y - x|} \right |.$$


We say that $f$ is *pseudo differentiable* if $\mathcal Rf(x) < \infty$ for all $x \in \mathbb R^n$.


In other words, $f$ is pseudo differentiable if the difference quotients approximate the function to within $O(|y - x|)$ everywhere.


**Question:** Is it true that if $f$ is pseudo differentiable, then $f$ is in the Sobolev space $W^{1, 1}\_\text{loc}?$


*Remarks:*


1. Note that $f$ is differentiable at $x$ if and only if $\mathcal Rf(x)$ is $0$.
2. In one dimension, the condition that $f$ is pseudo differentiable is equivalent to the upper and lower [Dini derivatives](https://en.wikipedia.org/wiki/Dini_derivative) being finite everywhere. In this case I believe pseudo differentiable implies (locally) absolutely continuous, and hence $W^{1,1}\_\text{loc}$.
3. In the definition of pseudo differentiable, the condition $Rf(x) < \infty$ holds for all $x$! (Instead of merely almost all $x$)



Pseudo differentiable functions
The function
$$
f(x) = \begin{cases} x\sin 1/x^2 & x\not= 0 \\ 0 & x=0 \end{cases}
$$
gives a counterexample. We have $f\in C^{\infty}(U)$ when we restrict to $U=\mathbb R\setminus \{ 0\}$, so if $f$ had a distributional derivative in $L^1\_{\textrm{loc}}$, it would have to be its classical derivative $f'=-(2/x^2)\cos (1/x^2)+\sin (1/x^2)$, but this fails to be integrable near $x=0$.


