Consider the following table of values for a function $j_0(x)$:

$\begin{array}{c|ccccc} x & \delta_0(x) \\ \hline 0.0&1.00000\\0.1&.99833\\0.2&.99335\\0.3&.98507\\0.4&.97355\\0.5&.95885\\0.6&.94107\\0.7&.92031\\0.8&.89670\\0.9&.87036\\1.0&.84147\\1.1&.81019\\1.2&.77670\\1.3&.74120 \end{array}$

What should be the maximum degree of polynomial interpolation used with the table?

I know that I must use the forward difference table so that I can detect the influence of the rounding errors. From that, do I find the polynomial by using $$f[x_0,...,x_n]=\frac{\triangle^nf(x_0)}{n!h^n}$$ where $\triangle f(x)=f(x+h)-f(x)$ and $h$ is the step length? Or do I use newton divided difference? Confused on how I can solve this.

  • $\begingroup$ If there are no errors, interpolation is the way to go. The forward differences tell you the right degree, but in practice you'd use Newton interpolation (as you have equally spaced data). If there are errors, you'd get the form right and use least squares to get parameters. $\endgroup$ – vonbrand Feb 4 '13 at 2:37
  • $\begingroup$ @vonbrand Can you elaborate a little more please? $\endgroup$ – user60514 Feb 4 '13 at 3:34
  • $\begingroup$ No errors? Use <nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/…> (just a fast Google search away, didn't look very closely; in this case the Wikipedia article is no real help). $\endgroup$ – vonbrand Feb 4 '13 at 3:39
  • $\begingroup$ @vonbrand Thanks but that link you gave me says "Not Found" $\endgroup$ – user60514 Feb 4 '13 at 3:46

The data is only given to 5 decimal places. So, we can assume that the data points might be in error by as much as 0.000005. So any curve that deviates from the data points by less than this would be fine. If you plot the data (in Excel, for example) you will see that the curve gently slopes downwards. I would guess that a curve of degree 5 or 6 would fit the points with an error of less than 0.000005. As far as I know, there is no good way to predict the error, other than constructing the curve and measuring. To construct curves, use least-squares fitting: http://mathworld.wolfram.com/LeastSquaresFittingPolynomial.html

To use the Wolfram formulae: In your case, $n=14$, $\{x_1, x_2, \ldots, x_n\} = \{0.0, 0.1, \ldots, 1.3\}$, and $\{y_1, y_2, \ldots, y_n\} = \{1.00000, 0.99833, \ldots, 0.74120\}$. But you can probably find some software to do the fitting for you. For example, you can use the "Fit" function in Mathematica. http://reference.wolfram.com/mathematica/ref/Fit.html

You can do it in Excel, too. Look up the "Add Trendline" function. The function $y = -0.0008x^5 + 0.0096x^4 - 0.0009x^3 - 0.1664x^2 - 0.00002x + 1$ gives a maximum error of $0.00003$.

  • $\begingroup$ Thank you Bubba, I am confused on how I can plot my table into that wolfram site you provided? What will be in my matrix? $\endgroup$ – user60514 Feb 4 '13 at 5:50
  • $\begingroup$ I added an explanation. $\endgroup$ – bubba Feb 4 '13 at 6:19
  • $\begingroup$ So, on the mathematica site you gave where it says "$data = \{\{0, 1\}, \{1, 0\}, \{3, 2\}, \{5, 4\}\};$ the x side is the left and y on the right. So I plug my points there? $\endgroup$ – user60514 Feb 4 '13 at 7:06
  • $\begingroup$ And is $y = -0.0008x^5 + 0.0096x^4 - 0.0009x^3 - 0.1664x^2 - 0.00002x + 1$ from my data? $\endgroup$ – user60514 Feb 4 '13 at 8:13
  • $\begingroup$ Yes, the Excel answer is for your data. The function allows you to adjust the degree, too. $\endgroup$ – bubba Feb 4 '13 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.