- #1
biomedicalhat
- 9
- 0
Hey,
I have a set of quadratic equations in the form of:
ax^2 -bxy + cy^2 = d
ax^2 -bxz + cz^2 = d
ay^2 -byz + cz^2 = d
where a,b,c,d are given constants.
I am really stuck trying to figure out the values of x,y,z
My previous trial, was attempting to solve it as a least squares problem.. went something like that (I plugged in nice numbers)
Put them in matrix form:
Ax = d
A = [100 200 0 -200 0 0;
100 0 500 0 -200 0;
0 200 500 0 0 -600];
x = [x^2
y^2
z^2
xy
xz
yz]
d = [25
100
25]
Make square matrix system:
Cx = b
where C = At*A, b = At*d
then, I try to get x
x = C^-1*b
The expected values are supposed to give x = y = z = 0.5.
Unfortunately, the values I get are not feasible (negative values for squared varables).
I would really appreciate any hint on what is the best method to solve this problem!
Thank you in advance! :)
I have a set of quadratic equations in the form of:
ax^2 -bxy + cy^2 = d
ax^2 -bxz + cz^2 = d
ay^2 -byz + cz^2 = d
where a,b,c,d are given constants.
I am really stuck trying to figure out the values of x,y,z
My previous trial, was attempting to solve it as a least squares problem.. went something like that (I plugged in nice numbers)
Put them in matrix form:
Ax = d
A = [100 200 0 -200 0 0;
100 0 500 0 -200 0;
0 200 500 0 0 -600];
x = [x^2
y^2
z^2
xy
xz
yz]
d = [25
100
25]
Make square matrix system:
Cx = b
where C = At*A, b = At*d
then, I try to get x
x = C^-1*b
The expected values are supposed to give x = y = z = 0.5.
Unfortunately, the values I get are not feasible (negative values for squared varables).
I would really appreciate any hint on what is the best method to solve this problem!
Thank you in advance! :)