- #1
- 19
- 0
Homework Statement
According to Stone Weierstrass Theorem, there exists a polynomial such that lim P = |x|.
Can anyone give me an example of P? Maybe within the range of 0.01?
ie. |f-P|< 0.01
In the interest of making correct statements, what you mean is that there is a sequence of polynomials {P_{n}} such that lim_{n -> inf} P_{n}(x) = |x| uniformly in x. (Or... maybe you just mean that it converges at each value of x)According to Stone Weierstrass Theorem, there exists a polynomial such that lim P = |x|.
Can anyone give me an example of P? Maybe within the range of 0.01?
ie. |f-P|< 0.01
Mean square convergence does not imply uniform convergence in general!The important facts are that the Legendre polynomials are both orthogonal and complete. This means that the mean square of the difference between f and the first n terms in the series goes to zero as n → ∞, i.e. the series converges uniformly to f.
Orthogonality and completeness imply L^2 convergence (mean-squared) but not in general L^infinity convergence (uniform). L^2 is special because it is a Hilbert space, whereas L^p is not a Hilbert space if p is not 2.The functions in your example are not orthogonal. I could be wrong, but I remember reading somewhere that orthogonality and completeness imply uniform convergence.
Sorry if I caused some awkwardness with the convergence question above, something I barely understand myself. I just want to post some empirical results cus' I'm curious. The plot below is the actual function and a plot of the first 25 terms of the Legendre expansion created with this Mathematica code:I think it converges in the mean. Since the Legendre polynomials are orthogonal, then we can write:
[tex]f(x)=a_0 P_0(x)+a_1 P_1(x)+a_2 P_2(x)+\cdots[/tex]
with:
[tex]a_k=\frac{2k+1}{2}\int_{-1}^{1} f(x)P_k(x)dx[/tex]
I'd try say 25 of them programatically (in Mathematica) then compare it to [tex]f(x)=|x|[/tex] happybear.
f[x_] := Abs[x];
clist = Table[((2*n + 1)/2)*
Integrate[f[x]*LegendreP[n, x],
{x, -1, 1}], {n, 0, 25}];
g[x_] := Sum[clist[[n]]*LegendreP[n - 1,
x], {n, 1, 26}];
Plot[{f[x], g[x]}, {x, -1, 1}]