# [pstricks] Searching for a numeric solution for coupled differential equation systems of order 2

Juergen Gilg gilg at acrotex.net
Thu May 24 22:21:06 CEST 2012

Dear PSTricks list,

is there anybody out there, knowing about how to generate a PS code for
"Runge-Kutta 4" to solve a "coupled differential equation system of
order 2"?

There is the need for such a code to animate a double-pendulum in real
time, following the coupled differential equations with the variables
(\varphi_1, \varphi_2) and their derivatives like:

(1)
l_1\ddot{\varphi}_1+\frac{m_2}{m_1+m_2}l_2\ddot{\varphi}_2\cos(\varphi_1-\varphi_2)-\frac{m_2}{m_1+m_2}l_2\dot{\varphi}_2^2\sin(\varphi_1-\varphi_2)+g\sin\varphi_1=0

(2)
l_2\ddot{\varphi}_2+l_1\ddot{\varphi}_1\cos(\varphi_1-\varphi_2)-l_1\dot{\varphi}_1^2\sin(\varphi_1-\varphi_2)+g\sin\varphi_2=0

Any help is appreciated!!!

Many thanks for every hint,

Jürgen

--
Jürgen Gilg
Austr. 59
70376 Stuttgart

tel   0711 59 27 88
email gilg at acrotex.net