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

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!

 Accepted Answer

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 Comments

At first thank you for your quick response. I will start from your last question. The one i got right was not a lucky guess. I have solved this system "by hand" (i am not sure this is the appropriate expression in English). However i would like to solve this kind of systems with the symbolic toolbox, since they tend to appear with much more complicated formulations.
As you had the answer immediately, then probably i didn't code it properly. Here is how i used the solve command:
syms b1 b2 b3 a1 real
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));
Solution=solve([v1,v2,v3,v4], b1, b2, b3, a1);
I would me much obliged if you could find my mistake there. Thank you once again!
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.
Thank you for your answer! You were a great help.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!