two coupled algebraic equations
4 views (last 30 days)
Show older comments
I am trying to solve two coupled algebraic equations with matlab using syms but i gives me "Warning: Explicit solution could not be found. "Although, there are two equations and two unknowns. Is this function is not eligible for this kind of problems, if not could you suggest me the right function? My code is:
if true
syms alpha1 alpha2 k x k12 A B C D F
[solk, solx]= solve(-A*k^2/x+B*(2*k)-x == 0, -1.92*x^2/k-C*k+D*k^2/x+F*(2*k) == 0);
end
thanks in advance ! Recep
0 Comments
Answers (2)
Star Strider
on 5 Nov 2014
Because ‘k’ and ‘x’ are related as fractions, you likely cannot solve for both uniquely. Solve for one as a function of the other, but not both.
Roger Stafford
on 5 Nov 2014
Edited: Roger Stafford
on 5 Nov 2014
Multiply each equation by x/k^2. The first equation becomes a quadratic equation in the ratio x/k and the second one becomes a cubic equation also in x/k. Unless the quadratic and the cubic have a root in common, this means there can be no simultaneous solution to the equations. If there were a common root to the quadratic and the cubic, then there would be infinitely many solutions for x and k.
In other words, the two equations cannot possess a finite set of unique simultaneous solutions.
(Afterthought: I think Star and I are saying much the same thing using different terminology.)
2 Comments
Roger Stafford
on 5 Nov 2014
Edited: Roger Stafford
on 5 Nov 2014
To give you further insight into your two equations, if you were to plot the set of possible (x,k) pairs that satisfy your first equation, say using 'ezplot', you would get either two infinite straight lines running through the origin, one such line, or no lines depending on the coefficients of the quadratic equation but with the exception that the origin itself is excluded because it would make no sense in the equation as it stands. Similarly the solution set for the second equation would be up to three infinite straight lines running through the origin. You could only find a common solution to the two equations (other than the origin of course) if some of the respective lines for the two equations were coincident and then there would obviously be infinitely many solutions.
Your statement "when you have 4 equations with 4 unknowns there must be a solution right?" is not necessarily correct. It all depends on the nature of the equations themselves.
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!