function [ u, v ] = pendulum_exact ( t )

%*****************************************************************************80
%
%% pendulum_exact returns the exact solution for the pendulum ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    26 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T(:): the current time.
%
%  Output:
%
%    real U(:), V(:): the exact solution.
%
  g = 9.8;
  l = 1.0;

  u =                    cos ( sqrt ( g / l ) * t );
  v = - sqrt ( g / l ) * sin ( sqrt ( g / l ) * t );

  return
end

