% Quadrature of singular integrands with chebfun
% Testing by RMC 2011
x = chebfun('x',[0,1]);
a = 1-eps;
y = x.^(-a);
relerr = (1-a)*sum( y )-1
y2 = cos(x).*y;
sum(y2)