Esempio 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)))));
        }
Esempio 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))));
 }
Esempio n. 3
0
 public override Function Diff()
 {
     return(new Sum(new Mul(LP.Diff(), RP), new Mul(LP, RP.Diff())));
 }
Esempio n. 4
0
 public override Function Diff()
 {
     return(new Minus(LP.Diff(), RP.Diff()));
 }