function y=gauss3pts(fh,a,b)
%assign sample points and weights
y3=[-sqrt(3/5),0,sqrt(3/5)];
w3=[5/9,8/9,5/9];
c1=(b-a)/2;
c2=(a+b)/2;
sum=0;
for i=1:3
    x=c1*y3(i)+c2;
    sum=sum+w3(i)*feval(fh,x);
end
y=c1*sum;