Can someone help to solve a non-linear ODE using the Runge-Kutta method?

115 Views Asked by At

I am doing a literature survey on charged particle dynamics. In a paper the plots between the parameters $(r, \theta, \phi)$ as $r$ vs $\theta$, $\phi$ ($\theta$ vs $\phi$) of the equation : $$ \frac{d^2 \theta(t)}{dt^2} = \frac{1}{r(t)} \left(-2 \frac{dr(t)}{dt} \frac{d\theta(t)}{dt} - r(t) \left(\frac{d\phi(t)}{dt} + \Omega\right)^2 \sin \theta(t) \cos \theta(t) \right) + \\ + q \left(r(t) \frac{d\phi(t)}{dt} \sin \theta(t)\right) B_r - \frac{dr(t)}{dt} B_\phi. \\ \Omega = 4.5. $$ using Runge-Kutta method is given. I have tried to reproduce the same but cant. Any suggestion or guide would be great. Bring down second order to first order is of no help as the three variable (parameters) are still in the equation.