This shows how to solve the nonlinear second order ode of the form
For this method to work, in the above \(p\left ( x\right ) \) must be either a function of \(x\) or a constant. It can not depend on \(y\). And in the term \(q\left ( y\right ) \left [ y^{\prime }\left ( x\right ) \right ] ^{2}\), \(q\left ( y\right ) \) must be only a function of \(y\) or a constant. It can not depend on \(x\).
For an example this method will work on \(y^{\prime \prime }+y^{\prime }+yy^{2}=0\) and on \(y^{\prime \prime }+\sin \left ( x\right ) y^{\prime }\left ( x\right ) +y\left ( y^{\prime }\right ) ^{2}=0\) and on \(y^{\prime \prime }+\sin \left ( x\right ) y^{\prime }+\left ( 1+y\right ) \left ( y^{\prime }\right ) ^{2}=0\) but not on \(y^{\prime \prime }+y^{\prime }+xyy^{2}=0\) and not on \(y^{\prime \prime }+\sin \left ( y\right ) y^{\prime }+yy^{2}=0\).
This is implemented in my ode solver as type 18. The first step is to divide (1) by \(y^{\prime }\left ( x\right ) \) which gives
The LHS is \(\frac {d}{dx}\left ( \ln y^{\prime }\right ) \) and the term \(q\left ( y\right ) y^{\prime }\left ( x\right ) \) is \(\left ( \frac {d}{dy}\int q\left ( y\right ) dy\right ) \frac {dy}{dx}=\frac {d}{dx}\int q\left ( y\right ) dy\). This is the reason why \(q\) can not depend on \(x\), In order to be able to evaluate the integral. Using this (3) now becomes
Integrating gives
And this is the reason why \(p\) can not depend on \(y\). In order to able to integrate the RHS above. Once \(\int q\left ( y\right ) dy\) and \(\int p\left ( x\right ) dx\) are evaluated, then \(y^{\prime }\) is found and this gives first order ode in \(y\) which is easily solved.