I'm just trying to understand how exactly derivatives are to be specified in C++ for use in the 4th order Runge-Kutta method.(adsbygoogle = window.adsbygoogle || []).push({});

I am implementing the method in C++ (though this part of my program isn't complete yet) however what I am looking to do is first specify the derivatives of the variables in the two first-order differential equations im working with:

θ' = ω

ω' = − g⁄R sin θ

(for modelling the motion of a single pendulum)

double theta - initial angular displacement (Radians)

double R - length of Pendulum Rod (Metres)

double g - gravitational constant (Distance/Time^2)

I just need a little help understanding how to specify the derivatives and basically what I'm doing when I am. (I'm familiar with calculus just not numerical solving algorithms).

Thanx.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Specifiying derivatives

**Physics Forums | Science Articles, Homework Help, Discussion**