Post Reply 
Lagrangian Interpolation
03-09-2019, 07:08 PM
Post: #14
RE: Lagrangian Interpolation
(03-13-2015 05:33 AM)bshoring Wrote:  It also looks like it will work on an HP-25 as well as the HP-67.

This program just fits in the 49 steps available for the HP-25:
Code:
01: 01    :    1
02: 74    :    R/S
03: 23 00 :    STO 0
04: 21    :    x<>y
05: 23 03 :    STO 3
06: 02    :    2
07: 74    :    R/S
08: 23 01 :    STO 1
09: 21    :    x<>y
10: 23 04 :    STO 4
11: 03    :    3
12: 74    :    R/S
13: 23 02 :    STO 2
14: 21    :    x<>y
15: 24 04 :    RCL 4
16: 41    :    -
17: 24 02 :    RCL 2
18: 24 01 :    RCL 1
19: 41    :    -
20: 71    :    ÷
21: 24 04 :    RCL 4
22: 24 03 :    RCL 3
23: 41    :    -
24: 24 01 :    RCL 1
25: 24 00 :    RCL 0
26: 41    :    -
27: 71    :    ÷
28: 23 04 :    STO 4
29: 41    :    -
30: 24 02 :    RCL 2
31: 24 00 :    RCL 0
32: 41    :    -
33: 71    :    ÷
34: 23 05 :    STO 5
35: 74    :    R/S
36: 23 06 :    STO 6
37: 24 01 :    RCL 1
38: 41    :    -
39: 24 05 :    RCL 5
40: 61    :    ×
41: 24 04 :    RCL 4
42: 51    :    +
43: 24 06 :    RCL 6
44: 24 00 :    RCL 0
45: 41    :    -
46: 61    :    ×
47: 24 03 :    RCL 3
48: 51    :    +
49: 13 35 :    GTO 35

Definition of the Polynomial

Example:

Find a quadratic polynomial given these 3 points: \(P_1(-5, 12)\), \(P_2(1, 13)\) and \(P_3(2, 11)\)

CLEAR PRGM
R/S
1.0000

12 ENTER -5
R/S
2.0000

13 ENTER 1
R/S
3.0000

11 ENTER 2
R/S


These are the coefficients of the Newton polynomial:

R3: 12.000000
R4:  0.166667
R5: -0.309524

This leads to the formula:

\(f(x) = 12 + (x+5)(\frac{1}{6} - (x-1)\frac{13}{42})\)

Interpolation of the Polynomial

Example:

Evaluate the polynomial at \(x=0.5\).

0.5
R/S

13.7679

Hint: You can just enter new values and hit R/S to evaluate the polynomial.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


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 - bshoring - 03-09-2015, 03:30 AM
RE: Lagrangian Interpolation - bshoring - 03-09-2015, 09:50 PM
RE: Lagrangian Interpolation - bshoring - 03-13-2015, 05:33 AM
RE: Lagrangian Interpolation - Thomas Klemm - 03-09-2019 07:08 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 03:55 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 07:22 PM
RE: Lagrangian Interpolation - Albert Chan - 07-09-2024, 08:43 PM
RE: Lagrangian Interpolation - PedroLeiva - 03-14-2019, 08:12 PM
RE: Lagrangian Interpolation - PedroLeiva - 07-09-2024, 12:58 PM
RE: Lagrangian Interpolation - Albert Chan - 07-10-2024, 11:23 AM
RE: Lagrangian Interpolation - rprosperi - 07-10-2024, 11:34 AM
RE: Lagrangian Interpolation - Albert Chan - 07-11-2024, 10:05 AM



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