Dear All, I am resending the patch for implicit derivation of functions. Quote from the previous submission: http://www.ginac.de/pipermail/ginac-devel/2013-November/002053.html " I wish to propose another GiNaC extension. Consider function abs(). Since it can be presented as abs(z)=sqrt(z*z.conjugate()), the derivative of abs(f) may be calculated as (abs(f))'=(f'*f.conjugate()+f*f'.conjugate())/2/abs(f) However, this formula cannot be packed into the present GiNaC code, since it only knows about the chain rule. Thus, the patch adds a possibility to define derivatives of functions in some general expression. In particular, the above derivative of abs() is defined. Example: cout << abs(log(z)).diff(z) << endl; // (before) -> D[0](abs)(log(z))*z^(-1) // (now) -> 1/2*(z^(-1)*conjugate(log(z))+log(z)*conjugate(z)^(-1))*abs(log(z))^(-1) " This issue independently appeared in this discussion: http://www.ginac.de/pipermail/ginac-devel/2014-April/002106.html If it is not included in the core code, then a user need to redefine the entire GiNaC function class to have this feature. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/