function stiff_euler_backward_test ( n )

%*****************************************************************************80
%
%% stiff_euler_backward() uses the backward Euler method on stiff_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N: the number of steps to take.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'stiff_backward_euler_test():\n' );
  fprintf ( 1, '  Solve stiff_ode() using the backward Euler method.\n' );

  [ lambda, t0, y0, tstop ] = stiff_parameters ( );

  [ t1, y1 ] = stiff_euler_backward ( n );

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

  plot ( t1, y1, 'r-o', t2, y2, 'b-', 'linewidth', 3 );
  grid ( 'on' );
  xlabel ( '<-- t -->' );
  ylabel ( '<-- y(t) -->' );
  title ( 'stiff_ode(): backward Euler method' );
  legend ( 'Computed', 'Exact' );
  filename = 'stiff_euler_backward.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
