function y = gear_exact ( t )

%*****************************************************************************80
%
%% gear_exact() evaluates the exact solution of gear_ode().
%
%  Discussion:
%
%    u' =   998 u + 1998 v
%    v' = - 999 u - 1999 v
%    u(0) = 1
%    v(0) = 0
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 June 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T(:): the evaluation times.
%
%  Output:
%
%    real Y(:,2): the exact solution values.
%
  n = length ( t );
  y = zeros ( n, 2 );

  y(:,1) = 2.0 * exp ( - t ) - exp ( - 1000 * t );
  y(:,2) =     - exp ( - t ) + exp ( - 1000 * t );

  return
end

