Let $\phi \in L^1$. How to show that f is continuously differentiable? Problem:
Let $\phi \in L^1([0,1])$. Define the function $f: \mathbb{R} \to \mathbb{R}$ by the integral
$$f(t) = \int_0^1 |\phi(x)-t|dx$$
a) show that f is continuous
b) show that if $m[(\phi=t)]=0$ on an interval than $f$ is continuously differentiable on that interval
c) show that if $f$ is continuously differentiable on an interval than $m[(\phi=t)]=0$ for all $t$ on that interval
What I've tried:
for $a)$ I've tried to show that the function $f$ is Lipschitz continuous with $L=1$:
Proof: $$|f(t)-f(s)|=|\int_0^1 |\phi(x) -t| - |\phi(x) -s|\space dx\space| \le \int_0^1||\phi(x)-t-\phi(x)+s||\le|s-t|=|t-s|$$
I think this is correct. I had more problems with $b)$. This is what I've done:
Since I have to show that the function is $C^1$ on an interval I've chosen a $\delta \gt 0$ around $t$ and I've tried to show that this limes exist and is finite:
$$\lim_{h \to 0}\frac{f(t+h)-f(t)}{h}=\lim_{h \to 0}\int_{[x\in[0,1|:\phi(x)\le t-\delta]}\frac{|\phi(x)-t-h|-|\phi(x)-t|}{h}\space dx+\int_{[x\in[0,1|:t-\delta\lt\phi(x)\le t+\delta]}\frac{|\phi(x)-t-h|-|\phi(x)-t|}{h} \space dx + \int_{[x\in[0,1|:\phi(x)\gt t+\delta]}\frac{|\phi(x)-t-h|-|\phi(x)-t|}{h}\space dx= A + B + C$$
Then, to evaluate the first integral we know that $\phi \le t+\delta$. For this reason $|\phi(x)-t-h|$ and $|\phi(x)-t|$ are lower than 0 and if we want to remove the absolute value we have to multiply everything by $-1$
$$A =\lim_{h \to 0}\int_{[x\in[0,1|:\phi(x)\le t-\delta]}\frac{-\phi(x)+t+h+\phi(x)-t}{h}\space dx =\lim_{h \to 0}\int_{[x\in[0,1|:\phi(x)\le t-\delta]}\frac{h}{h} =m[x\in[0,1|:\phi(x)\le t]$$
By doing the same reasoning as for the integral $A$ we notice that for the integral $C$ $\phi(x) \gt t+\delta$. For this reason we are allowed to remove the absolute value and we get:
$$C = \lim_{h\to 0}\int_{[x\in[0,1|:\phi(x)\gt t+\delta]}\frac{\phi(x)-t-h-\phi(x)+t}{h}\space =\int_{[x\in[0,1|:\phi(x)\gt t+\delta]}\frac{-h}{h}\space dx = -m[x\in[0,1|:\phi(x)\gt t]$$
And last we evaluate part B
$$B =\int_{[x\in[0,1|:t-\delta\lt\phi(x)\le t+\delta]}\frac{|\phi(x)-t-h|-|\phi(x)-t|}{h} \space dx \to m[x\in[0,1|:t-\delta\lt\phi(x)\le t+\delta] \to 0 \space as\space (\delta \to 0) \space by \space assumption$$
$$\implies A+B+C=m[x\in[0,1|:\phi(x)\le t]-m[x\in[0,1|:\phi(x)\gt t]$$
which is continuous.
For part $c)$ I sincerely don't know how to do. I've thought that since the function is continuous then $\lim_{h \to 0}\frac{f(t+h)-f(t)}{h}$ exist and is bounded. This tells me that I could use dominated convergence theorem and look only at the integral $B$ (since the other one are not interesting to conclude that $m[(\phi=t)]=0$ on an interval. Am I right? Could you please say if what I've done until now it's correct and/or give me some hint for doing part $c)$?
 A: I think you are following a reasonable approach in part b), however it's not clear to me that your manipulation of limits is correct. Write the LHS as $I(h)$. You know that 
$$I(h) = A(h, \delta) + B(h, \delta) + C(h, \delta)$$ 
for any value of $\delta$. Therefore also 
$$I(h) = \lim_{\delta \rightarrow 0} A(h, \delta) + \lim_{\delta \rightarrow 0} B(h, \delta) + \lim_{\delta \rightarrow 0} C(h, \delta) $$
and 
$$\lim_{h \rightarrow 0} I(h) = \lim_{h \rightarrow 0}\lim_{\delta \rightarrow 0} A(h, \delta) + \lim_{h \rightarrow 0}\lim_{\delta \rightarrow 0} B(h, \delta) + \lim_{h \rightarrow 0}\lim_{\delta \rightarrow 0} C(h, \delta) $$
But what you are using is a version of this where the order of the double limits on the RHS (at least for $A$ and $C$) has been reversed. It's not clear to me how you justify this reversal. At best you need to go through the limits at each step and justify exactly how this is done. The limit for $B$ is correct, I am sure, but you haven't really justified it either. You have to bound the integrand from above to show that the integral goes to zero. You can do this for all $h$, not just in the limit, so there shouldn't be any problem with the order of limits here. 
As for part c), if you can fix your reasoning for part b), you can probably make it work backwards if you can bound the integrand of $B$ from below. This isn't too tricky.
