Modified version of Simpson Rule I'm supposed to use some different version of Simpson's Rule in my Numerical Methods homework to compute some areas, considering the non-uniform spacing case . 
Namely, I've got two equal length vectors $x,y$ representing the pairs $(x_i,f(x_i))$ and the components of the $x$ array aren't equally spaced.
Is there some modified version of Simpson's Rule that fits my purposes  ? I couldn't find anything online. I know that I can just use Trap. Rule, but I was specifically asked to use Simpson's Rule.
 A: Simpson's Rule is generated by fitting a quadratic curve to each set of neighbouring three points. If the intervals are unequal you would have to generate your own formula to fit the data.
A: If you want to use Simpson's rule with Taylor polynomials and unequally spaced intervals you can look at the derivation in https://www.math.ucla.edu/~yanovsky/Teaching/Math151A/hw6/Numerical_Integration.pdf . (See Section 3, page 2). It doesn't have the derivation, but it has enough to use the derivation within as a guide.
I'll do my part and try to write out some of it. Consider the integral of $f(x)$ between the points $x_0$, $x_1$, and $x_2$. Here the three points are needed to describe a parabolic function.
$\int_{x_0}^{x_2} f(x) dx$ = $\int_{x_0}^{x_2} \left [f(x_1) + f'(x_1) (x - x_1) + (1/2) f''(x_1) (x-x_1)^2 + (1/3) f'''(x_1) (x-x_1)^3 + \mathcal{O}(f^{(4)}(\xi) \right ] dx$.
So now, taking this integral you'll get:
$f(x_1)(x_2 - x_0) + \frac{1}{2} f'(x_1) \left[(x_2-x_1)^2 - (x_0 -x_1)^2 \right] + \frac{1}{6} f''(x_1) \left[(x_2 - x_1)^3 - (x_0 - x_1)^3)\right] + \frac{1}{24} f'''(x_1) \left[(x_2-x_1)^4 -(x_0 - x_1)^4 \right]+ \mathcal{O}(f^{(4)}(\xi)$.
Now for equally spaced intervals $x_1 - x_0$ = $x_2 - x_1$, and so this reduces to the common expression for Simpson's rule (more in the referenced pdf).
If you can't accurately estimate the derivatives you could use a different polynomial approximant besides Taylor polynomials, such as the Lagrange Polynomials (http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html).
 To see a derivation of it you can see here, (Easa, S. M. (1988). Area of irregular region with unequal intervals. Journal of Surveying Engineering, 114(2), 50-58..
That approximant doesn't require knowledge of the derivatives of the function, but it'll only be accurate to $f'''(\xi)$, at least from what I can remember, rather than $f^{(4)}$, like the Taylor polynomial approximant.
