function dydt = reaction_deriv ( t, y )

%*****************************************************************************80
%
%% reaction_deriv() evaluates the right hand sides of a reaction ODE.
%
%  Discussion:
%
%    The chemical reaction is A+B -> C with rate k.
%
%    dAdt = - kAB
%    dBdt = - kAB
%    dCdt = + kAB
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T, Y(3): the time and variable values.
%
%  Output:
%
%    real DYDT(3): the right hand sides of the ODE.
%
  [ k, t0, y0, tstop ] = reaction_parameters ( );

  a = y(1);
  b = y(2);
  c = y(3);

  dadt = - k * a * b;
  dbdt = - k * a * b;
  dcdt = + k * a * b;
  
  dydt = [ dadt; dbdt; dcdt ];

  return
end
