Beispiel #1
0
        public Derivadas(Tangentes TAN, Variables Var)
        {
            string Res;

            if (TAN.Argumento.Contains(Var.Nombre))
            {
                Polinomio       = new Polinomios(TAN.Argumento);
                DerivadaInterna = new Derivadas(Polinomio, Var).Result;
                Operacion       = new PotenciaEntera(TAN.Simbolo, "2");
                //REVISAR SI TOCA DESCORCHAR CORCHETES DE LA BASE DE LA POTENCIA
                string Temporal = EProceso.CorchetesClear(Operacion.Result);
                Res       = Temporal + TAN.Op + TAN.Argumento + TAN.Cl;
                Operacion = new CocienteEntero("1", Res);
                Res       = Operacion.Result;

                Operacion = new ProductoEntero(TAN.Coeficiente, DerivadaInterna.ToString());
                Operacion = new ProductoEntero(Operacion.Result, Res);
                Result    = Operacion.Result;
                //Result = $"{DerivadaInterna.ToString()}{new ProductoEntero().Simbolo}{Res}"; PAUSADO PARA EXPERIMENTAR SI SE CORRIGIO EL BUG
            }
            else
            {
                Result = $"{Modulo}";
            }
        }
Beispiel #2
0
        private static void TEST_Console_TAN_Derivada()
        {
            string    Entrada = "2*x";
            Tangentes TAN     = new Tangentes();

            TAN.SetArgumento(Entrada);
            Derivadas DER = new Derivadas(TAN, new Variables("x"));

            Console.WriteLine($"ENTRADA          {TAN.Result}");
            Console.WriteLine($"DERIVADA         {DER.Result}");
            Console.WriteLine("--------------------------------------");
            Console.ReadKey();
        }
Beispiel #3
0
        private static void TEST_Consola_Tangente()
        {
            string Entrada = "tan<-2>";

            Entrada = "x^{2}*tan<ln<2>>";
            Tangentes TAN = new Tangentes(Entrada);

            Console.WriteLine($"{TAN.Nombre}");
            Console.WriteLine($"CONTENIDO     {TAN.Contenido}");
            Console.WriteLine($"ARGUMENTO     {TAN.Argumento}");
            Console.WriteLine($"COEFICIENTE   {TAN.Coeficiente}");
            Console.WriteLine($"RESULTADO     {TAN.Result}");
            Console.WriteLine("-------------------------------");
            Console.ReadKey();
        }