function dydt = double_well_deriv ( t, y )

%*****************************************************************************80
%
%% double_well_deriv() evaluates the derivative of double_well_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 June 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T: the current time.
%
%    real Y(:,2): the current solution.
%
%  Output:
%
%    real DYDT(:): the right hand side of the ODE.
%
  q = y(1);
  p = y(2);

  [ u, dudq ] = double_well_potential ( q, p );

  dqdt = p;
  dpdt = - dudq;

  dydt = [ dqdt; dpdt ];

  return
end

