Interpolation help fitting curve to three points

Click For Summary

Discussion Overview

The discussion revolves around fitting a curve to three given points: (1,20), (2,4), and (5,3). Participants explore the use of Lagrange polynomials and the possibility of fitting a cubic function to these points, while also considering quadratic functions.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant inquires about using the Lagrange polynomial to fit a curve to the specified points and questions the feasibility of fitting a cubic function.
  • Another participant notes that there are infinitely many cubic polynomial equations that can pass through three points, but only one quadratic equation can be formed from them.
  • Some participants clarify that the Lagrange polynomial formula results in a quadratic, not a cubic, and provide the formula with specific substitutions for the given points.
  • There is a correction regarding the calculations in the Lagrange polynomial formula, with a participant suggesting that a mistake was made in the interpretation of the points used in the formula.

Areas of Agreement / Disagreement

Participants generally agree that the Lagrange polynomial can yield a quadratic fit for the points, but there is disagreement regarding the interpretation of the formula and whether a cubic fit is possible. The discussion remains unresolved regarding the specifics of the calculations and the potential for a cubic fit.

Contextual Notes

There are limitations in the discussion regarding the assumptions made about the types of polynomial fits and the specific calculations involved in applying the Lagrange polynomial formula. The exact nature of the mistake in the calculations is not fully clarified.

KV-1
Messages
16
Reaction score
1
Hello,

I have the following points that need to be fitted with a curve:
(1,20);(2,4);(5,3)

I'm wondering how to use the http://en.wikipedia.org/wiki/Lagrange_polynomial to do this.

If possible, can these points be fitted with a cubic function?

I tried to fit a cubic to this, but for me it's a game of guess and check which won't give me anything efficiently.
 
Physics news on Phys.org
There are infinitely many cubic polynomial equations that will go through three points, but only one quadratic (i.e. parabola). You can use example 3 as a guide in the link you provided, or write out three quadratic equations by substituting the values you have for x and y. In the end you'll have 3 equations with 3 unknowns (i.e. the coefficients of the parabola) that can be solved using substitution.
 
Last edited:
And the Lagrange polynomial formula gives that quadratic, not a cubic.

The given points are (1,20), (2,4), and (5,3).
20\frac{(x- 2)(x- 5)}{(1- 2)(1- 3)}+ 4\frac{(x- 1)(x- 5)}{(2- 1)(2- 5)}+ 3\frac{(x- 1)(x- 2)}{(5- 1)(5- 2)}
= 20\frac{(x- 2)(x- 5)}{2}+ 4\frac{(x-1)(x-5)}{-3}+ 3\frac{(x-1)(x-2)}{12}
 
HallsofIvy said:
And the Lagrange polynomial formula gives that quadratic, not a cubic.

The given points are (1,20), (2,4), and (5,3).
20\frac{(x- 2)(x- 5)}{(1- 2)(1- 3)}+ 4\frac{(x- 1)(x- 5)}{(2- 1)(2- 5)}+ 3\frac{(x- 1)(x- 2)}{(5- 1)(5- 2)}
= 20\frac{(x- 2)(x- 5)}{2}+ 4\frac{(x-1)(x-5)}{-3}+ 3\frac{(x-1)(x-2)}{12}
Hallsofivy, i think there's a mistake.. the bold one..20(x−2)(x−5)/(1−2)(1−5)+4(x−1)(x−5)/(2−1)(2−5)+3(x−1)(x−2)/(5−1)(5−2)

it is 5, not 3 right?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 26 ·
Replies
26
Views
3K