• #### Solving system of non-linear equations

From David Dooner@21:1/5 to All on Tue Mar 30 05:21:35 2021
All,

I have a system of non-linear equations. Below is my current operator. Hmm, I have doubts. I look online for related code and find below by Stephan Mansour:

https://www.deepdyve.com/lp/association-for-computing-machinery/using-defined-operators-and-function-arrays-to-solve-non-linear-0CRfFEIce6

It's dated Sept 1993. I look in SIGAPL for the article and Sept. is missing.

https://dl.acm.org/toc/sigapl/1993/24/1

Please share if you have APL code for solving non-linear equations. FYI, I'm using APL2 (ex to be).

Thanks,
David

Z←(FN ZERO_NEWTON)X;⎕IO;X0;FX;TOL

⍝ Newton's method to find roots to system of eqs. (see ZERO_SECANT for scalar version)

⍝ Form of function FN is the following (sample: FCT_CUTTER_SETUP_I)
⍝ FN[1;] -- 1st equation
⍝ FN[2;] -- 2nd equation
⍝ FN[3;] -- 3rd equation
⍝ FN[n;] -- nth equation

⎕IO←1
TOL←0.00001
Z←(0,2×⍴,X)⍴0
L1:X0←X
FX←FN X0
Z←Z,[1]FX,X0
X←X0-FX⌹FN JACOBI X
→(TOL<+/(X-X0)*2)/L1
Z←X

Z←(FN JACOBI)X;⎕IO;∆;N;∆X

⍝ Jacobian of function FN evaluated at 'X' (see ZERO_NEWTON, OPTI_NEWTON, HESSIAN)

⎕IO←1
∆←0.0001
N←⍳⍴X←∊X
∆X←⊂[1]∆×N∘.=N
Z←-⍉⊃((⊂FN X)-FN¨∆X+⊂X)÷∆

--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
• From ekimlpa@gmail.com@21:1/5 to David Dooner on Tue Mar 30 12:00:21 2021
On Tuesday, March 30, 2021 at 8:21:36 AM UTC-4, David Dooner wrote:
All,

I have a system of non-linear equations. Below is my current operator. Hmm, I have doubts. I look online for related code and find below by Stephan Mansour:

https://www.deepdyve.com/lp/association-for-computing-machinery/using-defined-operators-and-function-arrays-to-solve-non-linear-0CRfFEIce6

It's dated Sept 1993. I look in SIGAPL for the article and Sept. is missing.

https://dl.acm.org/toc/sigapl/1993/24/1

Please share if you have APL code for solving non-linear equations. FYI, I'm using APL2 (ex to be).

Thanks,
David

[[ snipped ]]

The dl.acm.org link in your message points to the Table of Contents for the APL93 Conference Proceedings.

If you scroll down through the list of articles, the one you want is the 18th. Clicking on the article title links to the abstract and some metadata. The full text is behind ACM's paywall and costs \$15 for anybody, \$10 for ACM members, or \$5 for ACM
student members.

ACM SIGPLAN members have free access to all SIGPLAN proceedings, which now includes all SIGAPL conference proceedings. SIGPLAN membership ( https://www.sigplan.org/Membership ) for a year is \$25 (\$15 for students), and is thus less expensive if you end
up needing as few as 2 articles.

--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
• From ekimlpa@gmail.com@21:1/5 to David Dooner on Tue Mar 30 11:27:43 2021
On Tuesday, March 30, 2021 at 8:21:36 AM UTC-4, David Dooner wrote:
All,

I have a system of non-linear equations. Below is my current operator. Hmm, I have doubts. I look online for related code and find below by Stephan Mansour:

https://www.deepdyve.com/lp/association-for-computing-machinery/using-defined-operators-and-function-arrays-to-solve-non-linear-0CRfFEIce6

It's dated Sept 1993. I look in SIGAPL for the article and Sept. is missing.

https://dl.acm.org/toc/sigapl/1993/24/1

Please share if you have APL code for solving non-linear equations. FYI, I'm using APL2 (ex to be).

Thanks,
David

Z←(FN ZERO_NEWTON)X;⎕IO;X0;FX;TOL

⍝ Newton's method to find roots to system of eqs. (see ZERO_SECANT for scalar version)

⍝ Form of function FN is the following (sample: FCT_CUTTER_SETUP_I)
⍝ FN[1;] -- 1st equation
⍝ FN[2;] -- 2nd equation
⍝ FN[3;] -- 3rd equation
⍝ FN[n;] -- nth equation

⎕IO←1
TOL←0.00001
Z←(0,2×⍴,X)⍴0
L1:X0←X
FX←FN X0
Z←Z,[1]FX,X0
X←X0-FX⌹FN JACOBI X
→(TOL<+/(X-X0)*2)/L1
Z←X

Z←(FN JACOBI)X;⎕IO;∆;N;∆X

⍝ Jacobian of function FN evaluated at 'X' (see ZERO_NEWTON, OPTI_NEWTON, HESSIAN)

⎕IO←1
∆←0.0001
N←⍳⍴X←∊X
∆X←⊂[1]∆×N∘.=N
Z←-⍉⊃((⊂FN X)-FN¨∆X+⊂X)÷∆

--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)
• From David Dooner@21:1/5 to eki...@gmail.com on Tue Mar 30 12:56:36 2021
On Tuesday, March 30, 2021 at 3:00:22 PM UTC-4, eki...@gmail.com wrote:
On Tuesday, March 30, 2021 at 8:21:36 AM UTC-4, David Dooner wrote:
All,

I have a system of non-linear equations. Below is my current operator. Hmm, I have doubts. I look online for related code and find below by Stephan Mansour:

https://www.deepdyve.com/lp/association-for-computing-machinery/using-defined-operators-and-function-arrays-to-solve-non-linear-0CRfFEIce6

It's dated Sept 1993. I look in SIGAPL for the article and Sept. is missing.

https://dl.acm.org/toc/sigapl/1993/24/1

Please share if you have APL code for solving non-linear equations. FYI, I'm using APL2 (ex to be).

Thanks,
David
[[ snipped ]]

The dl.acm.org link in your message points to the Table of Contents for the APL93 Conference Proceedings.

If you scroll down through the list of articles, the one you want is the 18th. Clicking on the article title links to the abstract and some metadata. The full text is behind ACM's paywall and costs \$15 for anybody, \$10 for ACM members, or \$5 for ACM
student members.

ACM SIGPLAN members have free access to all SIGPLAN proceedings, which now includes all SIGAPL conference proceedings. SIGPLAN membership ( https://www.sigplan.org/Membership ) for a year is \$25 (\$15 for students), and is thus less expensive if you end
up needing as few as 2 articles.

Thank you, I was able to purchase a copy.

--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)