I can't get Simpson's Rule to work properly in Maple for f(x)=cos(e^-x)
According to Wolfram Alpha, I should be getting something like -0.5. Clearly that's not what I'm getting. Please help?
> f := proc (x) options operator, arrow; cos(6*exp(-x)) end proc; x -> cos(6 exp(-x)) S := evalf(int(f(x), x = 0 .. 1)); -0.4411788573 S1 := evalf((1/6)*(1+0)*(f(0)+4*f(1)+f(2))); -0.1215440391 S2 := evalf((1/12)*(1+0)*(f(0)+4*f(1)+2*f(2)+4*f(3)+f(4))); 0.3979663797 S-S1; -0.3196348182 100*(S-S1)/S; 72.45016685 S-S2; -0.8391452370 100*(S-S2)/S; 190.2052247