Last active
February 25, 2017 10:49
-
-
Save jdh30/3230e3928e927a8756bc271efd6ea75c to your computer and use it in GitHub Desktop.
Rewrite rules for simple differentiation in Mathematica syntax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D[_, _] := 0 | |
D[x_, x_] := 1 | |
D[f_ + g_, x_] := D[f, x] + D[g, x] | |
D[f_ - g_, x_] := D[f, x] - D[g, x] | |
D[f_ g_, x_] := f D[g, x] + g D[f, x] | |
D[f_ / g_, x_] := f D[1/g, x] + 1/g D[f, x] | |
D[f_^g_, x_] := f^(g - 1) (g D[f, x] + f Log[f] D[g, x]) | |
D[Log[f_], x_] := D[f, x] / f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment