-1

I have given a system of differential equations of order two which I want to solve numerically using a Runge-Kutta method. However, I don't know how to transform the system into a system of order one.

Here is the system of equations:

$$\phi{_1}'' +g\sin{\phi_1} + \frac{m_2}{m_1+m_2}\frac{l_2}{l_1}\left(\cos(\phi{_1}-\phi{_2})\phi{_2}''+\sin(\phi{_1}-\phi{_2})(\phi{_2}')^2 \right)=0$$

$$\phi{_2}'' +g\sin{\phi_2} + \frac{l_1}{l_2}\left(\cos{(\phi_1}-\phi_2)\phi{_1}''+\sin(\phi_1-\phi_2)(\phi{_1}')^2 \right)=0$$



Would appreciate help. Thanks

XPenguen
  • 2,371

1 Answers1

1

Define $ω_1=ϕ_1'$, $ω_2=ϕ_2'$, $\mu=1+\frac{m_1}{m_2}$ and the coordinates of the linear system for the second derivatives \begin{alignat}{6} a_{11}&=\mu,\;&a_{12}&=\cos(ϕ_1−ϕ_2),\;&b_1&=\mu gl_1\sinϕ_1+l_2\sin(ϕ_1−ϕ_2)ω_2^2\\ a_{21}&=\cos(ϕ_1−ϕ_2),\;&a_{22}&=1,\;&b_2&=gl_2\sinϕ_2-l_1\sin(ϕ_1−ϕ_2)ω_1^2 \end{alignat} and then use Cramers rule to compute the derivative vector \begin{align} ϕ_1'&=ω_1\\ ϕ_2'&=ω_2\\ ω_1'&=-\frac{1}{l_1}·\frac{b_1·a_{22}-b_2·a_{12}}{a_{11}·a_{22}-a_{21}a_{12}}\\ ω_2'&=-\frac{1}{l_2}·\frac{a_{11}·b_2-a_{21}·b_1}{a_{11}·a_{22}-a_{21}a_{12}}\\ \end{align}


(see https://math.stackexchange.com/a/3931310/115115 for a complete derivation confirming the sign correction in $b_2$.)

Lutz Lehmann
  • 131,652
  • I made a mistake int the second equation should be like this: $\frac{l_1}{l_2}$ instead of $\mu$ in $b_2$. Additionally, I think you forgot $a_{21}$ (You have $a_{12}$ twice) – XPenguen Jan 05 '17 at 17:39
  • Done. I also changed the linear system to be for $(l_1ω_1')$ and $(l_2ω_2')$ and moved the length division and sign change to the final formula. – Lutz Lehmann Jan 05 '17 at 18:28