Showing posts with label solving equations. Show all posts
Showing posts with label solving equations. Show all posts

Saturday, January 31, 2026

RPN: HP 11C: Transferring Between Bases (Common/Natural)

RPN: HP 11C: Transferring Between Bases (Common/Natural)



All algorithms were tested with the HP 11C.



Between the Exponential Function and Common-Antilog


e^α = 10^ß


Given α, what is ß?


ß = log(e^α)


RPN:

<input α>

e^x

LOG


Examples (Fix 6):

e^1.05 = 10^ß

ß ≈ 0.456009


e^(-2.2) = 10^ß

ß ≈ -0.955448


Given ß, what is α?


α = ln(10^ß)


RPN:

<input ß>

10^x

LN


Examples (Fix 6):

e^α = 10^5.4

α ≈ 12.433960


e^α = 10^0.366

α ≈ 0.842746


Between the Natural Logarithm and Common Logarithm


log α = ln ß


Given α, what is ß?

ẞ = exp(log α)


RPN:

<input α>

LOG

e^x


Examples (Fix 6):

log 17 = ln ß

ß ≈ 3.422766


log 317 = ln ß

ß ≈ 12.195405



Given ß, what is α?

α = 10^(ln ß)



RPN:

<input ß>

LN

10^x



Examples (Fix 6):

log α = ln 425

α ≈ 1,127,428.915



log α = ln 9.81

α ≈ 192.044677




Eddie


All original content copyright, © 2011-2026. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Thursday, October 30, 2025

HP 67 Programs… Almost 50 Years Later

 HP 67 Programs… Almost 50 Years Later


Both downloads are in PDF format. This is for use for the HP 67 and its emulators, or really almost any RPN scientific calculator. Enjoy!



Volume 1:


https://drive.google.com/file/d/114H4D0hcOjxDj_MHQNvwDBUJV3chlpdC/view?usp=sharing


Countdown of HP 67 "seconds"

Random Numbers

Snell's Law

Circle: Area and Circumference

Sphere: Surface Area and Volume

Angle Between 2 Lines with Slopes x and y

Sum of Powers

Adding Complex Numbers

Multiplying Complex Numbers

Complex Number to a Real Power

Permutation

Combination (with duplicating X and Y stack values)

Speed of Sound Approximation (in meters per second)

Finance: Present Value Annuity Factor (including setting N and I% with monthly payments)

Distance Between Two Points (x,y) and (z,t)

Horizontal Curve


Volume 2:

https://drive.google.com/file/d/1RPK2C879JeiyReox1SOTeAOQc_7QYdUN/view?usp=sharing

Sigmoid Function

Logit Function

Solving Linear Equations

Solving Monic Quadratic Polynomials (real roots only)

Intensity of a Spherical Light Source

Determinant of a 2 x 2 Matrix

Air Density of Dry Air

Time Dilation Factor

Simple Interest

Calculus: Area Under the Curve of a Linear Function

Horizontal Curve Solution given Radius and Central Angle

Freezing Altitude Levels: Dry and Wet

HP 67 Solvers:

Temperature Conversions

Cost-Sell-Margin

Decibel Gain/Loss




Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


Saturday, February 22, 2025

Casio fx-991 CW: Solving Linear Systems of Complex Numbers

Casio fx-991 CW: Solving Linear Systems of Complex Numbers


Introduction


The fx-991 CW is a capable calculator. It even handles complex number calculations and linear systems up to four variables. So we should be able to handle problems such as:


(A + Bi) * (x + yi) + (C + Di) * (z + ti) = E + Fi

(G +Hi) * (x + yi) + (J + Ki) * (z + ti) = L + Mi


where i=√-1 and A, B, C, D, E, F, G, H, J, K, L, and M are real and imaginary parts of complex numbers.


Well, yes. But the Equation mode does not allow for complex numbers, and the complex mode handles arithmetic and rectangular/polar conversions. True. However, all is not lost.


If we multiply the left side of both equations, we get:


(A * x – B * y + C * z – D * t) + (B * x + A * y + D * z + C * t)i = E + Fi

(G * x – H * y + J * z – K * t) + (H * x + G * y + K * z + J * t)i = L + Mi


Equating the real and imaginary parts, we get four equations since the real and imaginary parts are separated by addition.


A * x – B * y + C * z – D * t = E (real part)

B * x + A * y + D * z + C * t = F (imaginary part)

G * x – H * y + J * z – K * t = L (real part)

H * x + G * y + K * z + J * t = M (imaginary part)


In this form, we can use the linear system solver of the fx-991CW (as well as many other calculators).


In matrix form:


[ [ A, -B, C, D ] [ [ x ]   [ [ E ]

[ B, A, D, C ]   * [ y ]  = [ F ]

[ G, -H, J, -K ]   [ z ]    [ L ]

[ H, G, K, J ] ]   [ t ] ]  [ M ] ]



Casio fx-991CW: Algorithm


Step 1. Press the [ HOME ] key and select Equation.


Step 2. Select Simul Equation.


Step 3. Select 4 Unknowns.


Step 4. Set up the equations as follows:

A * x – B * y + C * z – D * t = E

B * x + A * y + D * z + C * t = F

G * x – H * y + J * z – K * t = L

H * x + G * y + K * z + J * t = M


Step 5. Press [ EXE ], or [ SHIFT ] [ EXE ] (≈) for all approximate solutions. Scroll to see the results x, y, z, and t. In the default setting, every answer, except for x is expressed in standard form. I’m not sure why this is. This is your solution to x + yi and z + ti.


Step 6. To do a new calculation, press [ EXE ] again.


Examples


Example 1:


(6 + 4i) * (x + yi) + (2 + 5i) * (z + ti) = 11 + 63i

(8 + 14i) * (x + yi) + (16 + 7i) * (z + ti) = 213 + 105i


Set up the four equations as:


6x – 4y + 2z – 5t = 11

4x + 6y + 5z + 2t = 63

8x -14y + 16z – 7t = 213

14x + 8y + 7z + 16t = 105


Results:

x ≈ -1.682508574

y = -2109 / 2041 ≈ -1.033317001

z = 2239 / 157 ≈ 14.2611465

t = 363 / 157 ≈ 2.312101911


x + yi ≈ -1.682508574 – 1.033317001i

z + ti ≈ 14.2611465 + 2.312101911i


Example 2:


(3 + 3i) * (x + yi) + (-9 + 7i) * (z + ti) = -4 + 2i

(-5 + 3i) * (x + yi) +(2 + 8i) * (z + ti) = 11 + 0i


Set up the four equations as:


3x – 3y - 9z – 7t = -4

3x + 3y + 7z - 9t = 2

-5x - 3y + 2z – 8t = 11

3x - 5y + 8z + 2t = 0


Results:


x ≈ -1.252444271

y = -1245 / 5114 ≈ -0.2434493547

z = 2131 / 5114 ≈ 0.4166992569

t = -2029 / 5114 ≈ -0.3967540086


x + yi ≈ -1.252444271 – 0.2434493547i

z + ti ≈ 0.4166992569 – 0.3967540086i


Until next time, take care,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, January 11, 2025

RPN with HP 15C & DM32: Solving Simple Systems

RPN with HP 15C & DM32: Solving Simple Systems


Welcome to another edition of RPN with HP 15C & DM32.


Many Approaches to a Solving Problems


This blog covers two ways to solve the simple linear system of two equations:


x + y = a

x – y = b


In matrix form:


[ [ 1, 1 ] [ 1, - 1] ] * [ [ x ] [ y ] ] = [ [ a ] [ b ]


The inverse of the coefficient matrix [ [ 1, 1 ] [ 1, - 1] ]:


[ [ 1, 1 ] [ 1, - 1] ] ^-1 = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ]


[ [ x ] [ y ] ] = [ [ 0.5, 0.5 ] [ -0.5, 0.5 ] ] * [ [ a ] [ b ] ]


The solution to the system is:


x = (a + b) / 2

y = (a – b) / 2



As far as keying the solutions in the calculator, we can address this two ways. The first, and probably the easier method, is to use memory registers. The second is to use stack operations such as swap (x<>y), roll up (R↑), roll down (R↓), enter (ENTER) as duplication, and the Last X function (LST x). Both the HP 15C and DM32 use a four-level stack.



The Memory Register Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


Y: y

X: x


Memory Registers used:


HP 15C: R1 = a, R2 = b

DM32: A, B


HP 15C Code:


001

42, 21, 11

LBL A

002

44, 2

STO 2

003

34

X<>Y

004

44, 1

STO 1

005

30

-

006

16

CHS

007

2

2

008

10

÷

009

45, 2

RCL 2

010

45, 40, 1

RCL + 1

011

2

2

012

10

÷

013

43, 32

RTN



DM32 Code (31 bytes):


T01 LBL T

T02 STO B

T03 x<>y

T04 STO A

T05 -

T06 +/-

T07 2

T08 ÷

T09 RCL B

T10 RCL + A

T11 2

T12 ÷

T13 RTN


The Stack Approach


Start with the stack as follows:


Y: a

X: b

The results are presented as:


T : original contents of the z stack

Z: original contents of the z stack

Y: y

X: x


This time no memory registers are used


HP 15C Code:


001

42, 21, 12

LBL B

002

40

+

003

43, 36

LST x

004

2

2

005

20

×

006

34

X<>Y

007

36

ENTER

008

33

R↓

009

30

-

010

16

CHS

011

2

2

012

10

÷

013

43, 33

R↑

014

2

2

015

10

÷

016

43, 32

RTN



DM32 Code (24 bytes):


S01 LBL S

S02 +

S03 LAST x

S04 2

S05 ×

S06 x<>y

S07 ENTER

S08 R↓

S09 -

S10 +/-

S11 2

S12 ÷

S13 R↑

S14 2

S15 ÷

S16 RTN



Examples


Example 1:

x + y = 32

x – y = 16


32 ENTER 16 (run program)


Results: y = 8, x = 24


Example 2:

x + y = 9

x – y = -8


Results: y = 8.5, x = 0.5



Until next time,


Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, June 29, 2024

TI 30Xa Algorithms: Solving Monic Quadratic Polynomials Quickly

 TI 30Xa Algorithms: Solving Monic Quadratic Polynomials Quickly


We all know about the tried and true Quadratic Formula to solve quadratic equations. However, it is not the only way to tackle such problems.



Today’s blog is covers a way to quickly get the roots of the quadratic equation:


x^2 + p * x + q = 0


I am focusing on monic quadratic polynomials today. A polynomial is a monic polynomial if the leading coefficient is 1. In this instance, the coefficient of the x^2 term is 1. I’m also going to work with quadratic equations that have real roots.



Deviation


Please see the source article as the derivation and method is explained by the author Po-Shen Loh (https://www.poshenloh.com/quadraticdetail/). This method has also been developed by Viete and other classic mathematicians. Here I attempt to explain a derivation of this method.


Let r1 and r2 be the two roots of the polynomial and x^2 + p * x + q factors to:

x^2 + p * x + q = (x – r1) * (x – r2)


Expanding (x – r1) * (x – r2):

(x – r1) * (x – r2) = x^2 + (-r1 -r2) * x + r1 * r2


Then:

p = - r1 – r2 ⇒ r1 + r2 = -p

q = r1 * r2


Let one of the roots be defined as: [see Source]

r1 = -p/2 + u

Then:

r1 + r2 = -p

-p/2 + u + r2 = -p

r2 = -p/2 + u


And:

r1 * r2 = q

(-p/2 + u) * (-p/2 - u) = q

p^2/4 – u^2 = q

- u^2 = q – p^2/4

u^2 = p^2/4 – q

u = ±√(p^2/4 – q)


And the roots are:

r1 = -p/2 + √(p^2/4 – q)

r2 = -p/2 - √(p^2/4 – q)


x = -p/2 ± u


Note:

r1 = -p/2 + u

r1 – 2 * u = -p/2 + u – 2 * u

r1 – 2 * u = -p/2 – u

r1 – 2* u = r2



We can verify the above result with the quadratic equation:


x = (-p ± √( p^2 – 4 * q)) / 2

x = -p/2 ± √( p^2 – 4 * q) / 2

x = -p/2 ± √(( p^2 – 4 * q) / 4)

x = -p/2 ± √(( p^2/4 – q)

x = -p/2 ± u




TI-30Xa Algorithm: Quadratic Equation


Assumption: The roots are real (not complex).


Keystrokes:

p [ STO ] 1

q [ STO ] 2

[ ( ] [ RCL ] 1 [ x^2 ] [ ÷ ] 4 [ - ] [ RCL ] 2 [ ) ] [ √ ] (u)

[ - ] [ RCL ] 1 [ ÷ ] 2 [ = ] (r1, root 1)

[ ± ] [ - ] [ RCL ] 1 [ = ] (r2, root 2)


Memory registers used: M1 = p, M2 = q


Examples


Example 1: x^2 – 3*x – 4 = 0


p = -3, r = -4


3 [ ± ] [ STO ] 1

4 [ ± ] [ STO ] 2

[ ( ] [ RCL ] 1 [ x^2 ] [ ÷ ] 4 [ - ] [ RCL ] 2 [ ) ] [ √ ] (u = 2.5)

[ - ] [ RCL ] 1 [ ÷ ] 2 [ = ] (root 1, x = 4)

[ ± ] [ - ] [ RCL ] 1 [ = ] (root 2, x = -1)


x = 4, -1


Example 2: x^2 – 24*x + 135 = 0

p = -24, r = 135


24 [ ± ] [ STO ] 1

135 [ STO ] 2

[ ( ] [ RCL ] 1 [ x^2 ] [ ÷ ] 4 [ - ] [ RCL ] 2 [ ) ] [ √ ] (u = 3)

[ - ] [ RCL ] 1 [ ÷ ] 2 [ = ] (root 1, x = 15)

[ ± ] [ - ] [ RCL ] 1 [ = ] (root 2, x = 9)


x = 15, 9


Example 3: x^2 + 10*x + 24 = 0

p = 10, r = 24

10 [ STO ] 1

24 [ STO ] 2

[ ( ] [ RCL ] 1 [ x^2 ] [ ÷ ] 4 [ - ] [ RCL ] 2 [ ) ] [ √ ] (u = 1)

[ - ] [ RCL ] 1 [ ÷ ] 2 [ = ] (root 1, x = -4)

[ ± ] [ - ] [ RCL ] 1 [ = ] (root 2, x = -6)


x = -4, -6



Source


Loh, Po-Shen. “Quadratic Method: Detailed Explanation” Updated August 6, 2021. Retrieved May 19, 2024. https://www.poshenloh.com/quadraticdetail/


Until next time, have a great day. For the Americans, have a safe and sane Fourth of July. See you July 6!


Eddie


All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

TI-84 Plus CE: Logistic Map

TI-84 Plus CE: Logistic Map It feels like forever since I with the TI-84 Plus CE. Introduction The program LOGISTIC plots ...