Find a quadrature rule that is exact for all polynomials of degree 2 or less

1.3k Views Asked by At

Where am I going wrong? I want to prove that it's accurate for deg 2 polynomials or less and my answer doesn't suggest that? Any tips on where I'm wrong ? Ive attached an image of my work below!

enter image description here

2

There are 2 best solutions below

4
On

Your principal problem is that you want to find parameters for $$ \int_0^1f(x)dx=w_0f(x_0)+w_1f(1) $$ but your following equations are for $$ \int_0^1f(x)dx=w_0f(0)+w_1f(x_0) $$ which is the mirrored situation of the task. The solutions are related, but not identical.


The equation to compare coefficients to find the conditions should have been $$ A+\frac12B+\frac13C=w_0(A+Bx_0+Cx_0^2)+w_1(A+B+C)\\ \left\{\begin{aligned} 1&=w_0+w_1\\[.5em] \frac12&=w_0x_0+w_1\\[.5em] \frac13&=w_0x_0^2+w_1 \end{aligned}\right. $$ a said before, similar to the ones you found, but not identical.

1
On

Using the two point Gauss Quadrature formula (here), there is a change of interval formula. This will yield an exact answer for polynomials of degree (2n-1) = 3 in our case (and therefore degree 2 as well).