I am having some trouble with a math problem ( attached document). It is probably something easy, but I just can't see it. Thank you in advance!
You're right. Your single equation doesn't prove part (a) yet. Let me just review the situation for you:
We want to compute $\displaystyle \int_{-1}^1 f(x)\text{ dx}=\omega_0 f(-\alpha)+\omega_1 f(\alpha)$, where $\displaystyle f(x)=mx+b$, for $\displaystyle m\ne 0$. Taking the integral of the left hand side and evaluating the right hand side gives
$\displaystyle 2b=\omega_0(-m\alpha+b)+\omega_1(m\alpha+b)$
Expanding the terms:
$\displaystyle 2b=(\omega_0-\omega_1)(m\alpha)+(\omega_0+\omega_1)b$
Now, we have two systems of equations (by comparing the coefficients of each $\displaystyle m\alpha$ and $\displaystyle b$ on both sides):
$\displaystyle \omega_0-\omega_1=0$
$\displaystyle \omega_0+\omega_1=2$
Solving the system shows that $\displaystyle \omega_0=\omega_1=1$.
For part (b), I might apply the same strategy and see what happens.
I agree it is not very clear but to get a single value of $\displaystyle \alpha$ in (b) you must use the values from (a): $\displaystyle \omega_0= \omega_1= 1$.
For a quadratic function, $\displaystyle a_0+ a_1x+ a_2x^2$, the formula becomes $\displaystyle \int_{-1}^1 a_0+ a_1x+ a_2x^2 dx= f(-\alpha)+ f(\alpha)$.
It is easy to calculate that
$\displaystyle \int_{-1}^1 a_0+ a_1x+ a_2x^2 dx= 2a_0+ \frac{2}{3}a_2$ while $\displaystyle \omega_0f(-\alpha)+ \omega_1f(\alpha)=$$\displaystyle a_0- a_1\alpha+ a_2\alpha^2+ a_0+ a_1\alpha+ a_2\alpha^2= 2a_0+ 2a_2\alpha^2$.