Timeline for Example of a continuous function that is difficult to approximate with polynomials
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2018 at 2:43 | comment | added | cfdlab | There is danger of being mistaken with any method, if you dont use some error estimate. Otherwise you never know how many terms to use. | |
Sep 8, 2018 at 2:42 | comment | added | cfdlab | We know there is no perfect method. The question is what functions are difficult for polynomials to approximate. So one has to see all possible methods involving polynomials to conclude none of them do a good job. The Legendre is not the best way to approximate |x| and hence it gives a rather false impression that polynomials are too bad for |x|. With Chebyshev you have convergence and far better approximations than Legendre, they dont oscillate so badly as Legendre, though converge slowly near x=0, where function is not smooth enough. | |
Sep 7, 2018 at 17:52 | comment | added | leftaroundabout | @PraveenChandrashekar the point is that polynomials are in principle not able to approximate a function like $x \mapsto |x|$ properly. There are different methods each of which fails a bit more or less spectacularly, but none of them work well in the sense of “only a few terms give something that could be mistaken for the original function”. If you must use polynomials, you need to consider which kinds of error are more problematic, Legendre and Chebyshev both have their use cases but there's no silver bullet. Ultimately, an approach with e.g. splines is typically more effective. | |
Sep 7, 2018 at 16:02 | comment | added | cfdlab | It is perfectly fine to have non-uniform points as in Chebyshev interpolation. With degree about 20, it gives a lot more accurate approximation than Legendre that you show in your post. Measure the errors to be more quantitative. You can also do Chebyshev series approximation of |x| which is more accurate than Legendre expansion. | |
Sep 7, 2018 at 9:59 | comment | added | leftaroundabout | @PraveenChandrashekar Chebyshev works “better” because it puts more weight on the outer parts of the interval, where the function is smooth. Thus the excessive oscillation is avoided, but saying it approximates the function better is dubious – it does in particular capture the sharp turn at $x=0$ even worse than uniform-discrete-points or $L^2$-minimisation. If your goal is avoiding high-frequency components, better use an integral transformation that properly damps these components. | |
Sep 7, 2018 at 2:26 | comment | added | cfdlab | You can interpolate |x| using Chebyshev interpolation, see nbviewer.jupyter.org/github/cpraveen/na/blob/master/… which converges quite fast. E.g., you can change N=2*i in the code to N=15+i and test larger degree. It is not an expansion method but still based on polynomials. | |
Sep 6, 2018 at 22:04 | history | answered | leftaroundabout | CC BY-SA 4.0 |