1

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

tinlyx
  • 1,534
  • Please try to type your formulas, it makes your question better accessible. Also, it may serve as a review of your calculations, thus enabling to find errors before you need to actually ask the question. – Lutz Lehmann Apr 08 '18 at 14:36

2 Answers2

1

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.

Lutz Lehmann
  • 126,666
0

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).

Jokus
  • 95
  • There is only one sampling point free, $x_0$, the other is fixed as $x_1=1$. Gauß would apply if both sampling points were free. – Lutz Lehmann Apr 08 '18 at 16:18