function stiff_value ( )

%*****************************************************************************80
%
%% stiff_value() evaluates the exact solution for various initial conditions.
%
%  Discussion:
%
%    y' = lambda * ( cos(t-t0) - y )
%    y(t0) = y0
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 June 2025
%
%  Author:
%
%    John Burkardt
%
  nt = 101;
%
%  Retrieve default values.
%
   [ lambda, t0, y0, tstop ] = stiff_parameters ( ); 
%
%  Default with t0 = 0, y0 = 0.
%
  t0 = 0.0;
  y0 = 0.0;
  [ lambda, t0, y0, tstop ] = stiff_parameters ( lambda, t0, y0, tstop );
  t1 = linspace ( t0, tstop, nt );
  y1 = stiff_exact ( t1 );
%
%  Try t0=0, y0=0.9.
%
  t0 = 0.0;
  y0 = 0.9;
  [ lambda, t0, y0, tstop ] = stiff_parameters ( lambda, t0, y0, tstop );
  t2 = linspace ( t0, tstop, nt );
  y2 = stiff_exact ( t2 );
%
%  Try t0=0, y0=1.5.
%
  t0 = 0.0;
  y0 = 1.5;
  [ lambda, t0, y0, tstop ] = stiff_parameters ( lambda, t0, y0, tstop );
  t3 = linspace ( t0, tstop, nt );
  y3 = stiff_exact ( t3 );
%
% t0 = 0.25, y0 = 0.5
%
  t0 = 0.25;
  y0 = 0.5;
  [ lambda, t0, y0, tstop ] = stiff_parameters ( lambda, t0, y0, tstop );
  t4 = linspace ( t0, tstop, nt );
  y4 = stiff_exact ( t4 );
%
%  Plot them.
%
  figure ( );
  hold ( 'on' );
    plot ( t1, y1, 'linewidth', 2 );
    plot ( t2, y2, 'linewidth', 2 );
    plot ( t3, y3, 'linewidth', 2 );
    plot ( t4, y4, 'linewidth', 2 );
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( '<---  t  --->' );
  ylabel ( '<---  y(t)  --->' );
  title ( 'stiff exact solution' )
  legend ( '(0,0)', '(0,0.9)', '(0,1.5)', '(0.25,0.5)' );
  filename = 'stiff_value.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

