Corollary 8.11 in the book "Functional Analysis, Sobolev Spaces and Partial Differential Equations" by Brezis states the following: Let $G\in C^1(\mathbb{R})$ be such that $G(0) = 0$ and let $u\in W^{1,p}(I)$ with $1\leq p\leq \infty$. Then $G\circ u\in W^{1,p}(I)$ and $(G\circ u)' = (G'\circ u)u'$.
There, $I$ is a possibly unbounded open interval and $W^{1,p}(I)$ denotes the corresponding Sobolev space. In a footnote on the same page, it is stated that the condition $G(0) = 0$ is essential if $I$ is unbounded and $p\neq \infty$, but I do not see why. I have taken a look into the proof and I guess the condition is used to conclude $G\circ u\in L^p(I)$.
Can somebody provide an example how the statement fails without the assumption $G(0) = 0$? Thank you in advance.
If $I$ has infinite measure and $p\neq \infty$ we have (as you guessed correctly yourself) a problem to show $G\circ u \in L^p(I)$.
We can take $u\equiv 0$, then we get $G(0) 1_I=G\circ u$. Hence, we obtain (with $\lambda$ denoting the Lebesgue measure) $$ \Vert G\circ u \Vert_{L^p(I)}^p = \vert G(0) \vert^p \cdot \lambda(I).$$ This means, for $G\circ u \in L^p(I)$ we need $G(0)=0$ as we assumed that $I$ has infinite (Lebesgue) measure.