C++ (Qt)#include <iostream>#include <fstream>#include <specmath/ode.h> struct dynamical_system{ dynamical_system(const double & b = 1.0) : _b(b) {} void operator()(const double & v, const double & /*t*/, double & res) const { res = -_b*v; } private: double _b;}; int main(){ std::ofstream out("data.txt"); double v = 1.0; // init velocity const double t0 = 0.0; const double t = 1.0; const double dt = 0.1; // ode step const double b = 3; auto observer = [&](const double & v, const double & t) { out << t << " " << v << std::endl; }; specmath::rk4_ode_solver<double>::integrate(dynamical_system(b), v, t0, t, dt, observer); std::cout << v << std::endl; return 0;}