There's also this - http://code.jsoftware.com/wiki/Scripts/nlls - an
implementation of the Levenberg-Marquardt algo that I cribbed from someone
who copied it from APL.
On Thu, Aug 10, 2017 at 6:47 PM, Don Kelly wrote:
> I also suggest that you look at references to the use of NR for power
> syst
I also suggest that you look at references to the use of NR for power
system load flow problems which are non-linear and generally expressed
in terms of complex numbers in the polar format. These do converge
well. I haven't written one in J but one written in APL has 11 readable
lines-most o
Solving many algebraic equations in many unknowns can be done by eliminating
the unknowns one by one obtaining many algebraic equations in one unknown each,
and then solving these equations numerically.
Example: Two equations in two unknowns. 0 = (x^2)+(y^2)-16 = (y-2) .
0 = y-2 = y(y-2) = (y^2)
I find it interesting that N-R works for vectors and complex functions (and
mixes of both). Just replace all those scalar functions by their vector
equivalents:
vn=: 1 : '- n * u %. u D.1'
I added a scaling factor; it makes the convergence slower, but it fixes
problems due to precision-loss.
> Is it also possible to solve a system of equation like the following
one… ?
Basically, yes.
Because not only can x = (x1,x2) be a vector, but so can y = (y1,y2) in
this adaptation of your equations:
y1 = a*(1-x1)
y2 = b*(x2-x1^2)
TABULA is an app (distributed as a JAL "addon") which employs