Solution (source code)

= Solution

For $p\ne0,\pm1$, separate variables and use <partial fraction decomposition>:
$$
\frac{dp}{p(1-p^2)}=-\frac{dx}{2x},\qquad
\frac1{p(1-p^2)}=\frac1p+\frac{p}{1-p^2}.
$$
Integration yields
$$
\log|p|-\frac12\log|1-p^2|=-\frac12\log|x|+C_0.
$$
On any connected solution interval, absorb the fixed signs into a real constant to write
$$
\boxed{\frac{xp^2}{1-p^2}=C,\qquad
p^2=\frac{C}{x+C}}.
$$
The two real signs of the square root are chosen consistently on a branch where $C/(x+C)>0$. The constant solutions of the reduced equation are $p=0,1,-1$. The original equation excludes the last two; $p=0$ is retained by $C=0$ for $x\ne0$.