don't click here

Math Help (Generating Polynomial Functions)

Discussion in 'Technical Discussion' started by saxman, Feb 28, 2011.

  1. saxman

    saxman

    Oldbie Tech Member
    I dissected 2nd degree polynomial functions using the Genius Curve Fitting program (free version). This is what I found:

    y = ax^2 + bx + c

    Given points (0, 2), (1, 3), and (2, 10)...

    a = y2 - ((y2-y0) / 2) - y1
    b = y1 - a
    c = y0

    Using these rules, the equation becomes:

    y = 3x^2 - 2x + 2

    The rules certainly apply whenever xn = n. For other intervals of x, there will be some modifying of the equation that is necessary.

    Now my question is, how do I generate a function for a polynomial of the 3rd degree, 4th degree, and so on? The free version of Genius Curve Fitting only allows up to three points to be plotted, so I am unable to figure anything out.
     
  2. Sintendo

    Sintendo

    Member
    249
    0
    16
    My guess would be using matrices and then transforming it into reduced row-echelon form.

    I'll give an example for the third degree polynomial you posted. We start by inserting the points into the matrix.

    Code (Text):
    1. [[0 0 1 | 2 ]
    2.  [1 1 1 | 3 ]
    3.  [4 2 1 | 10]]
    Then we transform it into reduced row-echelon form.

    Code (Text):
    1. [[1 0 0 | 3 ]
    2.  [0 1 0 | -2]
    3.  [0 0 1 | 2 ]]
    Now we can just read the results from the matrix. This should also apply to polynomials of any degree.