0

Hope everyone is well. I am working on a problem that gives me a table of 6 values each of x and y. Now, I am supposed to justify if the data corresponds to the function values of a cubic polynomial. I am still conceptually working on this subject so forgive me if this is justification is too narrow, but would I be correct in saying that the data couldn't represent a cubic polynomial because it is passing through 6 points? By definition, polynomials of degree n require n+1 points. So if I am given 6 x and y values, I would have a polynomial of degree 5? Thanks in advance for any insight

Edit: I will include the data as the someone made the point there might be something that proves otherwise. Thanks enter image description here

  • 1
    Of degree at most 5. You can certainly fit a line to three (collinear) data points, so the data may result in a degenerate case. – Ted Shifrin Mar 16 '23 at 00:09
  • You don't show the actual data. It's possible there is something in the data hinting at the answer. – dxiv Mar 16 '23 at 00:11
  • Now that the data has been posted, there is nothing in it that rules out a cubic - things like more than $2$ local extrema, horizontal line that intersects the graph at more than $3$ points etc. This does not mean it must be a cubic, just that you'll have to do the work and check whether it is in fact a cubic. – dxiv Mar 16 '23 at 00:28
  • @dxiv Thank you. I did plug them into the cubic form y=ax^3+bx^2+cx+d but I don't really know what to do from there. How can I prove (or disprove) that I have a cubic from there? – johnathan Mar 16 '23 at 00:30
  • @johnathan You could pick $4$ points out of those $6$ and interpolate the cubic through them. Then check whether the cubic you found happens to pass through the remaining $2$ points or not. – dxiv Mar 16 '23 at 00:31
  • Is this exercise perhaps intended to reinforce learning about Newton divided differences? – hardmath Mar 16 '23 at 00:57
  • Least square term is what you’re looking. – CroCo Mar 16 '23 at 02:24

2 Answers2

4

Since the $x$ values are uniformly spaced, you can take differences between them, to wit replace each pair $f(n), f(n+1)$ with $f(n+1)-f(n)$:

$1,4,11,16,13,-4\to 4-1,11-4,16-11,13-16,-4-13 = 3,7,5,-3,-17$

And iterate this process to get second differences, then third differences:

$3,7,5,-3,-17\to 4,-2,-8,-14\to\color{blue}{-6,-6,-6}.$

The third differences are constant, and that combined with the uniformly spaced $x$ values means you have a cubic polynomial. More generally if you have constant $n$th differences with uniformly spaced $x$ values you have a polynomial of degree $n$.

Oscar Lanzi
  • 39,403
3

There is an explicit way to see this. A cubic polynomial satisfying your data is of the form $$f(x) = ax^3+bx^2+cx+11,$$ with the extra conditions $$ \begin{cases} 8a-4b+2c=10 \\ a-b+c=7\\ a+b+c=5. \end{cases} $$ These are indeed enough to specify all coefficients. Summing second and third equation implies $a+c=6$, so clearly $b=-1$, and hence the first equation becomes $$6a+2(a+c)-4b = 6a+12+4=10 \rightarrow a = -1.$$ So your polynomial is $$f(x) = -x^3-x^2+7x+11.$$ You can check that this satisfies $f(1) = 16, f(2) = 13, f(3) = -4$ as well.

Gibbs
  • 8,230