1

The important part of my question is after the bold "Now"

The method of undetermined coefficients is defined so that the error of a function $f(x)$ to be integrated is zero. I.e.

$E=\int_{a}^{b} f(x) dx - \sum_{i=0}^{n} A_i f(x_i) =0$

Where $f(x)$ is a polynomial of degree not exceeding $n$. Given this information you can construct a system of equations, solve it, and find what the coefficients $A_i$ are.

Your result is that $\int_{a}^{b} p_n(x) dx = \sum_{i=0}^{n} A_i p_n(x_i)$.

Now, this method is used to approximate other non-polynomial integrals. For example:

$\int_{0}^{2} cosh(x)dx$ is calculated by solving the augmented matrix (1) and taking points $(0,1),(1.0,cosh(1)),(2,cosh(2))$ to find ${A_0, A_2, A_3}$

(1) $\begin{bmatrix} 1 & 1 & 1 & 2-0 \\ 0 & 1 & 2 &(4-2)/2 \\ 0 & 1 & 4 & (8-0)/3 \end{bmatrix}$

And we get the that $\int_{0}^{2} cosh(x) dx \approx \frac{1}{3} cosh(0)+ \frac{4}{3} cosh(1) + \frac{1}{3} cosh(2) $ Which gives an error of $-0.0180$

Now, obviously the method works. But it seems magical to me. A method which was derived for polynomial functions, has applications to other types of functions... Why so?

Also, the derivation for polynomials has as a condition the fact that you have to be taking into consideration distinct $x_i$. Approximation to other complicated integrals seems to necessitate that this $x_i$ are within the interval of integration, otherwise the approximation isn't any good.

Whats going on here?

Why does this method work for non-polynomial functions, and why do the $x_i$ have to be within the interval of integration?

DLV
  • 1,740
  • 4
  • 17
  • 28
  • 1
    I'm guessing because you actually determine the integral for the interpolation polynomial of the function? That's also why $x_i$ have to be in the domain of integration, so that you construct the interpolation polynomial on the segment over which you integrate. That example you gave, that's actually Simspon's formula. Are you dealing with Newton-Cotes formulae in your course? – implicati0n Jul 04 '15 at 23:47
  • There wasn't any explicit interpolating in this method. But I think you're right, in that it has to do with it! I think I get now why this approximation works! :D – DLV Jul 04 '15 at 23:52
  • This method is seen as separate from Newton Cotes. But I hadn't realized that either (that its simpson's rule). I guess these methods coincide someway. – DLV Jul 04 '15 at 23:53
  • 1
    We've done it a bit differently in my course. We actually start by showing that we'll make an approximation using an interpolation polynomial. Those coefficients that you determine via the equation system, you can calculate them as integrals of the base polynomials for Lagrange's interpolation polynomial. I would suggest reading up on that on Wikipedia or in a textbook. @David – implicati0n Jul 04 '15 at 23:54

1 Answers1

2

The reason that it works for non-polynomial function is that, by Taylor's theorem, non-polynomial functions can still be approximated by polynomial function. The intuition is that

$$ f(x) = \sum_{n=0}^\infty \frac{f^{(n)}(0)}{n!}x^n = f(0) + f'(0)x + f''(0)x^2 + \cdots + f^{(k)}(0)x^k + \sum_{n=k+1}^\infty \frac{f^{(n)}(0)}{n!}x^n. $$ Note that $$ P(x):=f(0) + f'(0)x + f''(0)x^2 + \cdots + f^{(k)}(0)x^k $$ is a polynomial, and $$ R(x):=\sum_{n=k+1}^\infty \frac{f^{(n)}(0)}{n!}x^n $$ is "small." Thus $$ \int_a^b f(x)dx = \int_a^b P(x)dx + \int_a^b R(x)dx $$ $$ = \sum_{i=0}^n A_i P(x_i)+ \int_a^b R(x)dx $$ $$ \approx \sum_{i=0}^n A_i f(x_i) + 0 $$

This should relieve some of the mystery from why it still works. To make it rigorous, one usually uses Taylor's theorem and its bound on how small the remainder $R(x)$ has to be.

As for why the $x_i$ need to be in the interval of integration, they don't really. But, remember that the Taylor remainder $R(x)$ is given in terms of how far $x$ is from $0$, or more generally, how far $x$ is from the center of the series. The further one is from the center, the faster the error increases (usually). Thus one typically takes the center to be somewhere in the region of integration so the $x_i$ will be close to the center. So you see, they don't need to be close, but you will need many more Taylor terms if you want them to be far.

nullUser
  • 27,877