Finding parameters for a quadrature formula

53 Views Asked by At

To compute the integral $\int_0^1f(x) dx$ numerical I want to use the following quadrature formula:

$$Q(f)=\omega_0f(x_0)+\omega_1f(1)$$

The question is how one should choose $\omega_0,\omega_1 \text{ and } x_0$ such that the formula yields the best possible approximation for the value of the integral.

I know how to solve this problem if $x_0$ is given. And I tried to use the method here, but I failed.

Can someone help me?

1

There are 1 best solutions below

0
On

Hint
The consistency equations are $$\omega_0 x_0^k + \omega_1 = \frac1{k+1}$$ You want this to hold for as many $k$ as possible.
Clearly you can try to solve

$$\omega_0 + \omega_1 = 1\\ \omega_0 x_0 + \omega_1 = \frac12\\ \omega_0 x_0^2 + \omega_1 = \frac13$$

To get an order-3 QF. Order-4 won't work because of the bad choice of $1$ as the second knot. In trying to solve the last constraint you'll end up with the equation $$x_0^2 + \frac43 x_0 - \frac73 = 0$$ wich has no real solutions. This tells you that you can chose one of the values at will and use the first two consistency equations to get an order-2 QF. The simplest choice for this is $x_0 = 0$ leading to $\omega_0=\omega_1=\frac12$.