summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/rules.txt b/rules.txt
index aa1f44d..9a005ee 100644
--- a/rules.txt
+++ b/rules.txt
@@ -64,7 +64,12 @@ Negative {a} | Product [Number (-1),{a}]
## differentiation
:d:[{{n:Number}},{x}] | Number 0
+
+-- these two differentiation rules should be tried in THIS order.
+-- Better: guard for d(x,y) that x!=y...
:d:[{{x:Variable}},{{x}}] | Number 1
+:d:[{{x:Variable}},{{y}}] | Number 0
+
:d:[Sum [{{a}},{b}],{{x}}] | Sum [:d:[{a},{x}],:d:[{b},{x}]]
:d:[Product [{{n:Number}},{a}],{x}] | Product [{n},:d:[{a},{x}]]
:d:[Product [{{a}},{b}],{x}] | Sum [Product [:d:[{a},{x}],{b}],Product [{a},:d:[{b},{x}]]]