function h = pendulum_conserved ( u, v )

%*****************************************************************************80
%
%% pendulum_conserved returns a conserved quantity for the pendulum ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    22 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real U, V: the current solution.
%
%  Output:
%
%    real H: the value of the conserved quantity.
%
  g = 9.8;
  l = 1.0;

  h = ( g / l ) * u.^2 + v.^2;

  return
end

