void AnalyticJacob // a function that codes the analytic expression... // ...of the forcing function and its Jacobian matrix... // ...for the sample problem (double x_ [], // argument of the sample forcing function int dim, // dimension of the sample problem double J [MAX_DIM][MAX_DIM], // value of Jacobian matrix and... double F []); // ...value of the sample forcing function at x_ [] void AnalyticJacob (double x_ [], int dim, double J [MAX_DIM][MAX_DIM], double F []) { double beta1 = 1.0e+3; double beta2 = 1.0e-3; if (dim != 2) abort (); // Dx0 / Dt = (1 - x0) - beta1 x0 x1 // Dx1 / Dt = -beta2 x0 x1 F [0] = (1 - x_ [0]) - beta1 * x_[1] * x_ [0]; F [1] = -(x_[1] * x_ [0]) * beta2; J [0][0] = -1 - beta1 * x_ [1]; J [0][1] = -beta1 * x_ [0]; J [1][0] = -beta2 * x_ [1]; J [1][1] = -beta2 * x_ [0]; }