Ok basically the output above appears to be oscillatory the pendulum swinging between 1.4rad and -1.4rad. My problem comes when i attempt to apply an initial velocity (y[0] = 2) in this case the velocity only increases during the output (as in the first example output), would anyone be able to...
Im using a C++ class to try and model the motion of a simple pendulum using numerical analysis, at this stage of my implementation I am trying to produce oscillatory output values of theta and v denoting the displacement and velocity of the pendulum of a period of time. I have successfully...
I'm just trying to understand how exactly derivatives are to be specified in C++ for use in the 4th order Runge-Kutta method.
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...