function quadex_euler ( n )

%*****************************************************************************80
%
%% quadex_euler() uses euler() to solve quadex_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'quadex_euler():\n' );
  fprintf ( 1, '  Use euler() to solve quadex_ode().\n' );

  [ t0, y0, tstop ] = quadex_parameters ( );

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

  [ t1, y1 ] = euler ( f, tspan, y0, n );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of equal steps = %d\n', n );

  t2 = linspace ( t0, tstop, 101 );
  y2 = quadex_exact ( t2 );

  plot ( t1, y1, 'r-', t2, y2, 'b-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  s = sprintf ( 'quadex_ode(): euler(), n = %d', n );
  title ( s );
  legend ( 'Computed', 'Exact', 'Location', 'north' );
  filename = sprintf ( 'quadex_euler_%d.png', n );
  print ( '-dpng', filename );

  return
end
