# Thread:

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)
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 13, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9516854286193848, "perplexity_flag": "middle"}