I'm struggling with the following problem:
What is the maximum degree of exactness that we can obtain with the following quadrature >formula $$\int_0^1 f(x)\frac{1}{\sqrt{x}}dx \approx w_0 f(x_0) + w_1 f(x_1)$$
Compute weights and nodes
I should use some theorem, but I can't understand which one! Also, I think that the maximum degree is $r=3$, because in this case, imposing the exactness I will end up with a system of $4$ equations in $4$ unknowns.
I choose a basis of $\mathbb{P}^{3} = \{1,x,x^2,x^3\}$, and I obtain
\begin{cases} w_0+w_1 = 2 \\ w_0x_0 + w_1x_1 = \frac23 \\ w_0x_0^2 + w_1x_1^2 = \frac25 \\ w_0 x_0^3 + w_1 x_1^3 = \frac27 \\ \end{cases}
but the solution seems too hard to do by hand. Am I missing something? How can I decide a priori the degree of exactness.