Various kinds of derivatives Let $f\colon \mathbb{R}\to \mathbb{R}$ be a measurable function. Let us introduce the following notions of "derivative" of $f$. 


*

*Classical derivative. The unique function $f'_c$ defined pointwise by the following:$$\lim_{h\to 0} \frac{ f(x+h)-f(x)}{h}- f'_c(x)=0,\qquad \forall x \in \mathbb{R},$$provided that the limit exists at all points.

*$L^p$ derivative. For a fixed $p\in (1, \infty)$, the unique function $f'_p$ such that $$\lim_{h\to 0} \int_{-\infty}^\infty \left\lvert \frac{f(x+h)-f(x)}{h}-f'_p(x)\right\rvert^p\, dx=0,$$provided that $f\in L^p$ and that such a function $f'_p$ exists.

*Distributional derivative. The unique distribution $f'_d$ such that $$\int_{-\infty}^\infty f(x)\phi'(x)\, dx=-\langle f'_d, \phi\rangle, \qquad \forall \phi \in C^\infty_0(\mathbb{R}),$$
provided that $f$ defines a distribution (i.e., $f\in L^1_{\mathrm{loc}}$).


The vague version of my question is: 

to what extent are these definitions mutually consistent? 

More precisely: 


*

*Suppose that $f'_c$ exists (at all points) and $f'_c \in L^p$. Is it true that $f'_p$ exists and $f'_c=f'_p$?

*Suppose that $f$ defines a distribution, that $f'_c$ exists at all points and that $f'_c$ defines a distribution. Is it true that $f'_d=f'_c$?

*Suppose that $f'_p$ exists. Is it true that $f'_p=f'_d$?

*Suppose that $f'_d$ is a continuous function. Is is true that $f'_c$ exists and $f'_c=f'_d$?

*(Suggested by Tomasz in comments) Suppose that $f'_d\in L^p$. Is it true that $f'_p$ exists and that $f'_p=f'_d$?


P.S.: Some information on this topic, and especially on question 3, can be found on the book An introduction to nonlinear dispersive equations by F.Linares and G.Ponce, Springer Universitext. Look for Exercise 1.9 on page 21.
 A: Partial answer:


*

*is true:
\begin{multline}
\int_{\bf R} \left\lvert \frac{f(x+h)-f(x)}{h}-f'_c(x)\right\rvert^p\, dx\leq\frac{1}{h}\int_{\bf R}\int_0^h \left\lvert f'_c(x+t)-f'_c(x)\right\rvert^p\,dt \, dx=\\
=\frac{1}{h}\int_0^h\int_{\bf R} \left\lvert f'_c(x+t)-f'_c(x)\right\rvert^p\,dx \, dt
\end{multline}
And the last expression tends to zero as $h\to 0$ (because translations are continuous in $L^p$).

*is true -- this is a simple application of product rule and fundamental theorem of calculus. It is applicable, because an everywhere differentiable function with integrable derivative is absolutely continuous.

*I don't really know.

*is true (up to a modification on a measure zero set). Consider $g(x)=\int_0^x f'_d$. Then $g$ is a $C^1$ function, and $f'_d$ is its classical derivative, and hence it's also its distributional derivative, so $f-g$ has weak derivative zero, so it must be constant (up to a set of measure zero), so $f$ is a $C^1$ function up to a set of measure $0$.

A: Let's begin with some preliminaries.
For a locally integrable function $g$, let $\iota_g$ denote the distribution $\varphi \mapsto \int g(x)\varphi(x)\,dx$ (when we want to distinguish between the function and the induced distribution, otherwise we also denote the distribution with $g$). Let $D$ be the distributional derivative operator, i.e. $DT[\varphi] = -T[\varphi']$. For an integrable function $h$, let $I(h) = \int_{-\infty}^\infty h(x)\,dx$. Let $u$ be your favourite test function with integral $1$. Then we can write every test function $\varphi$ as $\varphi = I(\varphi)\cdot u + \eta'$, where $\eta(x) = \int_{-\infty}^x \varphi(t) - I(\varphi)u(t)\,dt$.
We have the
Lemma: If $T$ is a distribution such that $DT = \iota_g$ for a locally integrable function $g$, then $T = \iota_{G+c}$ where $G(x) = \int_0^x g(t)\,dt$ and $c$ is an appropriate constant.
Proof: $G$ is a continuous (absolutely continuous, even) function; its distributional derivative is $\iota_g$:
$$\begin{align}
D\iota_G[\varphi] &= - \int_{-\infty}^\infty G(x)\varphi'(x)\,dx\\
&= -\int_0^\infty \left(\int_0^xg(t)\,dt\right) \varphi'(x)\,dx + \int_{-\infty}^0 \left(\int_x^0g(t)\,dt\right) \varphi'(x)\,dx\\
&= \int_0^\infty \left(\int_t^\infty (-\varphi'(x))\,dx\right) g(t)\,dt + \int_{-\infty}^0 \left(\int_{-\infty}^t \varphi'(x)\,dx\right) g(t)\,dt\\
&= \int_0^\infty\varphi(t)g(t)\,dt + \int_{-\infty}^0 \varphi(t)g(t)\,dt\\
&= \iota_g[\varphi].
\end{align}$$
Let $c := T[u] - \iota_G[u]$. Then $T = \iota_{G+c}$:
$$\begin{align}
\iota_{G+c}[\varphi] &= \iota_{G+c}[I(\varphi)\cdot u + \eta']\\
&= I(\varphi)\iota_{G+c}[u] - D\iota_{G+c}[\eta]\\
&= I(\varphi)(\iota_G[u] + c) - \iota_g[\eta]\\
&= I(\varphi)T[u] - DT[\eta]\\
&= I(\varphi)T[u] + T[\eta']\\
&= T[I(\varphi)\cdot u + \eta']\\
&= T[\varphi].
\end{align}$$
Together with the fact that for a locally integrable function $g$ we have $\iota_g = 0 \iff g = 0\: [\text{a.e.}]$, that will give us a stronger form of 4. and it's also useful in 2. and 5.


*

*We have the somewhat stronger result that it suffices that $f'_c$ exists almost everywhere and $f$ be absolutely continuous. The proof tomasz gave covers that situation.

*See the first part of the proof of the lemma. The integral of $f_c'$ has distributional derivative $\iota_{f_c'}$. But under the hypotheses that $f_c'$ exists everywhere, $f$ is the integral of $f_c'$ (plus a constant), so $f_c' = f_d'$.

*Also true. Let $\displaystyle q_h(f)(x) =\frac{f(x+h)-f(x)}{h}$. The assumption is that $q_h(f) \to f_p'$ in $L^p$, but then $q_h(f) \to f_p'$ in $\mathscr{D}'$. But $q_h(f) \to Df$ in $\mathscr{D}'$, so $\iota_{f_p'} =D\iota_f$. We can also see that without theory: $$\begin{align}
\int_{-\infty}^\infty f_p'(x)\varphi(x)\,dx &= \lim_{h\to 0} \int_{-\infty}^\infty q_h(f)(x)\varphi(x)\,dx\qquad \left(\varphi \in L^q\right)\\
&= \lim_{h\to 0} \frac1h \int_{-\infty}^\infty \left(f(x+h) - f(x)\right)\varphi(x)\,dx\\
&= \lim_{h\to 0} \frac1h \int_{-\infty}^\infty f(x)\left(\varphi(x-h) - \varphi(x) \right)\,dx\\
&= \lim_{h\to 0} \int_{-\infty}^\infty f(x) \frac{\varphi(x-h)-\varphi(x)}{h}\,dx\\
&= - \int_{-\infty}^\infty f(x)\varphi'(x)\,dx\qquad \left(q_{-h}(\varphi) \to \varphi' \text{ in } L^q\right)
\end{align}$$

*By the lemma, if $f_d'$ is locally integrable, then $f$ is (almost everywhere) the integral of $f_d'$ (plus a constant), so $f$ is differentiable at least in all Lebesgue points of $f_d'$ with $f_c'(x) = f_d'(x)$ there. If $f$ and $f_d'$ are continuous, then $f$ is everywhere differentiable with derivative $f_c' = f_d'$.

*Of course $f_d' \in L^p$ does not imply that $f\in L^p$, so that needs to be an additional assumption. But if $f \in L^p$ and $f_d' \in L^p$, then, by 4., $f$ is - possibly after modification on a null set - the integral of $f_d'$ and $f$ is almost everywhere differentiable, so the more general version of point 1. yields that $f_p'$ exists and equals $f_c' = f_d'$.
