Derive the quadrature rule of the form $\int_{-1}^1 f(x) dx \approx w_0 f(\alpha) + w_1 f'(\beta)$

Solution 1:

The reference to the sub-intervals is useless... We just want to determine the quadrature nodes ($\alpha, \beta)$ and weights ($\omega_0, \omega_1$) that make the rule exact for polynomial of degree as high as possible. So, forcing the rule to be exact for $f(x)=1, f(x) = x, f(x)=x^2, \cdots$, you get a system of equations that allows the calculation of $\alpha, \beta, \omega_0, \omega_1$:

$$ \omega_0 \cdot 1 + \omega_1 \cdot 0 = 2 \Leftrightarrow \omega_0=2 $$

$$ \omega_0 \cdot \alpha + \omega_1 \cdot 1 = 0\Leftrightarrow 2 \alpha+\omega_1=0 $$

$$ \omega_0 \alpha^2 + \omega_1 \cdot 2 \beta = \frac 23 $$

$$ \vdots $$