% g=@(x) x/sqrt(x^2+9);
g=@(x) x^2*log(x);
N=1;
I=zeros(10,1);
dx=zeros(10,1);
err=9*log(3)-3+1/9;
for i=1:15
%     n(i)=N;
    dx(i)=2/N;
    I(i)=comptrapz(1,3,g,N);
    N=N*2;
    
end
% dx=4./n;

figure()
loglog(dx,abs(I-err),dx,dx.^2)