[Jprogramming] Multidimensional Root Finding with Newton Solver

Martin dev at famic.de
Thu Aug 10 18:07:25 UTC 2017


Hi there,

J looks very interesting. I have no previous experience with array
languages and, being curious, started to experiment.  Now, I would
like to solve a system of non-linear equations. I could only examples
solving single equations like this one:

  N=: 1 : '- u % u d. 1'   NB. Adverb implementing Newton-Raphson iteration.
  (_2 + *:) N^:_ ]1        NB. Find root of “0 = _2+x^2”, starting guess of “1”.

Is it also possible to solve a system of equation like the following
one in a similar elegant manner?

  f1(x) = a*(1-x1)
  f2(x) = b*(x2-x1^2)

Example from https://www.gnu.org/software/gsl/doc/html/multiroots.html#examples

Thanks for any ideas!
-Martin



More information about the Programming mailing list