Approximation of the integral

127 Views Asked by At

As I am new to this forum, I hope I'm using the correct conventions.

I have a strange question concerning the approximation of a rather standard integral, $\int_{a}^{b}f(x)dx$. When using N equally spaced points. In formulae of the type:

$$\int_{a}^{b}f(x)dx = h\sum_{k=1}^{N}c_kf(a+kh)+O(h^p)$$

where $h=\frac{b-a}{N+1}$, and $P(N) \geq N+1$

Substituting $N=2$, should give $c_1=c_2=\frac{3}{2}$ and $p=3$

Why should we substitute $N=2$? and how are the other values determined? Hopefully someone can give me some hints.

I'm substituting the given value for N, in that case the RHS of the equation becomes:

$$\frac{b-a}{3}\sum_{k=1}^{2} c_kf((1-\frac{k}{3})a+\frac{kb}{3})+O([\frac{b-a}{3}]^p) $$

Do I have to evaluate the sum for $k=1$ and $k=2$ at this moment? But I still think I'll be making a fallacy.

[On wikipedia I found that - thanks to the given hint - the trapezoid method at $N=2$, the step size becomes $\frac{b-a}{3}$, the formula $\frac{b-a}{2}(f_0+f_1)$, the error term should be $-\frac{(b-a)^3}{12}f^{2}$]

But that doesn't make it any more clear. Is there anyone that can help me?

Best Wishes,

Joe Goldiamond

1

There are 1 best solutions below

0
On

You seem to be trying to establish the classical Newton-Cotes formulas.

To determine the coefficients $c_k$, you make the formula exact for the polynomial integrands of degree $N-1$ (which have $N$ degrees of freedom), for which integration is straightforward.

Polynomial interpolation works for small degrees and the case $N=2$ leads to the trapezoidal rule (probably chosen because it is easily tractable).

For smooth functions, the error term can be derived from the remainder of the Taylor development.