Lagrangian Interpolation
03-14-2019, 05:56 PM
Post: #16
 Thomas Klemm Senior Member Posts: 1,447 Joined: Dec 2013
RE: Lagrangian Interpolation
(03-14-2019 03:55 PM)PedroLeiva Wrote:  This means that when the function is a straight line I have to use this and when it is a curve the Lagrangian method?

You could enter a dummy point (e.g. 0 ENTER) as third point.
Just make sure that the x-value is different from the other 2 points.
And then clear register 5:

CLx
STO 5

If you evaluate now the polynomial of the previous example at $$x=2$$ you get:

2
R/S

13.1667

Or then you can just shorten the existing program to:
Code:
01: 01    :    1
02: 74    :    R/S
03: 23 00 :    STO 0
04: 21    :    x<>y
05: 23 01 :    STO 1
06: 02    :    2
07: 74    :    R/S
08: 21    :    x<>y
09: 24 01 :    RCL 1
10: 41    :    -
11: 21    :    x<>y
12: 24 00 :    RCL 0
13: 41    :    -
14: 71    :    ÷
15: 23 02 :    STO 2
16: 74    :    R/S
17: 24 00 :    RCL 0
18: 41    :    -
19: 24 02 :    RCL 2
20: 61    :    ×
21: 24 01 :    RCL 1
22: 51    :    +
23: 13 16 :    GTO 16

HTH
Thomas

PS: You could also use the mid-point of the first two points as a third point.
This would lead to a "natural" way to make the entry in register 5 equal to 0.
 « Next Oldest | Next Newest »

 Messages In This Thread Lagrangian Interpolation - Namir - 12-18-2013, 06:04 AM RE: Lagrangian Interpolation - bshoring - 03-05-2015, 05:17 AM RE: Lagrangian Interpolation - PedroLeiva - 03-05-2015, 09:33 PM RE: Lagrangian Interpolation - bshoring - 03-07-2015, 11:49 PM RE: Lagrangian Interpolation - PedroLeiva - 03-09-2015, 03:37 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-08-2015, 06:02 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-08-2015, 07:58 PM RE: Lagrangian Interpolation - bshoring - 03-09-2015, 03:30 AM RE: Lagrangian Interpolation - Thomas Klemm - 03-09-2015, 09:36 AM RE: Lagrangian Interpolation - bshoring - 03-09-2015, 09:50 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-11-2015, 08:04 AM RE: Lagrangian Interpolation - bshoring - 03-13-2015, 05:33 AM RE: Lagrangian Interpolation - Newton Polynomial - bshoring - 04-04-2015, 07:40 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-09-2019, 07:08 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 03:55 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-14-2019 05:56 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 07:22 PM RE: Lagrangian Interpolation - Thomas Klemm - 03-14-2019, 07:58 PM RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 08:12 PM

User(s) browsing this thread: 1 Guest(s)