summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2016-07-01 08:58:32 +0200
committerTom Smeding <tom.smeding@gmail.com>2016-07-01 08:58:32 +0200
commit8d9d27d64d9e39ea76fd878e928e553944735e45 (patch)
tree4621931f5831e7f365480b8e32c507e21ee75851
parenta65c127558fc96b13ea515194ac28f8b09e065c6 (diff)
Differentiate to more than one variable
-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}]]]