public static void main(String[] args) {
        Funcion rectaNormal = new Funcion() {
            @Override
            public double f(double x) {
                return x;
            }

            @Override
            public double f(double x, double y) {
                return 0;
            }

            @Override
            public double fd(double x) {
                return 1;
            }

            @Override
            public double fdd(double x) {
                return 0;
            }
        };
        double b = 0;
        try {
            b = MetNumericos.biseccion(-2, 2, 0.0001, 20, rectaNormal);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("root = " + b);      //0

        Funcion polinomio = new Funcion() {
            @Override
            public double f(double x) {
                return x-Math.log(x)-2;
            }

            @Override
            public double f(double x, double y) {
                return 0;
            }

            @Override
            public double fd(double x) {
                return -Math.sin(x) - 1/x;
            }

            @Override
            public double fdd(double x) {
                return 0;
            }
        };
        //biseccion
        try {
            b = MetNumericos.biseccion(0.1, 1, 0.000001, 50, polinomio);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("root = " + b);      //0
        //Newton-Raphson
        try {
            double nR = MetNumericos.newtonRaphson(4, 0.0001, 20, polinomio);
            System.out.println("root = " + nR);     //2,69
        } catch (Exception e) {
            e.printStackTrace();
        }
    }