AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: diff

diff(expr, var, x) returns the derivative of expr (a string representing an expression in var evaluating to a real number), as a function of var (a string with a valid identifier) at x, a real number in the domain of definition of expr.

diff(expr, var, x, h) uses the the explicit distance h in the independent variable var when computing the derivative. In some cases, a rather large (e.g. 0.01) value of h might be required, if expr is only computed with a limited resolution.

Examples: diff("sin(x)", "x", 0) = 1
          diff("FresnelC(t)", "t", π/2, 0.01) = -0.782...