MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

3 Put $g$ where I meant $g^{\prime}$.
The answer posted by Tom, as written is actually not true. A function in $H^1$ will not in general be differential almost everywhere; it depends on the dimension. In one dimension however it is indeed true that $H^1$ functions are differentiable almost everywhere (they are in fact absolutely continuous). There are two ways of seeing it is not in $H^1$. The simple answer is that if you differentiate the characteristic function of say $[0,\infty)$ then you will get the dirac measure. However let me just answer your question first:
Answer 1: Take any smooth compactly supported $\phi:\mathbb{R} \to \mathbb{R}$. By definition of weak derivative we have $\int \phi g^{\prime} dx = - \int \phi^{\prime} g dx$ where I've set $g=1_{[0,\infty)}$. This would have to be true for all such $\phi$ if the weak derivative existed. Now take $\phi^{\epsilon}$ to be supported in a neighborhood $(-\epsilon,\epsilon)$ of $0$. We are making the crucial assumption that $g$ g^{\prime}$is an integrable and hence it follows that$\int \phi^{\epsilon} g g^{\prime} \to 0$as$\epsilon \to 0$. However,$\phi^{\epsilon}$is smooth and so$\int \partial_x\phi^{\epsilon}(x)g(x)dx = \phi^{\epsilon}(0)$since$\phi$was assumed to have compact support in$(-\epsilon,\epsilon)$. Now just fix$\phi^{\epsilon}(0)=1$and we have that$\phi^{\epsilon}(0) \to 0$by the first integral equality. This is a clear contradiction. Notice that in fact that this really shows that$g' dx = \delta(x)$. Answer 2: Take$1_{[0,1]}$instead so that it is an$L^2([0,1])$function. This is in fact the fourier transform of a "sinc" function,$\sin(k)/k$up to some normalization constants. If we consider the$H^1$norm in frequency space we would need$\int_0^{\infty} |k|^2\frac{\sin(k)^2}{|k|^2} < \infty$which is clearly false. This requires being at ease with the fourier transform so if you're not, answer 1 is probably best. It is true in$\mathbb{R}^n$that if$u \in W^{1,p}$for$p > n$then$u$is a.e differentiable and equals a.e its weak gradient (see Evans chapter 5). This is to correct what Tom had said although perhaps we was thinking about the$n=1$case in which case$2 > 1$. Hope this helps! Dorian 2 wanted to bold face where i put my answers. The answer posted by Tom, as written is actually not true. A function in$H^1$will not in general be differential almost everywhere; it depends on the dimension. In one dimension however it is indeed true that$H^1$functions are differentiable almost everywhere (they are in fact absolutely continuous). There are two ways of seeing it is not in$H^1$. The simple answer is that if you differentiate the characteristic function of say$[0,\infty)$then you will get the dirac measure. However let me just answer your question first: Answer 1: Take any smooth compactly supported$\phi:\mathbb{R} \to \mathbb{R}$. By definition of weak derivative we have$\int \phi g^{\prime} dx = - \int \phi^{\prime} g dx$where I've set$g=1_{[0,\infty)}$. This would have to be true for all such$\phi$if the weak derivative existed. Now take$\phi^{\epsilon}$to be supported in a neighborhood$(-\epsilon,\epsilon)$of$0$. We are making the crucial assumption that$g$is integrable and hence it follows that$\int \phi^{\epsilon} g \to 0$as$\epsilon \to 0$. However,$\phi^{\epsilon}$is smooth and so$\int \partial_x\phi^{\epsilon}(x)g(x)dx = \phi^{\epsilon}(0)$since$\phi$was assumed to have compact support in$(-\epsilon,\epsilon)$. Now just fix$\phi^{\epsilon}(0)=1$and we have that$\phi^{\epsilon}(0) \to 0$by the first integral equality. This is a clear contradiction. Notice that in fact that this really shows that$g' dx = \delta(x)$. Answer 2: Take$1_{[0,1]}$instead so that it is an$L^2([0,1])$function. This is in fact the fourier transform of a "sinc" function,$\sin(k)/k$up to some normalization constants. If we consider the$H^1$norm in frequency space we would need$\int_0^{\infty} |k|^2\frac{\sin(k)^2}{|k|^2} < \infty$which is clearly false. This requires being at ease with the fourier transform so if you're not, answer 1 is probably best. It is true in$\mathbb{R}^n$that if$u \in W^{1,p}$for$p > n$then$u$is a.e differentiable and equals a.e its weak gradient (see Evans chapter 5). This is to correct what Tom had said although perhaps we was thinking about the$n=1$case in which case$2 > 1$. Hope this helps! Dorian 1 The answer posted by Tom, as written is actually not true. A function in$H^1$will not in general be differential almost everywhere; it depends on the dimension. In one dimension however it is indeed true that$H^1$functions are differentiable almost everywhere (they are in fact absolutely continuous). There are two ways of seeing it is not in$H^1$. The simple answer is that if you differentiate the characteristic function of say$[0,\infty)$then you will get the dirac measure. However let me just answer your question first: Answer 1: Take any smooth compactly supported$\phi:\mathbb{R} \to \mathbb{R}$. By definition of weak derivative we have$\int \phi g^{\prime} dx = - \int \phi^{\prime} g dx$where I've set$g=1_{[0,\infty)}$. This would have to be true for all such$\phi$if the weak derivative existed. Now take$\phi^{\epsilon}$to be supported in a neighborhood$(-\epsilon,\epsilon)$of$0$. We are making the crucial assumption that$g$is integrable and hence it follows that$\int \phi^{\epsilon} g \to 0$as$\epsilon \to 0$. However,$\phi^{\epsilon}$is smooth and so$\int \partial_x\phi^{\epsilon}(x)g(x)dx = \phi^{\epsilon}(0)$since$\phi$was assumed to have compact support in$(-\epsilon,\epsilon)$. Now just fix$\phi^{\epsilon}(0)=1$and we have that$\phi^{\epsilon}(0) \to 0$by the first integral equality. This is a clear contradiction. Notice that in fact that this really shows that$g' dx = \delta(x)$. Answer 2: Take$1_{[0,1]}$instead so that it is an$L^2([0,1])$function. This is in fact the fourier transform of a "sinc" function,$\sin(k)/k$up to some normalization constants. If we consider the$H^1$norm in frequency space we would need$\int_0^{\infty} |k|^2\frac{\sin(k)^2}{|k|^2} < \infty$which is clearly false. This requires being at ease with the fourier transform so if you're not, answer 1 is probably best. It is true in$\mathbb{R}^n$that if$u \in W^{1,p}$for$p > n$then$u$is a.e differentiable and equals a.e its weak gradient (see Evans chapter 5). This is to correct what Tom had said although perhaps we was thinking about the$n=1$case in which case$2 > 1\$.