function Oct16()

% Apply quadl to the integral of x^k from 0 to 1.
% Set the absolute error tolerance to a large value. (Why?)
clc
for k=1:20
    I = 1/(k+1);
    Q = quadl(@(x) MyF(x,k),0,1,.1);
    err = abs(I-Q);
    fprintf('%2d  %10.3e\n',k,err)
end


function y = MyF(x,k)
y = x.^k;
