function blowup_euler ( n )

%*****************************************************************************80
%
%% blowup_euler() uses euler() to solve the blowup ODE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'blowup_euler()\n' );
  fprintf ( 1, '  Use euler() to solve the blowup ODE\n' );
  fprintf ( 1, '\n' );
%
%  Get the parameters.
%
  [ t0, y0, tstop ] = blowup_parameters ( );

  f = @ blowup_deriv;
  tspan = [ t0, tstop ];

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

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of equal steps = %d\n', n );
%
%  Plot the solution curve.
%
  ye = blowup_exact ( t )

  hold ( 'on' );
    plot ( t, y, 'ro', 'linewidth', 3 );
    plot ( t, ye, 'b-', 'linewidth', 3 );
  hold ( 'off' )
  title ( 'euler: blowup ODE' );
  legend ( 'Euler', 'Exact' );
  grid ( 'on' );
  xlabel ( '<--- T --->' );
  ylabel ( '<--- Y(T) --->' );
%
%  Save a copy in a file.
%
  filename = 'blowup_euler.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'blowup_euler():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
