MATLAB Answers

"Warning: Unable to find explicit solution. For options, see help."

42 ビュー (過去 30 日間)
Tatjana 2021 年 1 月 15 日
Trying to solve a system of non-linear equations, but I get the above error message.
Here is my code:
clear all
syms h_1 h_2 h_3 h_4 h_5 h_6 l m_1 m_2 m_3 m_4 m_5 m_6
eq1 = h_6*m_1*m_6+2*h_5*m_1*m_5+h_4*m_1*m_4-2*h_6*(m_3)^2-4*h_5*m_2*m_3-2*h_3*m_1*m_3-2*h_4*(m_2)^2-2*h_2*m_1*m_2-h_1*m_1^2+(h_4*h_6-(h_5)^2)*l == 0;
eq2 = 2*h_6*m_2*m_6-4*h_6*m_3*m_5-4*h_4*m_1*m_5-4*h_5*m_3*m_4-2*h_4*m_2*m_4-4*h_2*m_1*m_4-2*h_1*m_1*m_2+(2*h_3*h_5-2*h_2*h_6)*l == 0;
eq3 = -2*h_6*m_3*m_6-4*h_5*m_2*m_6-4*h_3*m_1*m_6-4*h_4*m_2*m_5-4*h_2*m_1*m_5+2*h_4*m_3*m_4-2*h_1*m_1*m_3+(2*h_2*h_5-2*h_3*h_4)*l == 0;
eq4 = h_6*m_4*m_6-2*h_6*m_5^2-2*h_5*m_4*m_5-4*h_3*m_2*m_5-h_4*m_4^2+2*h_3*m_3*m_4-2*h_2*m_2*m_4+h_1*m_1*m_4-2*h_1*m_2^2+(h_1*h_6-h_3^2)*l == 0;
eq5 = -2*h_6*m_5*m_6-4*h_5*m_4*m_6-4*h_3*m_2*m_6-2*h_4*m_4*m_5+2*h_1*m_1*m_5-4*h_2*m_3*m_4-4*h_1*m_2*m_3+(2*h_2*h_3-2*h_1*h_5)*l == 0;
eq6 = -h_6*m_6^2-2*h_5*m_5*m_6+h_4*m_4*m_6-2*h_4*m_3*m_6+2*h_2*m_2*m_6+h_1*m_1*m_6-2*h_4*m_5^2-4*h_2*m_3*m_5-2*h_1*m_3^2+(h_1*h_4-h_2^2)*l == 0;
eq7 = h_1*h_4*h_6-h_2^2*h_6-h_1*h_5^2+2*h_2*h_3*h_5-h_3^2*h_4-1 == 0;
sols = solve([eq1,eq2,eq3,eq4,eq5,eq6,eq7],[h_1, h_2, h_3, h_4, h_5, h_6, l], 'returnconditions', true)
The m_i are known and I need the solution in terms of the m_i. I know there is a solution but I need to confirm as I cannot solve this by hand.
Is this to hard to solve or is my code wrong? Thanks for any help

  3 件のコメント

Daniel Pollard
Daniel Pollard 2021 年 1 月 15 日
Those equations are massive and very complicated. I'm not in the least bit surprised it found no solutions.
If you're 100% certain there are solutions which it should have found, check your code for errors. If I'd typed that out, even if I was careful, I'm guarunteed a million mistakes.
Tatjana 2021 年 1 月 15 日
Thanks for your answer! Yes they are massive but I pretty much did copy and paste. You see, those h_i are actually entries of a metric and the m_i come from a symmetric matrix. Those eqs come from a function differentiated in different directions. Is there no way I can get a solution for that?
Athrey Ranjith Krishnanunni
Athrey Ranjith Krishnanunni 2021 年 1 月 16 日
It would help to know what the actual mathematical equations are, and the physical context from which they came.


回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by