Runge-Kutta Numerical Solutions to Differential Equations
Mathematical Computation

Runge-Kutta Numerical Solutions to Differential Equations

This is an implementation of the RK4 Method to solving differential equations implemented using C++.

  • Date: 23 Mar 2020
  • Role: Hobby Developer

ARK (Angel’s Runge-Kutta) is a personal project / C++ macro I wrote to numerically solve first and second order differential equations using the Runge-Kutta Method. This algorithm is implemented using C++, which I chose for its speed and malleability. Examples of ARK solving the exponential ODE and the Simple Harmonic Oscillator ODE can be seen below!

I also wrote a python file to plot the analytic solutions of these ODEs against the numerical solutions from ARK. This can be found as rk4_analysis.py in both folders. You may also find a file called derivatives.cpp which calculates the value of a derivative at a certain point.

This personal project is in active development, so please feel free to submit issues or a pull request!