I want to interpolate a function that I have amount of it in this points: $0:.001:1$ and I have interpolate it in this points: $0:.0005:.001$. When I use lagrange method, I have a very bad result. I think it happens because of my interval ($0:.0005:.001$) is too litter than the main interval ($0:.001:1$)? Is it true? And do you know another method for this problem?
Asked
Active
Viewed 28 times
1 Answers
1
You may have encountered the so called Runge's phenomenom. There are two ways to resolve this problem. The first one is to use the root of Chebyshev polynomial to interpolate, and the second one is to use splines, both could be found in Wikipedia. I recommended the use of cubic splines, since it has linear complexity and is not hard to understand.
Golbez
- 4,276
-
Thanks a lot. I don't have differential of function for splines, so I use the roots of Chebyshev polynomial.But my interval is [0,1]. How can I transfer the roots to this interval? – user169140 Aug 23 '14 at 12:34
-
You may scale your function to $[-1,1]$, using $g(x)=f((x+1)/2)$. Then the approximation for $g(x)$ is enough. – Golbez Aug 23 '14 at 12:38