The problem reads "I must calculate $\displaystyle \int _{-1}^1 f(x)x^2 dx$ via a quadrature rule of the form $\displaystyle \int _{-1}^1 f(x)x^2 dx ~A_0 f (x_0)+A_1 f(x_1)$ that is exact for polynomials with degree lesser or equal to 3."

Attempt: Not much. I don't understand why use the "f(x)" in the expression. Does this mean that f(x) is a polynomial of degree lesser or equal to 1?

The expression must be exact for polynomials up to degree 3. It's equivalent to say it must be exact for $\displaystyle f(x)x^2= 1$, $\displaystyle x$, $\displaystyle x^2$ and $\displaystyle x^3$. This makes $\displaystyle f(x)=\frac{1}{x^2}$, $\displaystyle \frac{1}{x}$, $\displaystyle 1$ and $\displaystyle x$.

Evaluating the expression, I get the following system of equations:

$\displaystyle \frac{A_0}{x_0 ^2}+\frac{A_1}{x_1 ^2}=2$

$\displaystyle \frac{A_0}{x_0}+\frac{A_1}{x_1}=0$

$\displaystyle A_0+A_1=\frac{2}{3}$

$\displaystyle x_0A_0+x_1A_1=0.$

If I understood well, I must solve for $\displaystyle x_0$, $\displaystyle x_1$, $\displaystyle A_0$ and $\displaystyle A_1$?

The system is not even linear... Hmm. I probably went wrong somewhere. I would appreciate a tip on this one, thanks in advance.