What comes next?
|
10-10-2024, 02:55 PM
(This post was last modified: 10-15-2024 09:52 AM by Gil.)
Post: #6
|
|||
|
|||
RE: What comes next?
Thanks for the Mathologer video, Thomas.
Here is my version of the Gregory-Newton Interpolation formulae for the HP50G. Argument: A non-empty list, the 1st number being always = f(0), the 2nd being = f(1), the 3rd being = f(2), etc. Example : {0 1 4 9} NextN and the result will be: { 0 1 4 9 } f(x): 'x^2' f(4): 16 Don't forget : to put a zero for the 1st element in the above example list if you expect to get x². Remember: first element in the list is always f(0), ie in this example 0²=0. If you put {1 4 9} instead, then the program supposes that f(0) = 1, f(1) = 4 and f(2) =9, whose solution is obviously not x². Result for {1 4 9} NextN: { 1 4 9 } f(x): 'x^2+2*x+1' f(3): 16 Example of Mathologer {1 2 4 8 16 31} NextN and the result will be: { 1 2 4 8 16 31 } :f(x): '1/24*x^4-1/12*x^3+11/24*x^2+7/12*x+1' f(6): 57 Attention again: suppose that the sequence were {0 1 2 4 8 16 31} then {0 1 2 4 8 16 31} NextN: will give the following output: { 0 1 2 4 8 16 31 } f(x): '-1/720*x^6+7/240*x^5-29/144*x^4+37/48*x^3-467/360*x^2+17/10*x' f(7): 56 From last example, calculate for instance f(2.5): a) DROP 2.5 'x' STO EVAL and you get 2.8291015625 b) or -105 CF 25 ENTER 10 / 'x' STO EVAL and you get '2897/1024'. Code below slightly changed in comparison to previous versions Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)