I was wondering why do you need 'n' to be even to use Simpson's rule? Why can't n be odd like in the trapezoidal rule?
It's more a consequence of the fact that n+1 has to be
odd, which consequently implies n is even.
The reason n+1, i.e. the number of function values needs to be odd, has to do with how Simpson's rule actually works in the first place.
Simpson's rule doesn't use straight lines to estimate areas under curves, but rather uses
parabolas. There is a theorem (which is provable, albeit a bit messy) that
any three points UNIQUELY define a parabola. This serves as a basis.
Because we need three points to uniquely define the parabola, as opposed to just two points, we need to group points in groups of three instead. So we'd group \(x_0, x_1, x_2\), then \(x_2, x_3, x_4\), then keep going up until \(x_{n-2}, x_{n-1}, x_n\). And these are the points of interest. The number of points we have is of course the number of function values we must therefore consider.
\(x_0\) is the first point. With \(x_0\), comes \(x_1\) and \(x_2\), so that's two more points. With \(x_2\), comes \(x_3\) and \(x_4\), and that's another two more points. This will keep going until we reach \(x_n\).
Notice how we started off with just
one single point, but then when we added
we always added two more points. When you add 2 to an odd number, you get an odd number.
Visualising it, when you add 2 to 1 you get 3, which is odd. When you add 2 to 3 you get 5 which is still odd. And you're only gonna be stuck with odd terms forever.
Hence, the odd number of function values, and thus the even number of sub-intervals.