6x6 system of multivariate quadratic equations ... non-negative real solutions
Show older comments
What is the best way (what solver?) to effectively find real non-negative solutions of 6 multivariate quadratic equations (6 variables)?
f_i(x) = 0, i = 1,6, where x = [x1,x2,...,x6] and f_i(x) is the quadratic form with known real coeffs.
9 Comments
Bruno Luong
on 1 Nov 2024
Edited: Bruno Luong
on 1 Nov 2024
This is a chalenging numerical problem.
The wikipedia article states that Newton or optimization lethods are the current state of the art to solve such system.
By Bezout theorem the number of solutions can go up to 2^6 = 64. All descend numerical methods can get trapped to a one of the local minima (up to 64).
For system of 2 you can read to see how people derive the solutions https://arxiv.org/html/2403.08953v1
You'll appreciate the challenge.
Walter Roberson
on 1 Nov 2024
It is just possible that if you were to express the equations symbolically, that solve() would be able to come up with solutions. You would probably have to iterate step-by-step and break the system down into parts. It would be a bit tedious... but probably do-able.
Bruno Luong
on 1 Nov 2024
Edited: Bruno Luong
on 1 Nov 2024
Let's consider a very simple case : If all the quadratic forms are the distance square to 6 given points, then you have a trilateration in 6D space, basically like GPS with 3 more dimensions.
Walter Roberson
on 2 Nov 2024
What is meant here by quadratic equations? Is it the full general form with terms whos total degree does not exceed 2?
f1 = a200000*x(1)^2 + a020000*x(2)^2 + a110000*x(1)*x(2) + a002000*x(3)^2 + a011000*x(2)*x(3) + a101000*x(1)*x(3) + a000200*x(4)^2 + a001100*x(3)*x(4) + a010100*x(2)*x(4) + a100100*x(1)*x(4) + a000020*x(5)^2 + a000110*x(4)*x(5) + a001010*x(3)*x(5) + a010010*x(2)*x(5) + a100010*x(1)*x(5) + a000002*x(6)^2 + a000011*x(5)*x(6) + a000101*x(4)*x(6) + a0010001*x(3)*x(6) + a0100001*x(2)*x(6) + a100001*x(1)*x(6) + a100000*x(1) + a010000*x(2) + a001000*x(3) + a000100*x(4) + a000010*x(5) + a000001*x(6);
? Or is it something simpler?
Bruno Luong
on 3 Nov 2024
Edited: Bruno Luong
on 3 Nov 2024
An homogeneuous quadratic equation is of the form
x' * A * x = 0
where the unknown x is n x 1 and A is n x n and given. Without lost of the generality you can assume A is symmetric (hermitian for complex field) .
An non-homogeneuous quadratic equation is of the form
x' * A * x + b'*x + c = 0
where b is known n x 1 and c is known scalar.
A non-homogeneuous quadratic equation can be considered as homogeneuous quadratic equation in dimension n+1 by the homogenisation as with projective geometry theory. So actually you can considered both forms as your convenience, it just consider the problem of system of quadratic equations in R^5 or R^6 or R^7. I have impression it does simplify a bit the problem.
Walter Roberson
on 4 Nov 2024
To confirm, you have the form:
syms x [6 1]
syms A [6 6]
A = diag(diag(A))
x' * A * x
Bruno Luong
on 4 Nov 2024
"A always contains only one non-zero diagonal element on the ith row/column "
To me it means
Ai(j,j) == 0 is true for i ~= j and
false for i == j.
Accepted Answer
More Answers (2)
Aquatris
on 1 Nov 2024
1 vote
2 Comments
Michal
on 1 Nov 2024
John D'Errico
on 1 Nov 2024
No. There is not. We all want for things that are not possible. Probably more likely to hope for peace in the world. Yeah, right.
I think there is no specialized solver for a system of quadratic equations. Thus a general nonlinear solver ("fsolve","lsqnonlin","fmincon") is the only chance you have.
3 Comments
You shouldn't think about speed at the moment. You are lucky if you get your system solved and if the solution is as expected. A system of quadratic equations is a challenge.
If this works satisfactory, you can save time if you set the solution of the last call to the nonlinear solver to the initial guess of the next call (since you say that your coefficients vary slowly).
Categories
Find more on Systems of Nonlinear Equations 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!