function no_result = circle_demo()
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %  Demonstration of numerical integration     %
   %                                             %
   %  We integrate one quadrant of the unit      %
   %  circle, and multiply by 4 to find pi.      %
   %                                             %
   %  No argument required, just type:           %
   %  >> circle_demo                             %
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   
ntrials = 10;

for i = 1:ntrials
   N = 10*i^2; % Number of steps
   dx(i) = 1.0/N; % Step size
   
   % Euler
   integral = euler_1d(0, 0, dx(i), N, 'circle');
   euler_pi(i) = 4*integral(N+1);
   
   % RK2 (Midpoint method)
   integral = rk2_1d(0, 0, dx(i), N, 'circle');
   rk2_pi(i) = 4*integral(N+1);
   
end

hold off
plot(dx,euler_pi,'b')
hold on
plot(dx,rk2_pi,'r')
plot(dx,ones(ntrials)*pi,'g--')
