I am having a problem applying composite Simpson's rule for the integral $$I=\int_0^2\dfrac{1}{x+4}dx$$ with $n=4$.
The exact value of the integral is about $0.405$, however, Simpson's is giving $0.8$, and by increasing the number $n$ up to $8$, Simpson's gives $1.6$ !!
The formula I'm using is $$I\approx \frac{1}{3}[f(0)+f(2)+2(f(1))+4(f(0.5)+f(1.5))]$$Can anyone help me figure out the problem ?