function y = tough_exact ( t )

%*****************************************************************************80
%
%% tough_exact() returns the exact solution for the tough ODE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 November 2020
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Ernst Hairer, Syvert Norsett, Gerhard Wanner,
%    Solving Ordinary Differential Equations, I: Nonstiff Problems,
%    Springer, 1987.
%
%  Input:
%
%    real T(:): the current time.
%
%  Output:
%
%    real Y(4): the exact solution.
%
  t = t(:);

  y1 = exp ( sin ( t.^2 ) );
  y2 = exp ( 5.0 * sin ( t.^2 ) );
  y3 = sin ( t.^2 ) + 1.0;
  y4 = cos ( t.^2 );

  y = [ y1, y2, y3, y4 ];

  return
end

