static double[][] Outer(int g, int r, int x) { Rk4 solver = new Rk4( (double t, double[] V, double[] res) => { // Console.WriteLine(t); res[0] = rate(t) * V[0] - GmFemale(x+t) * (Middle(g,r,x+t,t) - V[0]); }, 1); double[][] reserves = solver.SolveAll(120-x, 0, steps, new double[] { 0.0 }); return reserves; }