function [ t, y ] = flame_euler ( n, delta )

%*****************************************************************************80
%
%% flame_euler uses the forward Euler method on the flame ODE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    21 March 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
%    real DELTA: the initial value for Y.
%
%  Output:
%
%    real t(n+1,1), y(n+1,1): the times and solution values.
%
  t = zeros ( n + 1, 1 );
  y = zeros ( n + 1, 1 );

  a = 0.0;
  b = 250.0;
  dt = ( b - a ) / n;

  t(1) = a;
  y(1) = delta;

  for i = 1 : n
    t(i+1) = t(i) + dt;
    y(i+1) = y(i) + dt * ( y(i)^2 - y(i)^3 );
  end

  return
end

