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

Saturday, September 12, 2026

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations

Trigonometry Reduction Formula and Solving Simple Arcsine and Arccosine Equations




Some Background and Periodic Reduction Formulas


This blog will focus on angle measurement in degrees. For radians and grads, please use the appropriate measurement.


90° = π/2 rad = 100 grad

180° = π rad = 200 grad


sin 90° = 1, sin 180° = 0, sin 360° = 0, sin(-x) = -sin(x)

cos 90° = 0, cos 180° = -1, cos 360° = 1, cos(-x) = cos(x)


General Sums


sin(α + ß) = sin α * cos ß + sin ß * cos α


sin(α + 90°) = sin α * cos 90° + sin 90° * cos α = cos α

sin(α + 180°) = sin α * cos 180° + sin 180° * cos α = -sin α

sin(α + 360°) = sin α * cos 360° + sin 360° * cos α = sin α

sin(90° - α) = sin 90° * cos(-α) + cos 90° * sin(-α) = cos(-α) = cos α

sin(180° - α) = sin 180° * cos(-α) + cos 180° * sin(-α) = -1 * -sin α = sin α


cos(α + ß) = cos α * cos ß – sin α * sin ß


cos(α + 90°) = cos α * cos 90° – sin α * sin 90° = -sin α

cos(α + 180°) = cos α * cos 180° – sin α * sin 180° = -cos α

cos(α + 360°) = cos α * cos 360° – sin α * sin 360° = cos α

cos(90° - α) = cos 90° * cos(-α) – sin 90° * sin(-α) = -sin(-α) = sin α

cos(180° - α) = cos 180° * cos(-α) – sin 180° * sin(-α) = -1 * cos(-α) = -cos α



The Trigonometric Reduction Formula


a * sin(x) + b * cos(x) = √(a² + b²) * sin(x + Θ)


Let x = 90°:

a * sin(90°) + b * cos(90°) = √(a² + b²) * sin(90° + Θ)

a * 1 + b * 0 = √(a² + b²) * cos(Θ)

⇒ cos(Θ) = a ÷ √(a² + b²)


Let x = 180°:

a * sin(180°) + b * cos(180°) = √(a² + b²) * sin(180° + Θ)

a * 0 + b * -1 = √(a² + b²) * -sin(Θ)

-b = -sin(Θ) * √(a² + b²)

⇒ sin(Θ) = b ÷ √(a² + b²)


Then:

sin(Θ) = b ÷ √(a² + b²)

cos(Θ) = a ÷ √(a² + b²)

[sin(Θ) ÷ cos(Θ)] = [ b ÷ √(a² + b²) ] ÷ [ a ÷ √(a² + b²) ]

tan(Θ) = b ÷ a

Θ = arctan(b ÷ a)





Wikibooks uses the Algebraic Argument (see source):



a * sin(x) + b * cos(x)

= [ √(a² + b²) ÷ √(a² + b²) ] * [ a * sin(x) + b * cos(x) ]

= √(a² + b²) * ( a ÷ √(a² + b²) * sin(x) + b ÷ √(a² + b²) * cos(x) )

= √(a² + b²) * ( cos(Θ) * sin(x) + sin(Θ) * cos(x) )

= √(a² + b²) * sin(x + Θ)



Solving Simple Arcsine Equations


The calculator arcsine function gives: Domain: -1 ≤ x ≤ 1, Range: -90° ≤ Θ ≤ 90°


Note that for any angle x: sin(180° - x) = sin(x), sin(x) = sin(x ± 360°*z) (z is an integer)


Given n, solve for Θ:

n = sin(Θ) = sin(180° - Θ)


Base Solution 1:

n = sin(Θ)

⇒ Θ = arcsin(n)


Base Solution 2:

n = sin(180° - Θ)

arcsin(n) = 180° - Θ

⇒ Θ = 180° - arcsin(n)


Example:

0.67 = sin(Θ)

Base Solution 1: Θ = arcsin(0.67) ≈ 42.0670648025°

Base Solution 2: Θ = 180° - arcsin(0.67) ≈ 137.932935198°


Given n and α, solve for Θ:

n = sin(α + Θ)


Base Solution 1:

n = sin(α + Θ)

arcsin(n) = α + Θ

⇒ Θ = arcsin(n) – α


Base Solution 2:

n = sin(180° - (α + Θ))

n = sin(180° - α – Θ)

arcsin(n) = 180° - α – Θ

⇒ Θ = 180° - α – arcsin(n)


Example:

0.7757 = sin(Θ + 76°)

Base Solution 1: Θ = arcsin(0.7757) – 76° ≈ -25.1314549842°

Base Solution 2: Θ = 180° - 76° - arcsin(0.7757) = 104° - arcsin(0.7757) ≈ 53.131459842°


To get all the possible angles, add and subtract multiples of 360°.


Solving Simple Arccosine Equations


The calculator arccosine function gives: Domain: -1 ≤ x ≤ 1, Range: -90° ≤ Θ ≤ 90°


Note that for any angle x: cos(180° - x) = -cos(x), cos(x) = cos(x ± 360°*z) (z is an integer)


Given n, solve for Θ:

n = cos(Θ), n = cos(-Θ)


Base Solution 1:

n = cos(Θ)

⇒ Θ = arccos(n)


Base Solution 2:

n = cos(-Θ)

⇒ Θ = -arccos(n)


Example:

0.58 = cos(Θ)

Base Solution 1: Θ = arccos(0.58) ≈ 54.54945736°

Base Solution 2: Θ = -arccos(0.58) ≈ -54.54945736°


Given n and α, solve for Θ:

n = cos(α + Θ)


Base Solution 1:

n = cos(α + Θ)

arccos(n) = α + Θ

⇒ Θ = arccos(n) – α


Base Solution 2:

n = cos(-(α + Θ))

n = cos(-α – Θ)

arccos(n) = -α – Θ

-arccos(n) = α + Θ

⇒ Θ = -arccos(n) – α


Example:

0.6 = cos(35° + Θ)

Base Solution 1: Θ = arccos(0.6) – 35° ≈ 18.13012035°

Base Solution 2: Θ = -arccos(0.6) – 35° ≈ -88.13010235°



To get all the possible angles, add and subtract multiples of 360°.



Sources

Sterling, Mary Jane. Trigonometry for Dummies. 2nd Edition. John Wiley & Sons, Inc. Hoboken, NJ. 2014. pp. 351-352. ISBN 978-1-118-82741-3


“Trigonometry/Simplifying a sin(x) + b cos(x)”. Wikibooks. January 2, 2024. Retrieved January 4, 2026. https://en.wikibooks.org/wiki/Trigonometry/Simplifying_a_sin(x)_%2B_b_cos(x)


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.


Saturday, May 9, 2026

Solving Simple Arcsine and Arccosine Equations

 Solving Simple Arcsine and Arccosine Equations



Angle Measure

This document will focus on angle measurement in degrees. For radians and grads, please use the appropriate measurement.


90° = π/2 rad = 100 grad

180° = π rad = 200 grad



Simple Arcsine Equations


The calculator arcsine function gives: Domain: -1 ≤ x ≤ 1, Range: -90° ≤ Θ ≤ 90°


Note that for any angle x: sin(180° - x) = sin(x), sin(x) = sin(x ± 360°*z) (z is an integer)


Given n, solve for Θ:

n = sin(Θ) = sin(180° - Θ)


Base Solution 1:

n = sin(Θ)

⇒ Θ = arcsin(n)


Base Solution 2:

n = sin(180° - Θ)

arcsin(n) = 180° - Θ

⇒ Θ = 180° - arcsin(n)


Example:

0.67 = sin(Θ)

Base Solution 1: Θ = arcsin(0.67) ≈ 42.0670648025°

Base Solution 2: Θ = 180° - arcsin(0.67) ≈ 137.932935198°


Given n and α, solve for Θ:

n = sin(α + Θ)


Base Solution 1:

n = sin(α + Θ)

arcsin(n) = α + Θ

⇒ Θ = arcsin(n) – α


Base Solution 2:

n = sin(180° - (α + Θ))

n = sin(180° - α – Θ)

arcsin(n) = 180° - α – Θ

⇒ Θ = 180° - α – arcsin(n)


Example:

0.7757 = sin(Θ + 76°)

Base Solution 1: Θ = arcsin(0.7757) – 76° ≈ -25.1314549842°

Base Solution 2: Θ = 180° - 76° - arcsin(0.7757) = 104° - arcsin(0.7757) ≈ 53.131459842°


To get all the possible angles, add and subtract multiples of 360°.



Solving Simple Arccosine Equations


The calculator arccosine function gives: Domain: -1 ≤ x ≤ 1, Range: -90° ≤ Θ ≤ 90°


Note that for any angle x: cos(180° - x) = -cos(x), cos(x) = cos(x ± 360°*z) (z is an integer)


Given n, solve for Θ:

n = cos(Θ), n = cos(-Θ)


Base Solution 1:

n = cos(Θ)

⇒ Θ = arccos(n)


Base Solution 2:

n = cos(-Θ)

⇒ Θ = -arccos(n)


Example:

0.58 = cos(Θ)

Base Solution 1: Θ = arccos(0.58) ≈ 54.54945736°

Base Solution 2: Θ = -arccos(0.58) ≈ -54.54945736°


Given n and α, solve for Θ:

n = cos(α + Θ)


Base Solution 1:

n = cos(α + Θ)

arccos(n) = α + Θ

⇒ Θ = arccos(n) – α


Base Solution 2:

n = cos(-(α + Θ))

n = cos(-α – Θ)

arccos(n) = -α – Θ

-arccos(n) = α + Θ

⇒ Θ = -arccos(n) – α


Example:

0.6 = cos(35° + Θ)

Base Solution 1: Θ = arccos(0.6) – 35° ≈ 18.13012035°

Base Solution 2: Θ = -arccos(0.6) – 35° ≈ -88.13010235°



To get all the possible angles, add and subtract multiples of 360°.



I hope you find this useful and helpful,


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.


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.

Python: Drawing a Ring of Circles

Python: Drawing a Ring of Circles The goal: Draw a number of circles that revolve around the origin (0,0). The center of each circle i...