Does solve Return an Appropriate Solution for a System of Rational Equations?
Mostra commenti meno recenti
Consider a system of equations with LHS being rational functions in two variables.
syms x y
g = (x-1)/(y-2) == 0;
h = (y-2)/(x-1) == 0;
In solving either equation alone, solve understands that the solution is constrained
sol = solve(g,x,'ReturnConditions',true)
sol = solve(h,y,'ReturnConditions',true)
However, when solving both equations simultaneously solve happily returns an unconstrained solution
sol = solve([g,h],[x,y],'ReturnConditions',true)
which can't be correct.
Is this an appropriate and expected behavior of solve?
The doc page at solve does say that IF using IgnoreAnalyticContraints then:
"The solver can multiply both sides of an equation by any expression except 0."
Maybe the solution above would be expected if IgnoreAnalyticConstraints was true, but it wasn't.
BTW, vpasolve works the same way
vpasolve([g,h],[x,y])
Hoewever, the documentation at vpasolve states:
"When you solve a system of rational equations, vpasolve transforms the rational equations to polynomials by multiplying out the denominators. vpasolve returns all solutions of the resulting polynomial system, which also include the roots of the denominators."
1 Commento
syms x y
g = (x-1)/(y-2) == 0;
h = (y-2)/(x-1) == 0;
solve([g,h],[x,y])
vpasolve([g,h],[x,y])
So if the quote from the documentation applies both to vpasolve and solve, the answer is to be expected (although it is wrong).
Mathematica gives the correct result:
Risposte (0)
Categorie
Scopri di più su Symbolic Math Toolbox in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!