# Weak derivative of $u(x)=|x|$ not belong in $W^{1,p}(-1,1)$

Consider the functión $$u \in W^{1,p}(-1,1)$$, defined by $$u(x)=|x|$$, we know its weak derivative is $$g(x)=\left \{ \begin{matrix} 1 & \text{if }x\in(0,1) \\ -1 & \text{if } x \in (-1,0) \end{matrix} \right..$$ By intregation by parts is straightforward verify this. But I want to prove that $$g \notin W^{1,p}(-1,1)$$. If we suposse that $$g$$ has a weak derivative then exist a $$h \in L^{p}(-1,1)$$, which satisfies $$\varphi(1)-\varphi(0)+\varphi(-1)-\varphi(0)=\int_{-1}^{1} h(t)\varphi(t)dt$$for any $$\varphi \in C_{c}^{1}(-1,1)$$. I tried to get a contradiction evaluating by concrete test functions like $$\varphi(t)=t$$ or $$\varphi(t)=1$$ but I don't get any interesting. Which kind functions would help me? or there is another aproach?

For any $$\varphi \in C_c^1((-1,1))$$ satisfying $$\varphi(0) = 0$$, we have $$\int_{-1}^1 h(t) \varphi(t)\,dt = 0$$. However, the set of all such $$\varphi$$ is dense in $$L^q((-1,1))$$. Hence we must have $$h=0$$ which is absurd.
(Or, find a sequence of such $$\varphi_n$$ which converges a.e. and boundedly to $$\operatorname{sgn} h$$, and use dominated convergence to conclude $$\int_{-1}^1 |h(t)|\,dt = 0$$.)
Any function in $$W^{1,p}(-1,1)$$ is absolutely continuous (to be precise, any $$f\in W^{1,p}(-1,1)$$ has an absolutely continuous representative).
Your function $$g$$ is clearly not even continuous, hence it cannot belong to $$W^{1,p}(-1,1)$$.