Cadabra
a field theory motivated approach to computer algebra

product_rule

Apply the Leibnitz rule to a derivative of a product
Apply the product rule or "Leibnitz identity" to an object which has the Derivative property, i.e.
D{#}::Derivative; ex:=D(f g); product_rule(_);
\(\displaystyle{}\text{Attached property Derivative to }D{\#}.\)
\(\displaystyle{}D\left(f g\right)\)
\(\displaystyle{}D{f} g+f D{g}\)
This of course also works for derivatives which explicitly mention indices or components, as well as for multiple derivatives, as in the example below.
D{#}::Derivative. ex:=D_{m n}(f g);
\(\displaystyle{}D_{m n}\left(f g\right)\)
product_rule(_);
\(\displaystyle{}D_{m}\left(D_{n}{f} g+f D_{n}{g}\right)\)
distribute(_);
\(\displaystyle{}D_{m}\left(D_{n}{f} g\right)+D_{m}\left(f D_{n}{g}\right)\)
product_rule(_);
\(\displaystyle{}D_{m}{D_{n}{f}} g+D_{n}{f} D_{m}{g}+D_{m}{f} D_{n}{g}+f D_{m}{D_{n}{g}}\)
Copyright © 2001-2017 Kasper Peeters
Questions? info@cadabra.science