Finding a quadrature rule for symmetric integral

196 Views Asked by At

I have to find a quadrature rule that approximates the integral of $f(x)$ such that $$\int_{-h}^{h} f(x) = w_1f(x_1) + w_2f(x_2) + w_3f(x_3) + E$$ where the weights $w_i$ and points $x_i$ are to be found. I also have the extra condition: $$\int_{-h}^{h} f(x) = \int_{-h}^{h} f(-x)$$ I'm not sure how this extra condition factors into finding the required constants; usually I would set $f(x)$ to be a linear function, then quadratic, then cubic etc. up until the last order of polynomial that we know it will be exact to. I don't know how accurate it has to be, but I'm assuming this particular rule will be exact up to cubics as it resembles Simpson's rule, so since I have six constants to find, the symmetric condition will need to provide 2 more (I estimate).

However, running through my usual method of setting $f(x) = 1$, I would get $2h = w_1 + w_2 + w_3$ as expected. However, since $f$ is constant, I derive the exact same condition. Setting $f(x) = x$ then gives me $0 = w_1x_1 + w_2x_2 + w_2x_2$, and again the extra condition won't help since $\int_{-h}^{h} -x = 0$ aswell. This pattern seems to continue as I use higher order polynomials, so I think that I must be using this symmetric condition wrong. Any help with where to go from here would be very much appreciated.

1

There are 1 best solutions below

3
On BEST ANSWER

probably what is meant by the symmetry condition is this (though the phrasing is not completely clear):

Exact integrals always have the symmetry $\int f(x) = \int f(-x)$, so it would be nice if your quadrature-rule had this symmetry too. I.e. $$w_1f(x_1) + w_2f(x_2) + w_3f(x_3) \stackrel{!}{=} w_1f(-x_1) + w_2f(-x_2) + w_3f(-x_3)$$ for all functions $f$ (not only for low-order polynomials). You should convince yourself that the only way to achieve this symmetry is to choose $x_2=0$ and $x_1=-x_3$. This should simplify the rest of your calculations a bit as well.