1
$\begingroup$

I would like to apply Legendre polynomials to least square approximation. Therefore I would like the function:

$$L_n (x)=\sum_{k=0}^n a_k P_k (x)$$

to fit $f(x)$ defined over $[-1,1]$ in a least square sense.

We should minimize:

$$I(a_0, ..., a_n)= \int_{-1}^1 [f(x) - L_n (x)]^2 \; dx\tag1$$

and so we must set

$$\frac{\partial I}{\partial a_r} = 0,\qquad r=0,1, \ldots,n\tag2$$

Using equations $(1)$ and $(2)$

$$\int_{-1}^1 P_r(x) \left[f(x) - \sum_{k=0}^n a_k P_k (x)\right]dx = 0,\qquad r=0,1, \ldots,n$$

should be an equivalent term.

My question now is: why is that true?

I would be glad if someone could illustrate the last step with more details. Thanks, Rainier.

  • 0
    thx for editing, looks much nicer now.2012-09-15
  • 0
    It is true because the functional $I(a_0\ldots a_n)$ that you want to minimize is convex. Hence any critical point is a minimum.2012-09-15
  • 0
    ok, equation (1) and (2) make perfect sense to me. The step which I don't understand is how to get to the last term.2012-09-15

3 Answers 3