This is a late response to your question however, it never hurts know more math!
In order to calculate $\int_0^1 x^{4}f(x)\,dx$ you use the Method of Undetermined Coefficients. That is:
Let $f_{i}(x)=x^{i}$. Then, calculate $c=\int_0^1 x^{4}f_{i}(x)\,dx$ and $A_{0} f_{i}(x_{0})+A_{1}f_{i}(x_{1})$. From this, you will get an equation of the form $c=A_{0} x_{0}^{i}+A_{1}x_{1}^{i}$. In this problem, we have 4 unknowns hence to solve for $A_{0}, x_{0}, A_{1}, x_{1}$ you must create 4 equations using this method. From there you can solve for your variables.
The Method of Undetermined Coefficients can work with any weight function, using the integral $\int_a^b w(x)f(x)\,dx$ for each $f_{i}(x)=x^{i}$ as defined in the method above.
Let's look first at $\int_{-1}^{1} f(t) \ dt$.
We want the formula to evaluate $\int_{-1}^{1} dt, \int_{-1}^{1} t \ dt, \int_{-1}^{1} t^{2} \ dt, \int_{-1}^{1} t^{3} \ dt, \int_{-1}^{1} t^{4} \ dt, \int_{-1}^{1} t^{5} \ dt, \int_{-1}^{1} t^{6} \ dt $ and $\int_{-1}^{1} t^{7} \ dt$ exactly.
That leads to the following system of equations:
$$ 2 = \omega_{0} + \omega_{1}$$
$$ 0 = \omega_{0} x_{0} + \omega_{1} x_{1}+ \omega_{2}+\omega_{3}$$
$$ \frac{2}{3} = \omega_{0} x_{0}^{2} + \omega_{1} x_{1}^{2} + 2 \omega_{2} x_{2} + 2 \omega_{3} x_{3}$$
$$ 0 = \omega_{0} x_{0}^{3} + \omega_{1} x_{1}^{3}+ 3 \omega_{2} x_{2}^{2} + 3 \omega_{3} x_{3}^{2} $$
$$ \frac{2}{5} = \omega_{0} x_{0}^{4} + \omega_{1} x_{1}^{4}+ 4 \omega_{2} x_{2}^{3} + 4 \omega_{3} x_{3}^{3} $$
$$0 = \omega_{0} x_{0}^{5} + \omega_{1} x_{1}^{5} + 5 \omega_{2} x_{2}^{4} + 5 \omega_{3} x_{3}^{4} $$
$$\frac{2}{7} = \omega_{0} x_{0}^{6} + \omega_{1} x_{1}^{6} + 6 \omega_{2} x_{2}^{5} + 6\omega_{3} x_{3}^{5} $$
$$ 0 = \omega_{0} x_{0}^{7} + \omega_{1} x_{1}^{7} + 7 \omega_{2} x_{2}^{6} + 7\omega_{3} x_{3}^{6}$$
Solve the system using a numerical solver.
Then use the the fact that $$\int_{a}^{b} f(x) \ dx = \frac{b-a}{2} \int_{-1}^{1} f \Big(a+(1+t)\frac{b-a}{2} \Big) \ dt$$
Best Answer
This amounts to requiring the the rule is exact for polynomials of degree $\leq 2$. You will get $A_0=-\frac{59}{44}, A_1=\frac{81}{80}, A_2=\frac{719}{880}$.
From (1) we know that the degree is a least 2. To compute the actual degree, we just test the rule for polynomials of increasing order. Using the rule for $f(x)=x^3$ does not give the correct value for the integral, so the rule has degree 2.
It is not a Gaussian rule because it does not have the correct degree. If it was a Gaussian rule it would have degree 5.
Using the formula with $f(x)=e^x$ you get $$ \int_0^1 x e^x dx \approx \frac{81 e^{5/9}}{80}-\frac{59 e^{2/3}}{44}+\frac{729 e^{65/81}}{880}=1.00118 $$
The correct value can be computed using integration by parts... $\int_0^1 x e^x dx = 1$, so the absolute error is $0.00118$.