function x=intfel(a,b,e) n=ceil(log((b-a)/e)/log(2)) fa=sin(a)+2-exp(a) for i=1:n-1 x=(a+b)/2 fx=sin(x)+2-exp(x) if fa*fx<0 b=x else a=x endif endfor x=(a+b)/2