0
$\begingroup$

I am trying to solve a system of non-linear equations where number of valid solutions are unbounded. I am interested in only one valid result.

 y=zeros(6,1);
 y(1)=1000000*x(1)*x(4) + 100000*x(2)*x(4) -120;
 y(2)=1000000*x(1)*x(5) + 100000*x(2)*x(5) + 1000000*x(3)*x(5)-310;
 y(3)=200000*x(3)*x(6) - 200;
 y(4)=1000000*x(1)*x(4) + 1000000*x(1)*x(5) - 30;
 y(5)=100000*x(2)*x(4) + 100000*x(2)*x(5) - 300;
 y(6)=100000*x(3)*x(5) + 200000*x(3)*x(6) - 300;

is there any way in Matlab or R to solve these equations ? I tried solving it using octave's fsolve command but it never converges.

thanks

$\endgroup$
  • $\begingroup$ I trust the answer below that the above cannot be solved, so I'll just say this for future reference. In Matlab you could use fminsearch to solve something like this by defining the cost function to be the sum of the squared error from each equality constraint. For instance, if $y_1 = f_1(\mathbf{x})$ and $y_2 = f_2(\mathbf{x})$, then the cost function would be $c = ( y_1 - f_1(\mathbf{x}))^2 + ( y_2 - f_2(\mathbf{x}))^2$. $\endgroup$ – AnonSubmitter85 Feb 2 '14 at 18:06
1
$\begingroup$

This system cannot be solved.

From $y(1)=0$, you can eliminate $x(4)$; from $y(2)=0$, you can eliminate $x(5)$; from $y(3)=0$, you can eliminate $x(6)$; from $y(4)=0$, you can eliminate $x(3)$; from $y(5)=0$, you can eliminate $x(2)$. When you put all of that in $y(6)$, you end with $0=-90$ !

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.