Hey guys, I am wondering if it is possible to make something like this.

Lets say I have such variables: A,B,C,D,E,F,G,I. I dont know, lets say 2 variables of those.

A=B+C+D+E
B+C=F
B+C+D=G
D+E=H
E+B+C=I

However it is possible to calculate those variables using these formulas as they are kinda the same. A,B,C,D,E are part of the basic formula. However if you know F and C, you can get B if its unknown etc. Is there such a "repeat" function which loops through until it gets all the variables done and then outputs the each result? Thank you.
Rearrage the systems of equation like this:

A - B - C - D - E = 0
B + C - F = 0
B +C + D - G = 0
D + E -H = 0
B + C + E - I = 0

Create a matrix from this system of equations on a graphing calculator and use reduced row echelon form to solve for each variable:

Code:
```[[1, -1, -1, -1, -1, 0, 0, 0,  0, 0]  [0,  1,  1,  0,  0, -1, 0, 0,  0, 0]  [0,  1,  1,  1, 0,  0, -1, 0,  0, 0] --> [A]  [0,  0,  0,  1,  1, 0,  0, -1, 0, 0]  [0,  1,  1,  0,  1, 0,  0,  0,-1, 0]] rref([A]) ```

rref() will return the value of each variable, although just by looking at this, I don't think this can be completely reduced.

Edit:

The calculator will return:

Code:
```[[1, 0, 0, 0, 0, 0, -1/2, -1/2, -1/2, 0]   [0, 1, 1, 0, 0, 0, -1/2,  1/2, -1/2, 0]   [0, 0, 0, 1, 0, 0, -1/2, -1/2,  1/2, 0]   [0, 0, 0, 0, 1, 0,  1/2, -1/2, -1/2, 0]   [0, 0, 0, 0, 0, 1, -1/2, 1/2, -1/2, 0]```

which translates into:

A = 1/2G + 1/2H + 1/2I
B + C + H = 1/2G + 1/2I
D + I = 1/2G + 1/2H
E + 1/2G = 1/2H + 1/2I
F + 1/2H = 1/2G + 1/2I

That's as simplified as that one gets (meaning that there are infinite solutions). Also, just as a side note, you have 9 variables (why?) and only 5 equations. iirc, you must have at least as many equations as variables (9 variables -> 9 equations) for it to be solveable.
If you already know all of the variables but 2, you can just add extra rows to the bottom of the matrix with a 1 in place of the variable, and the value of that variable in the rightmost column. This counts as an extra equation, so there would be 5 + (9 - 2) = 12 equations.
So, for example, if A is 1, B is 2, and C is 3:
Code:
```[[1, -1, -1, -1, -1, 0, 0, 0,  0, 0]  [0,  1,  1,  0,  0, -1, 0, 0,  0, 0]  [0,  1,  1,  1, 0,  0, -1, 0,  0, 0]  [0,  0,  0,  1,  1, 0,  0, -1, 0, 0]  [0,  1,  1,  0,  1, 0,  0,  0,-1, 0]  [1,  0,  0,  0,  0, 0,  0,  0, 0, 1]  [0,  1,  0,  0,  0, 0,  0,  0, 0, 2]  [0,  0,  1,  0,  0, 0,  0,  0, 0, 3]]```

Even still, it might not always be possible to narrow it down to 1 solution. For example, if you know everything but B and C, you might be able to tell that B+C is 10, but any combination of 2 values of B and C that add to 10 would make all the equations work the same.
If you are able to get a solution, you'll end up with a matrix like this:

Code:
```[[1, 0, 0, A]  [0, 1, 0, B]  [0, 0, 1, C]] ```
where A, B, and C are the actual values of A, B, and C.
Otherwise, there won't be a nice diagonal line of 1's in the matrix, which means there is an infinite number of solutions and you need more info.
Thanks guys for the tips, ill try to understand this.

Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»
» All times are UTC - 5 Hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum