# Math Help - Numerical Methods - Quadrature formula

1. ## Numerical Methods - Quadrature formula

Can somebody show me how to do this...thx

Use the method of undetermined coefficients to determine the values w0, w1, x0 and x1 which ensure that the quadrature formula Q[f] = w0f(x0) + w1f(x1) has degree of precision equal to three for integrals of the form

1
∫ f(x)dx
-1

2. Originally Posted by pico24

Can somebody show me how to do this...thx

Use the method of undetermined coefficients to determine the values $\omega_0,\; \omega_1,\; x_0,\; x_1$ which ensure that the quadrature formula $Q(f) = \omega_0f(x_0) + \omega_1f(x_1)$ has degree of precision equal to three for integrals of the form

$\displaystyle \int_{-1}^1f(x)dx$
Let's try to make $Q(f)$ give the correct answer up to cubic polynomials.

So we have $\displaystyle \int_{-1}^1 f(x)dx = \omega_0(c_0+c_1x_0+c_2x_0^2+c_3x_0^3)+\omega_1(c_ 0+c_1x_1+c_2x_1^2+c_3x_1^3)$.

Rearranging we get $\displaystyle c_0\left(\omega_0+\omega_1-\int_{-1}^1dx\right)+c_1\left(\omega_0x_0+\omega_1x_1-\int_{-1}^1xdx\right)+c_2\left(\omega_0x_0^2+\omega_1x_1^ 2-\int_{-1}^1x^2dx\right)+c_3\left(\omega_0x_0^3+\omega_1x_ 1^3-\int_{-1}^1x^3dx\right)=0$.

As $c_i$ are arbitrary we see $\begin{cases} \displaystyle\omega_0+\omega_1=2\\\displaystyle\om ega_0x_0+\omega_1x_1=0\\\displaystyle\omega_0x_0^2 +\omega_1x_1^2=\tfrac23\\\displaystyle\omega_0x_0^ 3+\omega_1x_1^3=0\end{cases}$

Applying algebra leads to $\begin{cases}\displaystyle\omega_0=\omega_1=1\\\di splaystyle x_0=-\frac1{\sqrt3}\\\displaystyle x_1=\frac1{\sqrt3}\end{cases}$