0

I have this system of two differential equations of a second order. I got them from the Euler-Lagrange equations of double pendulum. I need to solve this using the Runge-Kutta numerical method, but my problem is to transform this system to a system of first-order equations.

\begin{align}\ \ddot x_1 (m_1l_1^2+m_2(l_1^2+2l_1l_2\cos(x_2)+l_2^2)) + \ddot x_2 (m_2(l_1l_2\cos(x_2)+l_2^2)) - (2 \dot x_1 \dot x_2+ \dot x_2^2) m_2l_1l_2\sin(x_2) + g(m_1+m_2)l_1\cos(x_1) + gm_2l_2\cos(x_1+x_2) = f_1,\end{align}

$$\ \ddot x_1 (m_2l_1l_2\cos(x_2) + m_2l_2^2) + \ddot x_2 m_2l_2^2 + m_2l_1l_2 \dot x_1^2 \sin(x_2) + gm_2l_2\cos(x_1+x_2) = f_2.$$

I will be glad of your help.

Тyma Gaidash
  • 13,576

1 Answers1

0

You have a linear system for $\ddot x_1,\ddot x_2$. Solve this á la Cramer and do the standard transformation from $$\ddot x=a(x, \dot x)$$ to $$\frac{d}{dt}(x,v)=(v,a(x,v)).$$

Also use the search function leading to previous answers like in Transform the double pendulum differential equations into a first order system

Lutz Lehmann
  • 131,652