Here's a discovery i made about polynomial extrapolation (it probably can be derived from Newton's series but i haven't done it nor have i seen it done).

First, some preliminaries: 3 points can be fit by a unique quadratic polynomial, i.e., parabola. 4 points can be fit by a unique cubic polynomial. n points can be fit by a unique (n+1)th degree polynomial.

Suppose we have the 3 points x(0)==1, x(1)==4, x(2)==9. These are obviously fit by the quadratic y(x)=x**2. Now the question is: how do you extrapolate x(3)?

Answer: Form the binomial expansion of (a-b)**3=0 and note the coefficients: Notice that I expand a CUBIC. For a cubic I would expand (a-b)**4, etc

a**3-3(a**2)b+3ab**2-b**3=0

The coefficients are 1, -3, +3, -1

The discovery I made is that these terms correspond in order to the coefficients of x(3), x(2), x(1), and x(0).
We are trying to determine x(3).

We then have: x(3) = 3x(2) -3x(1) +x(0), or: x(3) = 3(9)-3(4)+1 = 16

This method extrapolates the next term of any polynomial where the x intervals are the same size.

In reply to Re^3: Polynomial Trendline / Extrapolation by Anonymous Monk
in thread Polynomial Trendline / Extrapolation by lwicks

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.