Integral of polynomials given specific points only

80 Views Asked by At

I was studying numerical analysis approximation of integrals and I was thinking that if we can find a link between two polynomial given their degree, and I came out with this rather interesting result.

Given a polynomial of degree $n\le 1$ and two points $x_0, x_1$ such that $f(x_0)=g(x_0), f(x_1)=g(x_1)$ we can conclude that

$$\int_{x_0}^{x_1} f(x)dx = \int_{x_0}^{x_1}g(x)dx$$

This is clear because if $f(x_0)=f(x_1)$ then both $f$ and $g$ are constant, if they're not equal then they have the same slope and again, they're equal.

Going for $n \le 3$, and having three points $x_0, x_1, x_2$ such that $$x_1=\frac{x_0+x_2}{2}, ~~\text{and also}~~f(x_i) = g(x_i), i=1,2,3$$

We can use Newton's-Cotes formula for integration and we have that

$$\int_{x_0}^{x_2}f(x)dx = \frac{x_2-x_0}{3}\Big(f(x_0)+4f(x_1)+f(x_2)\Big)+O(f^{(4)}(\xi)), \xi \in [x_0,x_2]$$ $$\int_{x_0}^{x_2}g(x)dx = \frac{x_2-x_0}{3}\Big(g(x_0)+4g(x_1)+g(x_2)\Big)+O(g^{(4)}(\xi)), \xi \in [x_0,x_2]$$

But $f,g$ are polynomial with degree $\le 3$ so we have $f^{(4)} = g^{(4)} \equiv 0$

So again, we have that the integrals are equal.

Can this result be generalized to polynomial of degree $2n+1, n \in \mathbb N$ with $2n$ equidistant points?

2

There are 2 best solutions below

1
On

"Given a polynomial of degree $n≤2$ and two points $x_0,x_1$ such that $f(x_0)=g(x_0),f(x_1)=g(x_1)$ we can conclude that $$\int_{x_0}^{x_1} f(x)dx = \int_{x_0}^{x_1}g(x)dx$$"

That is not quite right.

You can say that there exists a polynomial $f(x)$ of degree 2 (or less) such that; $f(x_0)=g(x_0),f(x_1)=g(x_1)$ and$\int_{x_0}^{x_1} f(x)dx = \int_{x_0}^{x_1}g(x)dx$

And so you can use Simpsons rule to numerically approximate an integral with less error than you have if you use the trapezoid rule (or similar) for the same number of points.

And I see no reason why you couldn't extend this approximation using cubics or higher degree polynomials. I just haven't seen it to be worth the effort.

1
On

Your result is not always true. for example let $$f(x)= x^2-1$$ and $$g(x) = 3(x^2-1)$$

Then $f(-1)=g(-1)$ and $f(1)=g(1)$ while $$\int_{-1}^{1} f(x)dx =-4/3$$ and $$\int_{-1}^{1}g(x)dx=-4$$