There is an integration step I can not figure out and is frustrating.
We start from the equality $$ \dfrac{\partial^2\phi}{\partial x^2} = \dfrac{\partial V}{\partial \phi} $$ and by integration process we are supposed to get (eq. 10.8 in the textbook): $$ \dfrac{1}{2}\left(\dfrac{\partial\phi}{\partial x}\right) ^2 = V(\phi) $$
Maybe I'm just overcomplicating it but I can not understand how this is done.
$\phi =\phi(x,t)$ but for this case $\dfrac{\partial\phi}{\partial t}=0$ and $\phi$ approaches zeroes of $V(\phi)$ when $x\rightarrow\pm\infty$.
Then my idea was to integrate by $d\phi$ both sides to get the RHS of eq. 10.8 and for the LHS I tried integrating by parts using $$d\phi=\dfrac{\partial\phi}{\partial x}dx$$ but got no success yet, and also the fact is that I don't even think what I'm doing is correct since is $V(\phi)$ and not $\phi$ what tends to zero when $x\rightarrow \pm \infty$.
Any help would be appreciated