%% Example 3.4
% Gauss - Legendre quadrature

a   = 1;
b   = 8;
fun = @(x) log(x)./x;

n   = 5;
[x,w] = gauss_leg(a,b,n);
I   = dot(w,fun(x))