This is an old revision of the document!
DM32 Simultaneous Equations
** From the Owners Manual **
Statefile
Provided by Swiss Micros https://technical.swissmicros.com/dm32/examples/STATE/SIMEQ.d32
Local copy simeq.d32
Overview
This set of programs allows the solution of 3×3 and 2×2 systems of equations, as well as the inverse and determinate of the matrix representing the coefficients.
The set of equations is represented by a 3 x 4 array of numbers, with the first 3 columns representing the coefficients of the equations and the 4th column the “value” of the equations.
For example
'' Ax + Dy + Gz = J ''
'' Bx + Ey + Hz = K ''
'' Cx + Fy + Iz = L ''
These equations can be represented in matrix form
''
| A D G | x | J | ||
| B E H | y | = | K | |
| C F I | z | L |
''
This is effectively
'' A x X = B ''
and therefore
'' X = B / A ''
or
''X = B x A-1 ''
The unknown matrix is obtained by multiplying B by the inverse of A
Use
Enter the values of the 3×3 matrix and the 3×1 column vector by using prog. A
- XEQ A
- Enter each value at the prompt followed by R/S
- Once all values
A→Lare entered find the inverse of the coefficient matrix A with prog. I- XEQ I
- Multiply the column vector by this inverse matrix using prog. M
- XEQ M
- This gives the resulting
X,YandZby pressing R/S to step through them
Example
23x + 15y + 17z = 31
8x + 11y - 6z = 17
4x + 15y + 12z = 14
You enter each value in sequence going down the columns in sequence
Which is the opposite sense to the way matrices are entered in DM15L and DM41X
- XEQ A
- 23 R/S
- 8 R/S
- 4 R/S
- 15 R/S
- 11 R/S
- 15 R/S
- 17 R/S
- 6 +/- R/S
- 12 R/S
- 31 R/S
- 17 R/S
- 14 R/S
- Find the inverse XEQ I
- Multiply XEQ M
- Display shows solutions
X = 0.930622R/SY = 0.794258R/SZ = -0.136364
- You can inspect the inverted matrix by running
Aagain- XEQ A
A ? 0.048R/SB ? -0.026R/S- etc….etc…
- You can re-invert A back to the original state by running prog
Iagain - You can see the determinant of A by running prog
D
2x2
The programs expect a 3×3 matrix. If the system is 2×2 you have to use dummy values to pad out to 3×3
Set C, F, H, G, L = 0 and I = 1
e.g.
'' 2x + 3y = 6 ''
'' 8x - 4y = 9 ''
This becomes
'' 2x + 3y + 0z = 6 ''
'' 8x - 4y + 0z = 9 ''
'' 0x + 0y + 1z = 0 ''
and is entered
- XEQ A
- 2 R/S
- 8 R/S
- 0 R/S
- 3 R/S
- 4 +/- R/S
- 0 R/S
- 0 R/S
- 0 R/S
- 1 R/S
- 6 R/S
- 9 R/S
- 0 R/S
- Find the inverse XEQ I
- Multiply XEQ M to find the unknowns
X = 1.59375R/SY = 0.93750R/SZ = 0.00000C
Further Information
Page created : 17/04/26 18:10 BST
Page updated : 17/04/26 19:03 BST