

fun = @(x) 10*exp(-50*abs(x)) - 0.01./((x-0.5).^2+0.001) + 5*sin(5*x);

tol = 1e-10; %relative tolerance
I   = quadl(fun,-1.00,1.00,tol,0.1);
I