vpasolve: numeric instability when solving a system of three quadratic equations

1 visualizzazione (ultimi 30 giorni)
Hello everybody,
Does anybody know why vpasolve could give this warning message when trying to solve a system of three quadratic equations? No valid solutions are found when it happens.
Warning: Solution '[u = -2.5286701614737728998253152777292, v = -3.7031043121341872713420994690679, w = 7.2317744736079601711674147467972]' seems to be affected by some numeric instability. Inserting this solution into equation '- 1830*u^2 - 1209*u + 61*v^2 + 61*w^2 + 39 = 0' produces the residue '-4578.4... [numeric::polysysroots::checkstability]
The code for the system of equations is the following:
% LUT dimensions
dim = 32
max = dim - 1
idxu = 1
idxv = 4
idxw = 26
du = idxu/max
dv = idxv/max
dw = idxw/max
% Symbols
syms u v w
% Lambda
l=0.61
% Equations
eq1 = du == (l*u^2 + (1-l)*u)/(l*(u^2+v^2+w^2)+(1-l));
eq2 = dv == (l*v^2 + (1-l)*v)/(l*(u^2+v^2+w^2)+(1-l));
eq3 = dw == (l*w^2 + (1-l)*w)/(l*(u^2+v^2+w^2)+(1-l));
% Restrictions
init_guess = [0 1; 0 1; 0 1]
assume(u, 'real')
assume(v, 'real')
assume(w, 'real')
% Solve
[su, sv, sw] = vpasolve([eq1, eq2, eq3], [u,v,w], init_guess)
Other values of idxu,idxv,idxw (1,3,27 for instance) do not cause vpasolve to generate warnings at all.
I don't understand the reason for this, I'm basically working with barycentric coordinates (u,v,w) and the system of equations only performs a conversion within the valid range of barycentric coords (all components belong to [0 1] and their sum equal 1).
Any help would be appreciated!

Risposte (3)

Yinghui You
Yinghui You il 27 Feb 2018
I met the same problem ,Have you got the answer?If so,would you like to tell me about that?(..My poor English)

Alex Sha
Alex Sha il 10 Dic 2019
The unique stable results are:
u: 0.241646208739371
v: -1.29626943837113
w: 2.05462322963176

Chidvi Modala
Chidvi Modala il 27 Ott 2020
Hi,
You can refer to a similar question answered here

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by