weak derivative of a nondifferentiable function I am reading a book on Sobolev and having trouble understanding a notion of weak derivative. I consider a function $(x-1)^+=\max(x-1,0),x\in[0,2]$, I have a problem at $x=1$, so it is continuous and "almost everywhere differentiable" now, does it have a weak derivative everywhere? Can we "quantify" that? I know that the derivative in classical sense is either $0$ or $1$ and delta function at one point...can I say similar statements about weak? 
Now I take a discontinuous function, say indicator function, would it have a weak derivative? 
thanks!
 A: The weak derivative of a locally integrable $u$, denoted $u'$, is a function such that 
$$\forall \varphi\in C^{\infty}_0(\Omega),\quad\int_{\Omega}u'(x)\varphi(x)\lambda(dx)=-\int_{\Omega}u(x)\varphi'(x)\lambda(dx),$$
where $\Omega$ is the open on which we are working and $C^{\infty}_0(\Omega)$ is the vector space of real-valued functions defined on $\Omega$, which have a compact support and are infinitely differentiable. 
When $u$ is a $C^1$ function, the weak derivative is equal to the usual derivative almost everywhere.
In this case, let us compute the weak derivative. Fix $\varphi\in C^{\infty}_0(\Omega)$ and define $u(x)=(x-1)^+$. We should have 
$$\int_0^2u'(x)\varphi(x)dx=\int_0^1(x-1)^+\varphi'(x)dx+\int_1^2(x-1)\varphi'(x)dx=-\int_1^2\varphi(x)dx,$$
so the weak derivative is almost-everywhere equal to the characteristic function of $(1,2)$.
Indicator functions have a weak derivative since these one are locally integrable functions. For example, with $u=\chi_{(0,1)}$, we have 
$$\int_0^2u(x)\varphi'(x)dx=\int_0^1\varphi'(x)dx=\varphi(1)-\varphi(0)=\delta_1(\varphi)-\delta_0\left(\varphi\right)     ,$$
so the weak derivative of $u$ is $\delta_0-\delta_1$ (which is not locally integrable, but it is still a distribution).
