function vanderpol_test ( )

%*****************************************************************************80
%
%% vanderpol_test() tests ode_midpoint_system on the vanderpol problem.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 September 2019
%
%  Author:
%
%    John Burkardt
%
  global mu

  fprintf ( 1, '\n' );
  fprintf ( 1, 'vanderpol_test:\n' );
  fprintf ( 1, '  Test ode_midpoint_system on the vanderpol problem.\n' );
  
  mu = 1.0;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Easy problem, mu = %g\n', mu )
  a = 0.0;
  b = 250;
  ya = [ 2.0, 0.0 ];
  n = 2000;
  [ xp, yp ] = ode_midpoint_system ( 'vanderpol(x,y)', a, b, ya, n );

  plot ( yp(1,:), yp(2,:), 'bo', 'markersize', 5 );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<-- U -->' );
  ylabel ( '<-- V -->' );
  label = sprintf ( 'vanderpol, mu = %g', mu );
  title ( label );
  filename = sprintf ( 'vanderpol_easy.png', n );
  print ( '-dpng', filename );
  pause ( 5 );

  return
end

