Exemple #1
0
        /// <summary>
        /// Calculate partial differentiation of function, represented as expression
        /// </summary>
        /// <seealso cref="Differentiate(INode,int,string)"/>
        /// <param name="e"></param>
        /// <param name="index"></param>
        /// <param name="variable"></param>
        /// <returns></returns>
        public static Expression Differentiate(Expression e, int index = 0, String variable = "")
        {
            var node = Expressions2Tree.Parse(e);

            return(Tree2Expression.Parse(Differentiate(node, index, variable)));
        }
Exemple #2
0
 /// <summary>
 /// Simplify expression, using simplification rules from <see cref="RulesLibrary"/>
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 public static Expression Simplify(Expression e)
 {
     return(Tree2Expression.Parse(Simplify(Expressions2Tree.Parse(e))));
 }