public static final double diff ( String expression , double val ) throws InvalidExpressionException { ExpressionTree expTree = parseToTree ( expression ) ; expTree . derive ( ) ; expTree . reduce ( ) ; return expTree . getVal ( ) ; }
Compute numeric derivative