function dydt = glycolysis_deriv ( t, y )

%*****************************************************************************80
%
%% glycolysis_deriv() evaluates the right hand side of glycolysis_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 January 2022
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Evgeni Selkov,
%    Self-oscillations in Glycolysis,
%    European Journal of Biochemistry,
%    Volume 4, 1968, pages 79-86.
%
%  Input:
%
%    real T, the current time.
%
%    real Y(2), the current solution.
%
%  Output:
%
%    real DYDT(2), the right hand side.
%
  u = y(1);
  v = y(2);

  [ a, b, t0, y0, tstop ] = glycolysis_parameters ( );
  dudt = - u + a * v + u^2 * v;
  dvdt =   b - a * v - u^2 * v;

  dydt = [ dudt; dvdt ];

  return
end
