public override IBaseMathOperator CalculateSimplyfy()
        {
            var log = new LogMathOperator();

            log.Instantiate(new [] { A.Simplyfy() });
            return(log);
        }
        public override IBaseMathOperator Derivate()
        {
            var newThis = new ExpotentialOperator();

            newThis.Instantiate(GetChilds());
            if (IsConstant())
            {
                return(new ConstantMathOperator(0));
            }

            if (B is ConstantMathOperator)
            {
                var times    = new MultiplyMathOperator();
                var constant = new ConstantMathOperator(B.Result());
                var expo     = new ExpotentialOperator();
                expo.Instantiate(new [] { A, new ConstantMathOperator(B.Result() - 1) });

                times.Instantiate(new IBaseMathOperator[] { constant, expo });
                return(times);
            }

            var log = new LogMathOperator();

            log.Instantiate(new[] { A });

            if (A is ConstantMathOperator)
            {
                //chain rule
                var leftTimes = new MultiplyMathOperator();
                leftTimes.Instantiate(new[] { A, B.Derivate() });

                var expo2 = new ExpotentialOperator();
                expo2.Instantiate(new[] { leftTimes, B });

                //end..

                var multi = new MultiplyMathOperator();
                multi.Instantiate(new IBaseMathOperator[] { expo2, log });
                return(multi);
            }

            var rightMulti = new MultiplyMathOperator();

            rightMulti.Instantiate(new [] { log, B });

            var result = new MultiplyMathOperator();

            result.Instantiate(new [] { newThis, rightMulti.Derivate() });
            return(result);
        }