function expsin_rk2 ( )

%*****************************************************************************80
%
%% expsin_rk2 approximates the expsin problem using rk2.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    05 November 2019
%
%  Author:
%
%    John Burkardt
%
  dydt = @ expsin_deriv;
  t0 = 0.0;
  tstop = 10.0;
  tspan = [ t0, tstop ];
  y0 = 1.0;
  n = 100;
 
  [ t, y ] = rk2 ( dydt, tspan, y0, n );

  plot ( t, y, 'r-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- Y(T) --->' );
  title ( 'EXPSIN problem approximated by rk2' );
  filename = 'expsin_rk2.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

