Help setting up a set of nonlinear DEs for numerical solver

28 Views Asked by At

I am looking to solve the following nonlinear differential equations:

$c = cos(\alpha), s = sin(\alpha); R, W, p, L, \mu, m_1, m_2$ are all constants.

(1) $$ \frac{-spWR\exp(\mu (\beta - \alpha))}{m_2} = \dot \alpha^2(-Rc -Ls + R\beta s - R\alpha s + 2Rc) + \ddot \alpha(-Rs +Lc -R\beta c + R\alpha c + Rs) - 2\dot \alpha \dot \beta Rc - \ddot \beta Rs $$ (2)

$$ \frac{-cpWR\exp(\mu (\beta - \alpha))}{m_2} = \dot \alpha^2(-Rs +Lc - R\beta c + R\alpha c + 2Rs) + \ddot \alpha(Rc +Ls -R\beta s + R\alpha s - Rc) - 2\dot \alpha \dot \beta Rs + \ddot \beta Rc $$

(3)

$$\frac12 m_1R^2\ddot \beta = -pWR^2\exp(\mu (\beta - \alpha))$$

I am trying to figure out how I would go about solving this numerically. I'm trying to use MATLAB ODE45 but I don't know how to get these equations into first order for the ODE45 solver. Is there a way that I can manipulate these equations so that I can put them in a nonlinear DE solver?