# Solve a Set of Equations with Constraints and Interchangeable Varaibles

9 views (last 30 days)
MarshallSc on 10 Jun 2021
Edited: Adam Danz on 24 Jun 2021
Hello, is there any way to solve the equations below using interchangeability algorithm (function of X in 4 dimensions-i,j,k,l)? I’m not a computer science guy and apparently interchangeability algorithm can solve the equations and render multiple solutions with the constraints that are within the equations (The Rs and Hs are known).
R_i-(X_l*X_j) * H_k=0;
R_j-(X_k*X_i) * H_l=0;
R_k-(X_j*X_l) * H_i=0;
R_l-(X_i*X_k) * H_j=0;
The (I ; j) pair and (k ; l) pair are interchangeable.
Each equation apparently is quadratic (I don’t understand this part about it, but the Xs correspond to each other).
I would really appreciate if someone can at least make a suggestion or give their opinion as to what approach can be used.
##### 2 CommentsShowHide 1 older comment
Rik on 24 Jun 2021
I fully agree with Adam. That is also the reasons why Mathworks decided to hide the delete button when an answer has been posted. (and editing away your question is both rude and pointless, as there is now a capture of this thread)

John D'Errico on 10 Jun 2021
I think you are worrying about some magic algorithm, when simple linear algebra will suffice. Yes. LINEAR algebra.
Each equation is of the same form
Ri = X_i*X_j*H_k
TAKE THE LOG. Then you have
log(R_i) - log(H_k) = log(X_i) + log(X_j)
So your equations are LINEAR in the log of the unknowns. Solve the linear system for the unknowns. Again, this is linear algebra.
You will find the linear system is singular, at least as you wrote the equations, so no solution will exist unless something rare happens with the constant terms. And if that does happen, then infinitely many solutions will eist.
MarshallSc on 12 Jun 2021
Thanks a lot again Walter, really appreicate your kind responses. I still haven't figured out how I can solve the equations and what method I can use. I guess that's the beauty of research. But I appreciate you very much.