<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello,<br>
      <br>
      Le 15/10/2018 à 20:39, rsherry8 a écrit :<br>
    </div>
    <blockquote cite="mid:5BC4DEF8.7040508@comcast.net" type="cite">I am
      trying to solve a system of two non-linear equations using fsolve.
      I define the following two functions:
      <br>
      <br>
      function z=g1(x,y)
      <br>
      z = x^2 + y^2
      <br>
      endfunction
      <br>
      <br>
      function z=g2(x,y)
      <br>
      z = x^4 + y^4 - 20
      <br>
      endfunction
      <br>
      <br>
      When I type something like: g2(2,2)
      <br>
      I get 12 which is right.
      <br>
      <br>
      I then run the following command:
      <br>
          [xres]=fsolve([0,0],g1,g2);
      <br>
    </blockquote>
    <br>
    If it is provided, g2() must be the jacobian of g1(): it must
    compute and evaluate the partial derivatives of g1(), with respect
    to x and to y.<br>
    That's definitely not the case with your g2(). It should rather
    return something like [2*x 2*y].<br>
    <br>
    For what you likely want to do, here are two examples (extracted
    from a document of mine in french, sorry):<br>
    <img src="cid:part1.81482709.0457B423@free.fr" alt="" height="268"
      width="545"><br>
    <br>
    Actually, the fsolve() page is rather poor : both given examples are
    about a single variable.<br>
    <a class="moz-txt-link-freetext" href="https://help.scilab.org/docs/6.0.1/en_US/fsolve.html">https://help.scilab.org/docs/6.0.1/en_US/fsolve.html</a><br>
    <br>
    fsolve() is a key function. We should improve its help page.<br>
    <br>
    HTH<br>
    Samuel<br>
    <br>
  </body>
</html>