function flame_euler ( n )

%*****************************************************************************80
%
%% flame_euler() uses euler() to solve flame_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Shirley Abelman, Kailash Patidar,
%    Comparison of some recent numerical methods for initial-value problems
%    for stiff ordinary differential equations,
%    Computers and Mathematics with Applications,
%    Volume 55, Number 4, 2008, pages 733-744.
%    
%    Cleve Moler,
%    Cleve's Corner: Stiff Differential Equations,
%    MATLAB News and Notes,
%    May 2003, pages 12-13.
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'flame_euler():\n' );
  fprintf ( 1, '  Use euler() to solve flame_ode().\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of equal steps = %d\n', n );
%
%  Get the parameters.
%
  [ t0, y0, tstop ] = flame_parameters ( )
%
%  Estimate the solution.
%
  tspan = [ t0, tstop ];

  [ t, y ] = euler ( @flame_deriv, tspan, y0, n );

  ye = flame_exact ( t );
%
%  Plot the solution curve.
%
  plot ( t, y, 'bo', ...
         t, ye, 'r-', 'linewidth', 3 );

  title ( sprintf ( 'flame\\_ode():, euler, DELTA = %g', y0 ) );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- X(T) --->' );
  legend ( 'Computed', 'Exact' );
%
%  Save a copy in a file.
%
  filename = 'flame_euler.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end

