solve nonlinear equations silumtaneously

1 view (last 30 days)
hi
i have four nonlinear equations with three unknowns kindly help me to solve it using matlab te equations are
v1=v+(c*n1^-a),
v2=v+(c*n2^-a),
v3=v+(c*n3^-a),
v4=v+(c*n4^-a)
only the unknown variables are v,c and a
so how to solve them
i hve tried to use the solve command but it didnt worked....
  3 Comments
Haris Hameed
Haris Hameed on 23 Apr 2012
i get
v1f =
9.7722388976929995256469179038868
which is wrong kindly guide me in this regard

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 23 Apr 2012
Careful, there are multiple solutions. You might have gotten out a structure array, and then [Y.v Y.c Y.a] would have all the v values followed by all the c values followed by all the a values. Index that at (1), (2), and (3) and you might be using unexpected values.
The primary solution, by the way, is a = 0 and the other two infinite.
Warning: there are two solutions with nearly identical "c" and "v" but fairly different "a". Precision counts in this matter.
  2 Comments
Haris Hameed
Haris Hameed on 23 Apr 2012
i have tried to solve it differently but for this i have to solve some part by hand like solving equations and eliminating the unknown and trying to get equation with only one unknown as displayed below as "eq"
but this could be some how done with matlab????? the unknown i obtained now satisfy the four equations but how could this be done using matlab solver not solving hand???????????????
v1= 81;
v2= 82;
v3= 83;
v4= 84;
n1=2000;
n2=1500;
n3=1000;
n4=500;
syms aa
eq = v1-(((v2-v1)/(n2^-aa-n1^-aa))*n1^-aa)+(((v2-v1)/(n2^-aa-n1^-aa))*n3^-aa) - v3;
a = solve(eq)
c=(v2-v1)/((n2^-a)-(n1^-a));
v=v1-(c*n1^-a);
%check
v1f=v+(c*n1^-a)
v2f=v+(c*n2^-a)
v3f=v+(c*n3^-a)
v4f=v+(c*n4^-a)
Walter Roberson
Walter Roberson on 23 Apr 2012
Computer Aided Algebra and Computer Aided Mathematics systems are usually not good at finding all the roots of transcendental equations. It is not difficult to create an equation (e.g., like yours) for which there is no known analytical method of finding the roots. And if you try to proceed numerically, then you run into problems with numeric precision and with not knowing how many roots there are, and so on. Trying to proceed with calculus methods, such as looking for the minimum points of f(x)^2, often encounters the problem that the differential of transcendental functions is usually transcendental: you might happen to be able to numerically locate another solution or two that way, but you will usually have difficulty in knowing whether you found them all.
Using a different package, I find a minimum of 7 distinct solutions for the equations that you show. 3 of those are real-valued, and the others are complex-valued. There is nothing in your problem statement that prohibits complex-valued solutions.
Often, the only effective way you have of dealing with equations such as these is to use your knowledge of the system the equations are describing in order to provide constraints on the values, thus limiting the search region. And then you solve(), yes, but you take the ambiguous analytic solution and pick it apart within the valid range, using your knowledge of algebra and calculus to guide you. And plenty of plots. There is no mechanical solution method in such cases.

Sign in to comment.

More Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!