Friday, September 2, 2016

How To Solve in Integers Nonlinear Systems of Simultaneous Equations

Jsun Yui Wong

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

3 z =x ^ 2 - 2 x y

2 t  =   x ^ 3 + 96 * z ^ 2 - 1

(x - 2y) ^ 2 - 3x = 18.

The system above is based on a system in [9, of the section on "Systems with More Than One Equation"].


0 REM DEFDBL A-Z

2 DEFINT J

3 DIM N(32999), A(32999), H(32999), L(32999), U(32999), X(32999), D(32999), P(32999), PS(32999), J(32999)

12 FOR JJJJ = -32000 TO 32000



    15 RANDOMIZE JJJJ

    16 M = -1D+37

    41 FOR J44 = 1 TO 4


        42 A(J44) = -50 + FIX(RND * 111)


    43 NEXT J44
    128 FOR I = 1 TO 300


        129 FOR KKQQ = 1 TO 4


            130 X(KKQQ) = A(KKQQ)
        131 NEXT KKQQ
        133 FOR IPP = 1 TO (1 + FIX(RND * 3))

            181 J = 1 + FIX(RND * 4)

            182 IF RND < .5 THEN 183 ELSE GOTO 191


            183 R = (1 - RND * 2) * A(J)


            189 X(J) = A(J) + FIX(RND * R)

            190 GOTO 192


            191 IF RND < .5 THEN X(J) = A(J) - 1 ELSE X(J) = A(J) + 1


        192 NEXT IPP


        441 P(12500) = -ABS(3 * X(3) - X(1) ^ 2 + 2 * X(1) * X(2))



        443 PNEW(4) = -ABS(2 * X(4) - X(1) ^ 3 - 96 * X(3) ^ 2 + 1)



        448 PNEWzz(4) = -ABS((X(1) - 2 * X(2)) ^ 2 - 3 * X(1) - 18)



        452 IF PNEW(4) < 0 THEN PNEW(4) = PNEW(4) ELSE PNEW(4) = 0

        455 IF PNEWzz(4) < 0 THEN PNEWzz(4) = PNEWzz(4) ELSE PNEWzz(4) = 0

        459 IF P(12500) < 0 THEN P(12500) = P(12500) ELSE P(12500) = 0

        597 P = P(12500) + (PNEW(4)) + PNEWzz(4)


        1111 IF P <= M THEN 1670
        1452 M = P
        1454 FOR KLX = 1 TO 4


            1455 A(KLX) = X(KLX)
        1456 NEXT KLX
        1557 GOTO 128
    1670 NEXT I

    1889 IF M < 0 THEN 1999

    1947 PRINT A(1), A(2), A(3), A(4), M, JJJJ

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=-15554 is shown below:

-3      0      3      418       0  
-30527

-3      0      3      418       0  
-27402

-3      0      3      418       0  
-26082

-3      0      3      418       0  
-19939

-3      -3      -3      418       0  
-19761

-3      0      3      418       0  
-16701

-3      -3      -3      418       0  
-15554

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 for obtaining the output through
JJJJ= -15554 was forty seconds.      

Acknowledgment

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

References

[1] Jean-Marie de Konnick, Armel Mercier, 1001 Problems in Classical Number Theory.  American Mathematical Society, Providence, Rhode Island, 2007.

[2] Tianmin Han, Yuhuan Han, Solving large scale nonlinear equations by a new ODE numerical integration method, Applied Mathematics, 2010, 1, pp. 222-229.  www.SciRP.org/journal/am.

[3] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations: Theory and experiments. Technical Report RT-04-08, July 2004.
http://www.ime.unicamp.br/~martinez/lmrreport.pdf.

[4] William La Cruz, Jose Mario Martinez, Marcos Raydan, Spectral residual method without gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, vol. 75, no. 255, pp.1429-1448, 2006.

[5] 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.

[6] William H. Mills, A System of Quadratic Diophantine Equations, Pacific Journal of Mathematics, 3 (1953), pp. 209-220.

[7] 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.

[8] Wikipedia, QB64, https://en.wikipedia.org/wiki/QB64.

[9] WOLFRAM, Diophantine Polynomial Systems.  https:/reference.wolfram.com/language/tutorial/DiophantineReduce.html.

[10] Jsun Yui Wong (2013, November 11). Solving Nonlinear Systems of Equations with the Domino Method, Second Edition. http://myblogsubstance.typepad.com/substance/2013/11/solving-nonlinear-systems-of-equations-with-the-domino-method-second-edition.html.

No comments:

Post a Comment