1. ## Polynomial Approximations

The following is a worked example:

In the following, for example

$\frac{(g,p_0)}{(p_0,p_0)}p_0 = \frac{(-1)}{2}.1$

What I don't understand is that why they got $(g,p_0)=(-1)$.

Since $p_0 = 1$

And $(g,p_0) = \int^1_{-1} 1.g(x)dx$

But what do we need to substitute for $g$? Because this function is piece-wise, how do I know which one of the two functions I have to put into the formula?

2. Well, what are the definitions of $(g, p_0)$, $(g, p_1)$, etc.?

3. Originally Posted by HallsofIvy
Well, what are the definitions of $(g, p_0)$, $(g, p_1)$, etc.?
Those are inner products. Since $g$ and $p_0$ are continious functions on the given interval then their inner product is defined by

$(g,p_0)=\int^1_{-1}g(x)p_0 dx$

I belive that's the definition. The resulting polynomial we get in this problem is called "Legendre's polynomial", but unfortunently there is not much about it in my textbook.

4. For this:

$(g,p_0) = \int^1_{-1} 1.g(x)dx$

What should I substitute for "g(x)"? The g(x) is defined as a piece wise function. Do I need to substitute "-1" or "2x-1"? (apparently neither of them give the correct answer)