Update rungakutta
Update rungakutta

M_PI and its derivatives are not part of the C++ standard. You need to add these two lines for them to become visible. 

A better approach is to define the variable explicitly. This leads to better portability and much less code to compile. 

constexpr double my_pi_4 = 0.785398163397448309616;

you can stick it in the function or the main to constrain its scope to just your computation or use.
stillwater-sc/universal,stillwater-sc/universal,stillwater-sc/universal,stillwater-sc/universal