Ejemplo n.º 1
0
        public override Function Diff()
        {
            Boolean Lconst = false;

            if (LP.Diff().ToString() == "0")
            {
                Lconst = true;
            }
            Boolean Rconst = false;

            if (RP.Diff().ToString() == "0")
            {
                Rconst = true;
            }
            if ((Lconst == true) && (Rconst == true))
            {
                return(new Const(0));
            }
            if (Lconst == true)
            {
                return(new Mul(new Pow(LP, RP), new Ln(LP)));
            }
            if (Rconst == true)
            {
                return(new Mul(new Pow(LP, new Minus(RP, new Const(1))), RP));
            }
            return(new Sum(new Mul(RP, new Mul(LP.Diff(), new Pow(LP, new Minus(RP, new Const(1))))), new Mul(RP.Diff(), new Mul(new Pow(LP, RP), new Ln(LP)))));
        }
Ejemplo n.º 2
0
 public override Function Diff()
 {
     return(new Division(new Minus(new Mul(LP.Diff(), RP), new Mul(LP, RP.Diff())), new Pow(RP, new Const(2))));
 }
Ejemplo n.º 3
0
 public override Function Diff()
 {
     return(new Sum(new Mul(LP.Diff(), RP), new Mul(LP, RP.Diff())));
 }
Ejemplo n.º 4
0
 public override Function Diff()
 {
     return(new Minus(LP.Diff(), RP.Diff()));
 }