How is the Runge-Kutta method implemented on this differential equation:

$$ \frac{d^2 \theta}{dt} = -\frac{g}{l} \theta $$

(pendulum motion) which is in polar coordinates?

Let: $c = \frac{g}{l}$

So the first step is:

$$a1 = y_2 dt $$ $$b1 = -c y_1 dt $$

Is this correct? How do I continue from here?

  • $\begingroup$ It does not matter what type of coordinates you use when applying RK, only the form of the equation. First write the equation as a coupled system of first order equations. Taking $y_1=\theta$ and $y_2 = \frac{d\theta}{dt}$ the system can be written $\pmatrix{\frac{dy_1}{dt}\\ \frac{dy_2}{dt}} = \pmatrix{y_2\\-\frac{g}{l}y_1}$. This equation is now on the standard form $\frac{d\vec{y}}{dt} = \vec{f}(\vec{y})$ and you can apply the standard Runge-Kutta. $\endgroup$ – Winther Jan 30 '16 at 16:34
  • $\begingroup$ @Winther I have updated my answer, could you have a look? $\endgroup$ – DoubleOseven Jan 30 '16 at 17:06
  • $\begingroup$ I don't understand what you are trying to do with these three equations. Some words might help. See this page for how to apply the RK method. $\endgroup$ – Winther Jan 30 '16 at 17:07
  • $\begingroup$ @Winther I have already looked at that page, but because I have a vector equation I get cofused. I have edited the question :) $\endgroup$ – DoubleOseven Jan 30 '16 at 17:09
  • $\begingroup$ For a similar problem see math.stackexchange.com/questions/1633224/… with code and corrections. $\endgroup$ – Lutz Lehmann Jan 30 '16 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.