public static double[] MethodNewton(double y[]) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        double[] x = new double[func.length];
        x = Arrays.copyOf(y, y.length);
        //Количество итераций
        int k = 10;
        //Точность
       // System.out.println("Точность итераций: ");
        double e1 = 1e-6;
        double e2 = 1e-6;


        for (int i = 0; i < k; i++) {
            double[] F = discrepancy(x, func);
            double[][] J = Jacobian(x, dfunc);
            double[] cloneOfX = MethodOfGauss.copyMatrix(x);

            MethodOfGauss.Gauss(J, F);
            double[] dx = MethodOfGauss.reverseGauss(J, F);

            for (int j = 0; j < x.length; j++) {
                x[j] -= dx[j];
            }

            double d1 = MethodOfGauss.rate(discrepancy(x, func));
            double d2 = rate(x,cloneOfX);

           // System.out.print("k= " + i);
           // System.out.println("| d1=" + d1 + ", d2= " + d2);


            if (d1 < e1 && d2 < e2) {
                k = i;
                break;
            }

        }

        for (int i = 0 ; i < x.length; i++) {
      //      System.out.print(x[i] + "  ");
        }
      //  System.out.println("\n" + "k = " + k);



        return x;
    }