A OCaml program to derivate functions.
derivation [-v VARIABLE] [-e EXPRESSION] [-h]| Option | Description | Default |
|---|---|---|
| -v | Variable to derivate | |
| -e | Expression to derivate | |
| -h | Show help |
If no option is given, the program will read from stdin. And the default derivation variable is x.
$ derivation -v x -e "x^2 + 2*x + 1"
2x + 2
$ derivation -v x -e "x^2 + 2*x + 1" | derivation -v x
2
$ derivation -v x -e "(x*y)^2 + 2 * x * y + 1" | derivation -v y
2 * x * y + 2y * x + 2The program can derivate the following functions:
sincostanexplnsqrtasinacosatanlog10log2abs