(50g) Bernoulli polynomials
|
12-17-2018, 05:31 PM
(This post was last modified: 12-17-2018 10:10 PM by peacecalc.)
Post: #1
|
|||
|
|||
(50g) Bernoulli polynomials
Hello HP50g-fans,
I made a program for Bernoulli-polynomials ( = BP), it works with three equations: \[ B_o(x) = 1 ~~~~~~~ \text{start}\] \[ B_n(x) = n \cdot \int B_{n-1}(t)dt ~~~~~~~ \text{recursive definition}\] \[ \int_0^1 B_n(t)dt = 0 ~~~~~~~~ \text{ calculate the constant from second equation}\] Therefore we have polynomials it is easy to program and make use of CAS of the HP50g. The program "BCALC" has to possibilities to work: a) with one parameter "N", then it will calculate all BP from 0 to N, but it only stores the last N'th BP. b) with two parameters "K" to "N". Let us say you calculated BP for N = 5, then you decide to calculate further on to N = 7. If you don't delete the global variables "BN1" and "BN2", you can input 6 and 7 and you get BP for N=7 from N = 5 as first equation. That is a advantage in time, because the CAS operations are very slow. To let the program know how many parameters I input, I use a list with one or two elements. The program uses only one integration because the second one (stored in "BN2") prepares the BP for "N+1" (again time saving). I only make comments for the first part, I hope the rest of the program is understandable for you. Code:
Enjoy it and tell me your improvements and critics. SORRY SORRY SORRY, dear Mr. Admin move this thread to "General Software Libary". greetings peacecalc |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)