Does the 1-D poisson's equation have monotonic potentials if $\rho=\rho(\phi(z))$? I am solving the 1-D poisson equation: 
$$\frac{d^2 \phi}{dz^2}=-4\pi\rho(\phi)$$
with the additional requirement that $\rho(\phi(z=0))=0$. If I start by multiplying each side by $\frac{d\phi}{d z}$ and integrate from 0 to $\phi '$ I get 
$$\frac{1}{2}\left(\frac{d\phi}{dz}\right)^2=-4\pi\int_0^{\phi '}\rho(\phi) \frac{d\phi}{d z} dz$$
so I have 
$$\frac{1}{2}\left(\frac{d\phi}{dz}\right)^2=-4\pi\int_0^{\phi '}\rho(\phi) d\phi$$
Because of the square on the left hand side I will only get solutions when the right hand side is positive. I find this requirement odd because you will always get that the derivative of the potential never changes sign and is always monotonic when the charge density is written in the form $\rho(\phi)$. Am I doing something wrong here or have I misinterpreted the result? 
More specifically If I provide a charge density that changes sign with $\phi$ will I be unsuccessful in finding a solution? 
Also for anyone who is familiar with it, this first series of steps is used in the derivation of the Child-Langmuir law for the thickness of a plasma sheath, but in the ion sheath problem $\rho$ does not change sign (See the Bohm Criterion if interested). 
 A: The system solves the Euler-Lagrange equations of the Lagrangian:
$$L\left(\phi, \frac{d\phi}{dz}\right) = \frac{1}{2}\left(\frac{d\phi}{dz}\right)^2 - 4\pi \int_0^{\phi(z)} \rho(s) ds$$
since the corresponding Lagrange equations are:
$$\frac{d^2\phi}{dz^2}= -4\pi \rho(\phi)\:.$$ 
As the Lagrangian does not explicitly depend on "time" $z$, "energy" is conserved along the solutions (varying $z$):
$$\frac{1}{2}\left(\frac{d\phi}{dz}\right)^2 + 4\pi \int_0^{\phi(z)} \rho(s) ds =E\:.$$
The constant $E$ can be determined from the initial conditions, e.g.  $\phi(0)$ and $d\phi/dz|_{z=0}$. Once $E$ has been fixed, the equation becomes:
$$\frac{d\phi}{dz} = \pm \sqrt{2E - 8\pi  \int_0^{\phi(z)} \rho(s) ds}\:.$$
The sign, once again can be fixed from the initial condition since it is the one of $d\phi/dz|_{z=0}$.
It seems to me that, at least locally, that equation can always be solved if $\rho$ is continuous, unless $d\phi/dz|_{z=0}=0$, situation which needs great care since the RHS (while it keeps being continuous) is not locally Lipschitz around the corresponding initial condition  $\phi(0)$.
