]> www.ginac.de Git - ginac.git/commit
Explicit derivation of functions.
authorVladimir V. Kisil <kisilv@maths.leeds.ac.uk>
Sun, 8 Feb 2015 19:50:51 +0000 (20:50 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 8 Feb 2015 19:52:57 +0000 (20:52 +0100)
commitaa2485821e68ea5f627d5753b41245a4cbd62fe3
tree1a772a7bdef6a47791876fe9fd2311afdfc942b4
parentfb9800befac02abddc754d051501ec446ae2b9bf
Explicit derivation of functions.

Some function cannot be cleanly differentiated through the chain rule.
For example, it is natural to define derivative of the absolute value as

(abs(f))'=(f'*f.conjugate()+f*f'.conjugate())/2/abs(f)

This patch adds a possibility to define derivatives of functions in this way.
In particular the derivative of abs(), Order(), real_part(), imag_part() and
conjugate() are defined.

For example, conjugate of a derivative with respect of a real symbol
If x is real then U.diff(x)-I*V.diff(x) represents both
conjugate(U+I*V).diff(x) and conjugate((U+I*V).diff(x))
Thus in this patch we use the rule

conjugate(f)'=conjugate(f')

for a derivative with respect to the real symbol.

Signed-off-by: Vladimir V. Kisil <kisilv@maths.leeds.ac.uk>
check/exam_inifcns.cpp
doc/tutorial/ginac.texi
ginac/function.cppy
ginac/function.hppy
ginac/function.py
ginac/inifcns.cpp