Solving nonlinear differential equations in python
The problem is that you get 3 valid solutions for the direction at each point of the phase space (including double roots). But each selection criterion breaks down at double roots.
One way is to use a DAE solver (which does not exist in scipy) on the system y'=v, 4v^3-v=x^-2
The second way is to take the derivative of the equation to get an explicit second-order ODE y''=-2/x^3/(12*y'^2-1).
Both methods require the selection of the initial direction from the 3 roots of the cubic at the initial point.
I am trying to solve the differential equation 4(y')^3-y'=1/x^2 in python. I am familiar with the use of odeint to solve coupled ODEs and linear ODEs, but can't find much guidance on nonlinear ODEs such as the one I'm grappling with.
Attempted to use odeint and scipy but can't seem to implement properly
Any thoughts are much appreciated
NB: y is a function of x