(71B) Fun with the 71B '20
|
07-25-2020, 06:35 PM
Post: #1
|
|||
|
|||
(71B) Fun with the 71B '20
Link: http://edspi31415.blogspot.com/2020/07/f...1b-20.html
Differential Equations: Runge Kutta Method 4th Order Find a numerical solution to the differential equation: dy/dx = f(x, y) x is the independent variable, y is the dependent variable. You define f(x,y) on line 10. For example, dy/dx = sin(x * y) should have this as line 10: 10 DEF FNF(X,Y) = SIN(X*Y) Line 5 is a remark line. Remarks are followed by exclamation points on the HP 71B. HP 71B Program: RK4 Size: About 300 - 330 bytes Code: 5 ! FNF(X,Y) = dY/dX Example: dy/dx = sin(x * y) with inital condition y(0) = 0.5, h = 0.2 * π First three results: ( .628318530718 , .607747199386 ) ( [ f ] [ +] (CONT), [ Y ] ) ( 1.25663706144, 1.02432288082 ) ( 1.88495559216, 1.51038862362 ) Hyperbolic Functions [ S ] = sinh(x) [ C ] = cosh(x) [ A ] = asinh(x) [ H ] = acosh(x) [ X ] to exit HP 71B Program: HYP Size: 401 bytes acosh(x) requires that | x | ≥ 1 Code: 100 DESTROY A,X Example: X = 2.86 sinh(2.86) returns 8.70212908815 cosh (2.86) returns 8.75939784845 asinh(2.86) returns 1.77321957441 acosh(2.86) returns 1.71190019325 Arithmetic-Geometric Mean The arithmetic-geometric mean (AGM) is found by the iterative process: a = 0.5 * (x + y) g = √(x * y) The values of a and g are stored into x and y, respectively. The process repeats until the values of a and g converge. A tolerance of 10^(-9) is used to display an 8-digit approximation. HP 71B Program: AGM Size: 148 Bytes Code: 10 DESTROY X,Y,A,B Example: AGM(178, 136) Result: 156.29380544 Pythagorean Triple Generator Given two positive integers m, n; where m > n, a pythagorean triple is generated with the following calculations: a = 2*m*n b = m^2 - n^2 c = m^2 + n^2 Properties: a^2 + b^2 = c^2 Perimeter: p = a + b + c Area: r = a * b / 2 HP 71B Program: PYTHTRI Size: 217 bytes Code: 10 DESTROY M,N,A,B,C,R,P Example: M = 16, N = 11 Results: A = 352, B = 153, C = 377, P = 864, R = 23760 Impedance of An Alternating Current The program ALTCURR calculates the impedance (magnitude and phase angle) of a sinusoidal alternating current consisting of one resistor, one capacitor, and one inductor in a series. HP 71B Program: ALTCURR Size: 210 bytes Code: 10 DESTROY F,L,C, R,W,Z,T Example: F = 152 Hz L = 4.75E-3 H (4.75 mH) C = 8E-6 F (8 μF) R = 6400 Ω Results: Magnitude: 6401.24704262 Phase Angle: -1.1309750812° Source: Rosenstein, Morton. Computing With the Scientific Calculator Casio. Japan. 1986. ISBN 1124161430 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(71B) Fun with the 71B '20 - Eddie W. Shore - 07-25-2020 06:35 PM
|
User(s) browsing this thread: 1 Guest(s)