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:
dim = 32
max = dim - 1
idxu = 1
idxv = 4
idxw = 26
du = idxu/max
dv = idxv/max
dw = idxw/max
syms u v w
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));
init_guess = [0 1; 0 1; 0 1]
[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!