# Break Second order ODE into a system of first order ODE's

1. Sep 1, 2011

### Trenthan

1. The problem statement, all variables and given/known data

I havent done this for several years and have forgotten. Kicking myself now over it since it looks like something so simple but i cannot figure it out.... I need to break this second order ODE into a system of first order ODE's in matrix form to use within a crank nicolson method.

$\frac{d\Theta^{2}}{dt^{2}} + c\frac{d\Theta}{dt} + \frac{g}{L}sin(\Theta) = 0$

3. The attempt at a solution

let
$\phi_{1} = \Theta$
$\frac{\phi_{1}}{dt} = \phi_{2}$
$\frac{\phi_{2}}{dt} = -c\phi_{2} - \frac{g}{L}sin{\phi_{1}}$

now problem being the $\sin{\phi}$, how do i take the phi out! K is meant to be the coefficients of the terms infront of phi, but in this case its within the sin :S

$\left[ {\begin{array}{cc} \frac{\phi_{1}}{dt} \\ \frac{\phi_{2}}{dt} \\ \end{array} } \right] = \left[ {\begin{array}{cc} 0 & 1 \\ unknown & -c \\ \end{array} } \right] \left[ {\begin{array}{cc} \phi_{1} \\ \phi_{2} \\ \end{array} } \right]$

Cheers Trent

Last edited: Sep 1, 2011
2. Sep 1, 2011

### lanedance

This is a non-linear DE, hence the difficulties

If theta was very small you could use the small angle approximation to linearise the equation
$$sin(\theta(t))\approx \theta(t)$$

3. Sep 1, 2011

### lanedance

now looking at crank-nicholson which is finite difference method, seems to be set up for partial DEs
http://en.wikipedia.org/wiki/Crank–Nicolson_method

as this is a 2nd order nonlinear ordinary DE, why not something like runge kutta?

4. Sep 1, 2011

### Trenthan

unfortunately its not, we are modelling a pendulum which is lubricated well** :(

5. Sep 2, 2011

### Trenthan

we have been instructed to use Crank-Nicholson for some stupid reason in our design brief.

Im looking up other methods iterative techniques such as newtons method which may be applied within the method....

Any suggestions or thoughts....?????

6. Sep 2, 2011

### lanedance

i haven't used it but eve4rything i see on crank-nicholson is for 2d (x,t) differntial equations, so not really sure how it applies here

7. Sep 2, 2011

### Trenthan

All good

Using the Crank-Nicholson approach, and than applying newtons law, which involves taking the jacobian etc and solving for the residue to be zero works.

Thanks for your time and help lanedance

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook