0
$\begingroup$

My system of equations have both linear and non-linear equations but not quadratic or cubic or equations having variable degree more than one. example :

  x + y = 3 (linear),    y + z = 4 (linear),    x * z = 6 (non-linear),    x / y = 3 (non-linear),    y * z / x = 2 (non-linear) 

There can be hundreds of equation in these system. There is no quadratic or cubic equation.

I want to know which algorithm is best for solving these system of equations and which language is better C or Matlab .

  • 2
    I would use the linear equations to simplify the problem, and then deal with the nonlinear equations. For example, here you can replace $y$ with $3-x$ and $z$ with $1-x$, so the third equation becomes $x(1-x)=6$ (solvable). Then you can back-substitute and see if it solves the rest of your equations.2011-08-26
  • 3
    Matlab has a function fsolve for numerically solving systems of nonlinear equations. C does not. Reinventing the wheel might be a nice exercise, but for practical purposes it's usually best to use existing tools.2011-08-26
  • 1
    Some of these are essentially linear: for example $x/y=3$ is the same as $x-3y = 0$ (and $y\not = 0$)2011-08-26
  • 1
    yz/x = 2 is of degree 2 (it is the same as x = 2yz, which has a term of degree 1 in y + degree 1 in z = total degree 2). What does it mean that there is "no quadratic or cubic equation"? Using multiple equations like x=a, y=a, z=xy one can encode quadratic and higher-degree equations such as z = a+1 instead of a^2 = a + 1.2011-08-26
  • 0
    Worst comes to worst, it might be a good idea to use Gröbner bases for this...2011-08-28

1 Answers 1