Post Reply 
(12C Platinum) Three Linear Equations in Three Unknowns
12-06-2018, 09:38 AM (This post was last modified: 12-16-2018 03:28 AM by Gamo.)
Post: #1
(12C Platinum) Three Linear Equations in Three Unknowns
This program solve for Simultaneous Equation in Three Unknowns.

Formula used Cramer’s Rule for a 3×3 System (with Three Variables)

Equations:

a1(X) + b1(Y) + c1(Z) = d1
a2(X) + b2(Y) + c2(Z) = d2
a3(X) + b3(Y) + c3(Z) = d3

Detail information on how this formula work by follow this page at

https://www.chilimath.com/lessons/advanc...variables/

------------------------------------

Procedure:

Input each columns from top left down.

a1 [R/S] a2 [R/S] a3 [R/S] b1 [R/S] b2 [R/S] b3 [R/S]
c1 [R/S] c2 [R/S] c3 [R/S] d1 [R/S] d2 [R/S] d3 [R/S] --> Answer

X [R/S] Y [R/S] Z

-----------------------------------
Example:

x - 8y + z = 4
-x + 2y + z = 2
x - y + 2z = -1

1 [R/S] 1 [CHS] [R/S] 1 [R/S]
8 [CHS] [R/S] 2 [R/S] 1 [CHS] [R/S]
1 [R/S] 1 [R/S] 2 [R/S]
4 [R/S] 2 [R/S] 1 [CHS] [R/S] --> -3 [R/S] -0.80 [R/S] 0.60

Answer:
X = -3
Y = -0.8
Z = 0.6

-------------------------------------

Remark:
If Determinant = 0
Display will show 0.000000000 briefly then 0.00
This indicate NO SOLUTIONS

-------------------------------------

Program: (RPN mode)
Code:

001 STO 1  // a1
002 R/S
003 STO 2  // a2
004 R/S
005 STO 3  // a3
006 R/S
007 STO 4  // b1
008 R/S
009 STO 5   // b2
010 R/S
011 STO 6   // b3
012 R/S
013 STO 7   // c1
014 R/S
015 STO 8   // c2
016 R/S
017 STO 9   // c3
018 R/S
019 STO .1  // d1
020 R/S
021 STO .2   // d2
022 R/S
023 STO .3   // d3  // Complete Input
----------------------------------
024 RCL 5
025 RCL 9
026  x
027 RCL 8
028 RCL 6
029  x
030  -
031 RCL 1
032  x
033 RCL 2
034 RCL 9
035  x
036 RCL 8
037 RCL 3
038  x
039  -
040 RCL 4
041  x
042  -
043 RCL 2
044 RCL 6
045  x
046 RCL 5
047 RCL 3
048  x
049  -
050 RCL 7
051  x
052  +
053 STO .4   // Determinant
-----------------------------------
054 X=0
055 GTO 152   // if Determinant = 0 "No Solutions"
056 RCL 5
057 RCL 9
058  x
059 RCL 8
060 RCL 6
061  x
062  -
063 RCL .1
064  x
065 RCL .2
066 RCL 9
067  x
068 RCL 8
069 RCL .3
070  x
071  -
072 RCL 4
073  x
074  -
075 RCL .2
076 RCL 6
077  x
078 RCL 5
079 RCL .3
080  x
081  -
082 RCL 7
083  x
084  +
085 RCL .4
086  ÷
087  R/S   //  (X)
-------------------------
088 RCL .2
089 RCL 9
090  x
091 RCL 8
092 RCL .3
093  x
094  -
095 RCL 1
096  x
097 RCL 2
098 RCL 9
099  x
100 RCL 8
101 RCL 3
102  x
103  -
104 RCL .1
105  x
106  -
107 RCL 2
108 RCL .3
109  x
110 RCL .2
111 RCL 3
112  x
113  -
114 RCL 7
115  x
116  +
117 RCL .4
118  ÷
119 R/S   //  (Y)
-----------------------------
120 RCL 5
121 RCL .3
122  x
123 RCL .2
124 RCL 6
125  x
126  -
127 RCL 1
128  x
129 RCL 2
130 RCL .3
131  x
132 RCL .2
133 RCL 3
134  x
135  -
136 RCL 4
137  x
138  -
139 RCL 2
140 RCL 6
141  x
142 RCL 5
143 RCL 3
144  x
145  -
146 RCL .1
147  x
148  +
149 RCL .4
150  ÷      //  (Z)
151 GTO 000
-----------------------------
152  0
153 FIX 9
154 PSE
155 FIX 2

This program can be use to solve for "Two Equations of Two Unknowns" as well.

Procedure:

x y 0 = c1
x y 0 = c2
0 0 1 = 1

Example:

2X - Y = 15
X + 2Y = 30

2 [R/S] 1 [R/S] 0 [R/S]

1 [CHS] [R/S] 2 [R/S] 0 [R/S]

0 [R/S] 0 [R/S] 1 [R/S]

15 [R/S] 30 [R/S] 1 [R/S] --> 12 [R/S] 9 [R/S] 1

Answer:
X = 12
Y = 9
Ignore 1
--------------------------------------------------------
Program: (ALG Mode)
Remark:
R for [RCL]
ST for [STO]
Quote:ST1 R/S ST2 R/S ST3 R/S
ST4 R/S ST5 R/S ST6 R/S
ST7 R/S ST8 R/S ST9 R/S
ST.1 R/S ST.2 R/S ST.3 // Complete Input of all elements
-------------------------------------------------------
(R5xR9)-(R8xR6)xR1 = ST.4
(R2xR9)-(R8xR3)xR4 = ST.5
(R2xR6)-(R5xR3)xR7 = ST.6
R.4 - R.5 + R.6 = ST0 // Store Determinant
-------------------------------------------------------
(R5xR9)-(R8xR6)xR.1 = ST.4
(R.2xR9)-(R8xR.3)xR4 = ST.5
(R.2xR6)-(R5xR.3)xR7 = ST.6
R.4 - R.5 + R.6 = ÷ R0 = R/S // Answer X
-------------------------------------------------------
(R.2xR9)-(R8xR.3)xR1 = ST.4
(R2xR9)-(R8xR3)xR.1 = ST.5
(R2xR.3)-(R.2xR3)xR7 = ST.6
R.4 - R.5 + R.6 = ÷ R0 = R/S // Answer Y
-------------------------------------------------------
(R5xR.3)-(R.2xR6)xR1 = ST.4
(R2xR.3)-(R.2xR3)xR4 = ST.5
(R2xR6)-(R5xR3)xR.1 = ST.6
R.4 - R.5 + R.6 = ÷ R0 = // Answer Z

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)