Skip to contents

Expression trees are lists like list("*", "x", 3); sum, product, quotient, power and chain rules, then constant folding.

Usage

morie_geron_symbolic_differentiation(expression, var = "x", at = NULL)

Arguments

expression

Expression tree.

var

Variable name.

at

Optional named list of values to evaluate the derivative.

Value

List with derivative, derivative_str, expression_str, variable and, when at is given, value.

Examples

morie_geron_symbolic_differentiation(expression = 5L)
#> $derivative
#> [1] 0
#> 
#> $derivative_str
#> [1] "0"
#> 
#> $expression_str
#> [1] "5"
#> 
#> $variable
#> [1] "x"
#> 
#> $estimate
#> [1] "0"
#> 
#> $n
#> [1] 1
#>