Suppose you wanted to draw a polynomial through three given coordinates to model a situation. There are a few questions that you might need to ask:
- Is there a way to fit a polynomial graph, like a cubic or a quadratic, to these points?
- Can this always be done?
- How many points would be needed for a particular polynomial?
- Is there only one possible function that would fit these points?
One method that can be used to fit a function to given coordinates is the method of polynomial interpolation. There are a number of ways to do this, however, the method called Lagrange interpolation (named after the 18th-century mathematician) will be explored here.
Interpolation for a quadratic
Remember the standard form for a quadratic:
f(x) = ax^2+bx+c
Given the three points \left(1,5\right), \left(2,6\right), \left(3,8\right), Lagrange interpolation gives the following equation:
f(x)=5\frac{(x-2)(x-3)}{(1-2)(1-3)}+6\frac{(x-1)(x-3)}{(2-1)(2-3)}+8\frac{(x-1)(x-2)}{(3-1)(3-2)}
- Can you see any patterns or relationships between the coordinates and their positions in the equation?
- Simplify this equation and express it in standard form.
- Using the applet below, select the number of points (n = 3) and drag the points to the required positions and check the resulting quadratic matches the quadratic you found.
Try it yourself!
- Using the example above, can you find the equation for a quadratic to fit the points \left(-1,2\right), \left(3,4\right), \left(6,9\right)?
- Simplify the equation you found and use the applet above to check that the quadratic fits the points.
- Does this method always work for any three points? Can you find examples that don't work? Why don't they work? Use the applet to experiment.
- Can you construct a general formula to interpolate a quadratic for any set of points, for example, three points \left(x_{1},y_{1}\right), \left(x_{2},y_{2}\right), \left(x_{3},y_{3}\right)?
Interpolation and cubics
Now, try using the same idea to fit a cubic to a number of given points (Question: how many points do you think would be required? Why?)
- Fit a cubic to the points \left(1,2\right), \left(3,4\right), \left(5,9\right) and \left(6,8\right). Test your equation using the applet.
- Can you find any other cubic that fits these points? You might like to research other methods for interpolation to help you.
Suppose you wanted to draw a polynomial through three given coordinates to model a situation. There are a few questions that you might need to ask:
- Is there a way to fit a polynomial graph, like a cubic or a quadratic, to these points?
- Can this always be done?
- How many points would be needed for a particular polynomial?
- Is there only one possible function that would fit these points?
One method that can be used to fit a function to given coordinates is the method of polynomial interpolation. There are a number of ways to do this, however, the method called Lagrange interpolation (named after the 18th-century mathematician) will be explored here.
Interpolation for a quadratic
Remember the standard form for a quadratic:
f(x) = ax^2+bx+c
Given the three points \left(1,5\right), \left(2,6\right), \left(3,8\right), Lagrange interpolation gives the following equation:
f(x)=5\frac{(x-2)(x-3)}{(1-2)(1-3)}+6\frac{(x-1)(x-3)}{(2-1)(2-3)}+8\frac{(x-1)(x-2)}{(3-1)(3-2)}
- Can you see any patterns or relationships between the coordinates and their positions in the equation?
- Simplify this equation and express it in standard form.
- Using the applet below, select the number of points (n = 3) and drag the points to the required positions and check the resulting quadratic matches the quadratic you found.
Try it yourself!
- Using the example above, can you find the equation for a quadratic to fit the points \left(-1,2\right), \left(3,4\right), \left(6,9\right)?
- Simplify the equation you found and use the applet above to check that the quadratic fits the points.
- Does this method always work for any three points? Can you find examples that don't work? Why don't they work? Use the applet to experiment.
- Can you construct a general formula to interpolate a quadratic for any set of points, for example, three points \left(x_{1},y_{1}\right), \left(x_{2},y_{2}\right), \left(x_{3},y_{3}\right)?
Interpolation and cubics
Now, try using the same idea to fit a cubic to a number of given points (Question: how many points do you think would be required? Why?)
- Fit a cubic to the points \left(1,2\right), \left(3,4\right), \left(5,9\right) and \left(6,8\right). Test your equation using the applet.
- Can you find any other cubic that fits these points? You might like to research other methods for interpolation to help you.