A Computer Program for Finding Integer Solutions of Nonlinear Systems of Simultaneous Equations

The computer program below seeks to solve simultaneously the system of eight equations taken from page 11381 of Abraham, Sanyal, and Sanglikar [1] and from page 741 of Perez, Amaya, and Correa [3].  These simultaneous equations are as follows:

X(1)^6     +   X(2) ^6   =   47385
3* X(1)  +18*   X(3)-5*    X(5)+17* X(6)   = 153
X(2) – 5*   X(3)+  3*  X(5)  –       X(6)   )=   -4 
6* X(1)      +      X(3)-99*X(2) +(15*X(6))^2   = 1772
5* X(1)   +10*  X(2)-5*X(3)  +   X(5)  ^3+8*X(6)   =   1772
–   X(1)    +5*   X(2) +8*X(3)-6* X(4)  +15*X(5)+10*X(6)   =  277
(   X(1) +   X(2)   )^2-7*X(3)+5* X(4)+12* X(5)-8*X(6)   = 150
X(1)^2      +   X(2) ^2+   X(3)^2+    X(4)^2  +   X(5)  ^2+   X(6)^2+  X(7)^2    +      X(8)^2 +   X(9)^2    + X(10) ^2    =   956

0 DEFDBL A-Z
1 DEFINT I,J,K,A,X
2 DIM B(99),N(99),A(2002),H(99),L(99),U(99),X(2002),D(111),P(111),PS(33),J(99)
5 DIM AA(99),HR(32),HHR(32),PLHS(44),LB(22),UB(22),PX(44),J44(44),PN(22),NN(99)
88 FOR JJJJ=-32000 TO 32000
89 RANDOMIZE JJJJ
90 M=-3D+30
111 FOR J44=1 TO 10
112 A(J44)=  (  RND *20)
113 NEXT J44
128 FOR I=1 TO 500
129 FOR KKQQ=1 TO 10
130 X(KKQQ)=A(KKQQ)
131 NEXT KKQQ
139 FOR IPP=1 TO FIX(1+RND*3)
140 B=1+FIX(RND*10)
150    R=(1-RND*2)*A(B)
155 IF RND<.5                  THEN         160 ELSE 167
160 X(B)=(A(B)     +RND^3*R)
165 GOTO 168
167 IF RND<.5 THEN X(B)=CINT(A(B)-1) ELSE X(B)=CINT(A(B)     +1)
168 NEXT IPP
169 FOR J44=1 TO 10
170 IF X(J44)<0 THEN 1670
171 NEXT J44
401  N(2)=-47385#+  X(1)^6#     +   X(2) ^6#
411 N(81)= -153#+3#* X(1)  +18#*   X(3)-5#*    X(5)+17#* X(6)
413 N(83)= 4#     +      X(2) – 5#*   X(3)+  3#*  X(5)  –       X(6)
415 N(85)= -1772#+6#* X(1)      +      X(3)-99#*X(2) +(15#*X(6))^2
417 N(87)=-1772#+5#* X(1)   +10#*  X(2)-5#*X(3)  +   X(5)  ^3+8#*X(6)
419 N(89)=  -277#-   X(1)    +5#*   X(2) +8#*X(3)-6#* X(4)  +15#*X(5)+10#*X(6)
421 N(91)= -150#+(   X(1) +   X(2)   )^2-7#*X(3)+5#* X(4)+12#* X(5)-8#*X(6)
892   N(10)= -956# +  X(1)^2      +   X(2) ^2+   X(3)^2+    X(4)^2  +   X(5)  ^2+   X(6)^2+  X(7)^2    +      X(8)^2 +   X(9)^2    + X(10) ^2
922 PD1=-ABS(N(10)) -ABS(N(2)) -ABS(N(81)) -ABS(N(83))        -ABS(N(85))-ABS(N(87))           -ABS(N(89))     -ABS(N(91))
1111 IF PD1<=M THEN 1670
1452 M=PD1
1454 FOR KLX=1 TO 10
1455 A(KLX)=X(KLX)
1456 NEXT KLX
1511 NN(10)=N(10)
1512 NN(2)=N(2)
1514 NN(81)=N(81)
1515 NN(83)=N(83)
1516 NN(85)=N(85)
1517 NN(87)=N(87)
1518 NN(89)=N(89)
1519 NN(91)=N(91)
1557 GOTO 128
1670 NEXT I
1889  IF M<-1 THEN 1999
1904 PRINT A(1),A(2),A(3),A(4),A(5)
1905 PRINT A(6),A(7),A(8),A(9),A(10)
1906 PRINT M,JJJJ
1910 PRINT NN(10),NN(2),NN(81),NN(83)
1911 PRINT NN(85),NN(87),NN(89),NN(91)
1999 NEXT JJJJ

This BASIC computer program was run via basica/D of Microsoft’s GW-BASIC 3.11 interpreter for DOS.  The complete output through JJJJ=-31994 is shown below.  What follows is a hand copy from the computer-monitor screen; immediately below there is no rounding by hand.

6   3   8   1   12
3   20   13   11   2
-1   -32000
1   0   0   0
0   0   0   0

6   3   8   1   12
3   15   6   17   12
-1   -31996
1   0   0   0
0   0   0   0

6   3   8   1   12
3   5   15   9   19
-1   -31995
-1   0   0   0
0   0   0   0

6   3   8   1   12
3   4   15   16   14
0   -31994
0   0   0   0
0   0   0   0

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM, and the IBM basica/D interpreter, version GW BASIC 3.11,  the wall-clock time for obtaining the output through JJJJ=-31994 was two seconds.

Acknowledgment

I would like to acknowledge the encouragement of Roberta Clark and Tom Clark.
 
References

[1] S. Abraham, S. Sanyal, M. Sanglikar (2013), Finding Numerical Solutions of Diophantine Equations Using Ant Colony Optimization.  Applied Mathematics and Computation 219 (2013), Pages 11376-11387.

[2] Microsoft Corp., BASIC, Second Edition (May 1982), Version 1.10. Boca Raton, Florida: IBM Corp., Personal Computer, P. O. Box 1328-C, Boca Raton, Florida 33432, 1981.

[3] O. Perez, I. Amaya, R. Correa (2013),  Numerical Solution of Certain Exponential and Non-linear Diophantine Systems of Equations by Using a Discrete Particles Swarm Optimization Algorithm.  Applied Mathematics and Computation, Volume 225, 1 December 2013, Pages 737-746.