function quadratic_euler_error ( )

%*****************************************************************************80
%
%% quadratic_euler_error displays initial and final Euler errors for quadratic problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    29 October 2019
%
%  Author:
%
%    John Burkardt
%
  n = 2;
  a = 0.0;
  b = 2.0;
  y0 = 10.0;

  while ( n <= 128 )
    [ t, y ] = quadratic_euler ( n, a, b, y0 );
    e = y(2) - quadratic_exact ( t(2), y0 );
    fprintf ( 1, '  %d  %g  %g  %g\n', n, t(2), y(2), e );
    n = n * 2;
  end

  n = 2;
  a = 0.0;
  b = 2.0;
  y0 = 10.0;

  while ( n <= 128 )
    [ t, y ] = quadratic_euler ( n, a, b, y0 );
    e = y(n+1) - quadratic_exact ( t(n+1), y0 );
    fprintf ( 1, '  %d  %g  %g  %g\n', n, t(n+1), y(n+1), e );
    n = n * 2;
  end

  return
end

