How do i reach the parametrized solutions of a system of nonlinear equations?

조회 수: 3 (최근 30일)
Hi to all,
I have to deal with a system of 4 nonlinear equations of the following form:
v1 = (b1*b2)/(b2+b3);
v2 = -(b1^2*b2*b3)/(b2 + b3)^3;
v3 = (b1^3)*b2*b3*(2*b3-b2)/(b2+b3)^5;
v4 = (b1*b2)/(a1*(b2+b3));
Using the solve command i tried to solve the system with a1, b1, b2 and b3 being the unknowns. What i expected (probably due to my insufficient knowledge regarding the Symbolic toolbox) was the solutions to be expressed as functions of v1, v2, v3 and v4. For example, a1 = v1/v4, or something like that. Instead, i get the following warning:
Warning: The solutions are parametrized by the symbols:
u7 = R_
u8 = R_
x = R_
y21 = R_
y22 = R_
y23 = R_
y24 = R_
y25 = R_
y26 = R_
ans =
a1: [5x1 sym]
b1: [5x1 sym]
b2: [5x1 sym]
b3: [5x1 sym]
How can someone evaluate such an answer? How could i use it? If there is any interpretation of this kind of results, it would me much appreciated.
Thank you all in advance!

채택된 답변

Roger Stafford
Roger Stafford 2013년 6월 2일
It is strange that you had trouble on those particular four equations using 'solve'. On my very ancient Symbolic Toolbox it immediately coughed up the solution without any hesitation:
b1 = v1*(v3*v1-3*v2^2)/(v3*v1-2*v2^2);
b2 = v1^2*v2/(v3*v1-3*v2^2);
b3 = -v1^2*v2^3/(v3*v1-3*v2^2)/(v3*v1-2*v2^2);
a1 = v1/v4; % <-- You had that one right!
Are you sure you informed 'solve' properly as to which were to be regarded as the four unknowns? It is important to do that. How did you determine that a1 is equal to v1/v4?
  댓글 수: 3
Roger Stafford
Roger Stafford 2013년 6월 2일
편집: Roger Stafford 2013년 6월 2일
Yes, that code is in error. The entities that appear in 'solve' should be those you want to set to zero! You were unknowingly trying to set the v's to zero and that is not what you want to accompllish. Try this:
syms b1 b2 b3 a1,v1,v2,v3,v4 real
f1 = (b1*b2)/(b2+b3)-v1;
f2 = -(b1^2*b2*b3)/(b2 + b3)^3-v2;
f3 = (b1^3)*b2*b3*(2*b3-b2)/(b2+b3)^5-v3;
f4 = (b1*b2)/(a1*(b2+b3))-v4;
Solution=solve([f1,f2,f3,f4], b1, b2, b3, a1);
Note: The expression "by hand" is correct usage here. I also did this by hand before I realized to my chagrin that my old Symbolic Toolbox could actually solve it.
kknd
kknd 2013년 6월 4일
Thank you for your answer! You were a great help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by