% Math 5610/6860 - Numerical Analysis I
% Computer lab #2, problem 2


% you can try different values of n, to convince yourself that the
% behavior remains for n large.
ns = 10:100; 
%ns = 1000:2000; 

% seq 2.a
figure(1);
x = 1./(ns.*log(ns));
alpha = 1./ns;
plot(x./alpha); xlabel('n'); ylabel('x_n/\alpha_n');
title('sequence 2.a. plot should converge to zero');

% seq 2.b
x = 1./ns;
alpha  = 1./log(ns);
figure(2);
plot(x./alpha); xlabel('n'); ylabel('x_n/\alpha_n');
title('sequence 2.b. plot should converge to zero');

% seq 2.c
x = (2*ns-1)./ns.^3;
alpha = 1./ns.^2;
figure(3);
plot(x./alpha); xlabel('n'); ylabel('x_n/\alpha_n');
title('sequence 2.c. plot should be bounded by a constant');
