Sunday, January 22, 2017

Simultaneously Solving in General Integers a Nonlinear System of 42 Simultaneous Equations, Including Transcendental Equations, in 41 General Integer Variables

Jsun Yui Wong

The computer program listed below seeks to solve simultaneously the following nonlinear system of equations:

X(44)^ + X(45)^2 + X(46)^2 +...+  X(84)^2  =  636,

-1 + LOG(X(82)) - X(83) - X(84) =0,

X(84) = -2 + X(82) ^ 2 + X(83) ^ 2,

X(82) + EXP(X(83)) + X(84) - 1 =0,

X(78) = -X(79) - X(80) - X(81),

LOG(X(78)) + X(79) + LOG(X(80)) + X(81) + 2 =0,

X(78) * X(79) * X(80) - X(81) =0,

X(78) - EXP(X(79)) + X(80) + EXP(X(81)) - 2 =0,

X(74) = -X(75) ^ 3 + 5 * X(75) ^ 2 + X(75) + 10,

-29 + X(74) + X(75) ^ 3 + X(75) ^ 2 - 14 * X(75) =0,

X(76) = -X(77) ^ 3 + 5 * X(77) ^ 2 + 2 * X(77) + 11,

-29 + X(76) + X(77) ^ 3 + X(77) ^ 2 - 14 * X(77)=0,

-5 + 10 * X(71) - 2 * X(72) ^ 2 + X(72) - 2 * X(73) ^ 2 = 0,

-12 + 8 * X(72) ^ 2 + 4 * X(73) ^ 2 = 0,

8 + 8 * X(72) * X(73) = 0,

X(67) = -10 + X(65) ^ 2 + 10 * X(66),

-12 + 15 * X(65) + X(66) - 4 * X(67) = 0,

24 + X(66) - 25 * X(67) = 0,

-7 + 10 * X(68) - 2 * X(69) ^ 2 + X(69) - 2 * X(70) ^ 2 = 0,

-12 + 8 * X(69) ^ 2 + 4 * X(70) ^ 2 = 0,

8 + 8 * X(69) * X(70) = 0,

X(54) = -X(52) ^ 2,

X(52) * COS(X(53)) - X(54) = 0,

(EXP(X(52) + X(54))) * SIN(X(53) / 2) + X(54) = 0,

X(55) ^ 5 + X(56) ^ 3 * X(57) ^ 4 + 1 = 0,

X(55) * X(56) * X(57) = 0,

X(57) ^ 4 - 1 = 0,

X(44) * X(45) * X(46) * X(47) * X(48) * X(49) * X(50) * X(51) = 1,

X(44) = -2 * X(45) - X(46) - X(47) - X(48) - X(49) - X(50) - X(51) + 9,

2 * X(44) + X(45) + X(46) + X(47) + X(48) + X(49) + X(50) + X(51) = 9,

X(44) + X(45) + 2 * X(46) + X(47) + X(48) + X(49) + X(50) + X(51) = 9,

X(44) + X(45) + X(46) + 2 * X(47) + X(48) + X(49) + X(50) + X(51) = 9,

X(44) + X(45) + X(46) + X(47) + 2 * X(48) + X(49) + X(50) + X(51) = 9,

X(44) + X(45) + X(46) + X(47) + X(48) + 2 * X(49) + X(50) + X(51) = 9,

X(44) + X(45) + X(46) + X(47) + X(48) + X(49) + 2 * X(50) + X(51) = 9,

-18 - X(61) * (X(61) + 1) + 2 * X(62) =0,

-25 + (X(61) - 1) ^ 2 + (X(62) - 6) ^ 2=0,

X(63) ^ 2 - 10 * X(63) + X(64) ^ 2 + 8=0,

X(63) * X(64) ^ 2 + X(63) - 10 * X(64) + 8=0,

X(41) ^ 2 + X(42) - 37 = 0,

X(41) - X(42) ^ 2 - 5 = 0,

X(41) + X(42) + X(43) - 3 = 0,

and

-10<= Integers X(i)<= 20 for i= 44 through 84.

Equation 2 to equation 8 above are based on page 47 of Greenspan and Casulli [4]. The next four equations are based on page 510 of Burden and Faires [3], and the next nine are based on page 604 of Burden and Faires [2]. The next six equations come from Johnson and Riess [5]-- the first three from p. 194 and the other three from p. 198. The next eight equations are based on p. 510 of Burden and Faires [3, p. 510]. The last seven equations come from p. 648 and p. 649 of Burden, Faires, and Burden [1].

One notes line 13 and line 189, which are 13 A(KNEW) = -10 + FIX(RND * 30.98) and
189 IF RND < .5 THEN X(B) = A(B) - FIX(1 + RND * 5.99) ELSE X(B) = A(B) + FIX(1 + RND * 5.99), respectively.

0 REM DEFDBL A-Z
3 DEFINT J, K, X
4 DIM X(342), A(342), L(333), K(333)
12 FOR JJJJ = -32000 TO 32000
    13 A(KNEW) = -10 + FIX(RND * 30.98)

    14 RANDOMIZE JJJJ

    16 M = -1D+317

    91 FOR KK = 44 TO 84

        94 A(KK) = A(KNEW)


    95 NEXT KK
    128 FOR I = 1 TO 200000


        129 FOR K = 44 TO 84


            131 X(K) = A(K)
        132 NEXT K
        155 FOR IPP = 1 TO FIX(1 + RND * 3)
            181 B = 44 + FIX(RND * 41)


            182 IF RND < -.1 THEN 183 ELSE GOTO 189

            183 R = (1 - RND * 2) * A(B)
            186 X(B) = A(B) + (RND ^ 3) * R
            187 REM IF RND < .25 THEN X(B) = A(B) + RND * R ELSE IF RND < .333 THEN X(B) = A(B) + RND ^ 4 * R ELSE IF RND < .5 THEN X(B) = A(B) + RND ^ 7 * R ELSE X(B) = CINT(A(B))
            188 GOTO 191
            189 IF RND < .5 THEN X(B) = A(B) - FIX(1 + RND * 5.99) ELSE X(B) = A(B) + FIX(1 + RND * 5.99)

        191 NEXT IPP
        255 FOR J45 = 44 TO 84


            256 IF X(J45) < -10 THEN X(J45) = A(J45)


            257 IF X(J45) > 20 THEN X(J45) = A(J45)


        259 NEXT J45


        451 X(54) = -X(52) ^ 2


        453 N44 = X(52) * COS(X(53)) - X(54)
        455 N45 = (EXP(X(52) + X(54))) * SIN(X(53) / 2) + X(54)

        461 N46 = X(55) ^ 5 + X(56) ^ 3 * X(57) ^ 4 + 1



        463 N47 = X(55) * X(56) * X(57)



        465 N48 = X(57) ^ 4 - 1



        499 X(44) = -2 * X(45) - X(46) - X(47) - X(48) - X(49) - X(50) - X(51) + 9



        501 N35 = 2 * X(44) + X(45) + X(46) + X(47) + X(48) + X(49) + X(50) + X(51) - 9

        504 N38 = X(44) + X(45) + 2 * X(46) + X(47) + X(48) + X(49) + X(50) + X(51) - 9
        505 N39 = X(44) + X(45) + X(46) + 2 * X(47) + X(48) + X(49) + X(50) + X(51) - 9
        506 N40 = X(44) + X(45) + X(46) + X(47) + 2 * X(48) + X(49) + X(50) + X(51) - 9
        507 N41 = X(44) + X(45) + X(46) + X(47) + X(48) + 2 * X(49) + X(50) + X(51) - 9
        508 N42 = X(44) + X(45) + X(46) + X(47) + X(48) + X(49) + 2 * X(50) + X(51) - 9
        509 N43 = X(44) * X(45) * X(46) * X(47) * X(48) * X(49) * X(50) * X(51) - 1


        601 X(58) = X(59) ^ 2 + 5



        602 N49 = X(58) ^ 2 + X(59) - 37


        604 N50 = X(58) + X(59) + X(60) - 3

        651 N51 = -18 - X(61) * (X(61) + 1) + 2 * X(62)


        652 N52 = -25 + (X(61) - 1) ^ 2 + (X(62) - 6) ^ 2

        661 N53 = X(63) ^ 2 - 10 * X(63) + X(64) ^ 2 + 8

        663 N54 = X(63) * X(64) ^ 2 + X(63) - 10 * X(64) + 8


        671 X(67) = -10 + X(65) ^ 2 + 10 * X(66)

        673 N55 = -12 + 15 * X(65) + X(66) - 4 * X(67)
        675 N56 = 24 + X(66) - 25 * X(67)

        681 N57 = -7 + 10 * X(68) - 2 * X(69) ^ 2 + X(69) - 2 * X(70) ^ 2
        683 N58 = -12 + 8 * X(69) ^ 2 + 4 * X(70) ^ 2
        685 N59 = 8 + 8 * X(69) * X(70)



        691 N60 = -5 + 10 * X(71) - 2 * X(72) ^ 2 + X(72) - 2 * X(73) ^ 2
        693 N61 = -12 + 8 * X(72) ^ 2 + 4 * X(73) ^ 2
        695 N62 = 8 + 8 * X(72) * X(73)

        751 X(74) = -X(75) ^ 3 + 5 * X(75) ^ 2 + X(75) + 10
        755 N63 = -29 + X(74) + X(75) ^ 3 + X(75) ^ 2 - 14 * X(75)

        851 X(76) = -X(77) ^ 3 + 5 * X(77) ^ 2 + 2 * X(77) + 11


        855 N64 = -29 + X(76) + X(77) ^ 3 + X(77) ^ 2 - 14 * X(77)
        901 X(78) = -X(79) - X(80) - X(81)

        902 IF X(78) < .1 THEN GOTO 1670


        903 IF X(80) < .1 THEN GOTO 1670


        904 N66 = LOG(X(78)) + X(79) + LOG(X(80)) + X(81) + 2


        906 N67 = X(78) * X(79) * X(80) - X(81)

        909 N68 = X(78) - EXP(X(79)) + X(80) + EXP(X(81)) - 2

        921 X(84) = -2 + X(82) ^ 2 + X(83) ^ 2

        923 IF X(82) < .1 THEN GOTO 1670

        925 N69 = -1 + LOG(X(82)) - X(83) - X(84)


        927 N70 = X(82) + EXP(X(83)) + X(84) - 1
        951 SUMJAN = 0

        963 FOR JJAN = 44 TO 84


            955 SUMJAN = SUMJAN + X(JJAN) ^ 2

        958 NEXT JJAN

        1287 P = -ABS(N44) - ABS(N45) - ABS(N46) - ABS(N47) - ABS(N48) - ABS(N49) - ABS(N50) - ABS(N51) - ABS(N52) - ABS(N53) - ABS(N54) - ABS(N55) - ABS(N56) - ABS(N57) - ABS(N58) - ABS(N59) - ABS(N60) - ABS(N61) - ABS(N62) - ABS(N63) - ABS(N64) - ABS(N65) - ABS(N66) - ABS(N67) - ABS(N68) - ABS(N69) - ABS(N70) - ABS(N33) - ABS(N34) - ABS(N35) - ABS(N36) - ABS(N37) - ABS(N38) - ABS(N39) - ABS(N40) - ABS(N41) - ABS(N42) - ABS(N43) - ABS(SUMJAN - 636)


        1451 IF P <= M THEN 1670
        1657 FOR KEW = 44 TO 84


            1658 A(KEW) = X(KEW)
        1659 NEXT KEW
        1661 M = P

    1670 NEXT I
    1888 IF M < -4 THEN 1999

    1917 PRINT A(44), A(45), A(46), A(47), A(48), A(49), A(50), A(51), M, JJJJ

    1918 PRINT A(52), A(53), A(54), A(55), A(56), A(57), A(58), A(59), A(60), A(61), A(62), A(63), A(64), A(65), A(66), A(67), A(68), A(69), A(70), A(71), A(72), A(73), A(74), A(75), A(76), A(77), A(78), A(79), A(80), A(81), A(82), A(83), A(84)

1999 NEXT JJJJ

This computer program was run with qb64v1000-win [8]. Copied by hand from the screen, the computer program’s complete output through JJJJ=-6187 is shown below:

1       1       1       1       1 
1       1       1       -4       -29356    
0       0       0      0      -1        
1       6       1       -4       -2
10       1       1       1       1
1       1       -1       1       1
1       -1       15       -1       15
-1       1       -1       1       -1
1       0       -1

1       1       1       1       1
1       1       1       -3.012512       -28188 
1       3       -1       -1      0 
-1       6       1       -2        -2
10       1       1       1       1
1       1       1       -1       1
-1       1       15       -1       15
-1       1       -1       1       -1
1       0       -1

1       1       1       1       1
1       1       1       0        -16280
0       0       0      -1       0              
1       6       1       -4       -2
10       1       1       1       1
1       1       1       -1       1
-1       1       15       -1       15
-1       1       -1       1       -1
1       0       -1

1       1       1       1       1
1       1       1       -1.479426        -12332 
0      -1      0      0      -1
1       6       1       -4       -2
10       1       1       1       1
1       1       1       -1       1
-1       1       15       -1       15
-1       1       -1       1       -1
1       0       -1

1       1       1       1       1
1       1       1       0        -6187  
0       0       0      -1      0
1       6       1       -4       -2
10       1       1       1       1
1       1       1       -1       1
-1       1       15       -1       15
-1       1       -1       1       -1
1       0       -1

Above there is no rounding by hand; it is just straight copying by hand from the screen.

On a personal computer with a Pentium Dual-Core CPU E5200 @2.50GHz, 2.50 GHz, 960 MB of RAM and with qb64v1000-win [8], the wall-clock time through JJJJ=-6187 was ten hours.  

Acknowledgment

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

References
[1] R. Burden, J. Faires, A. Burden, Numerical Analysis, Tenth Edition. Cengage Learning, 2016.
[2] R. Burden, J. Faires, Numerical Analysis, Sixth Edition. Brooks/Cole Publishing Company, 1996.
[3] R. Burden, J. Faires, Numerical Analysis, Third Edition. PWS Publishers, 1985.
[4] D. Greenspan, V. Casulli, Numerical Analysis for Applied Mathematics, Science, and Engineering. Addison-Wesley Publishing Company, 1988
[5] L. W. Johnson, R. D. Riess, Numerical Analysis, Second Edition. Addison-Wesley Publishing Company, 1982
[6] 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.
[7] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.
[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64.