// solve y'(t) = -t*y , condition y(0) = -2 // g++ -std=c++11 gsl_ode_simple.cpp `gsl-config --libs` #include #include #include #include #include #include int func (double t, const double y[], double f[], void *params){ f[0] = -t*y[0] ; // y[0] = y, f[0] = y' = dy/dt = -t*y return GSL_SUCCESS; } void output(double t, double y, double exact){ std::cout<