[GiNaC-devel] [GiNaC-list] Issue with derivative of "abs"
Alexey Sheplyakov
asheplyakov at yandex.ru
Wed Jun 17 00:21:37 CEST 2020
Hello!
17.06.2020, 00:30, "Vladimir V. Kisil" <v.kisil at leeds.ac.uk>:
> Dear Developers,
>
> To support Pierangelo's suggestion from here:
>
> https://www.ginac.de/pipermail/ginac-list/2020-June/002301.html
I'm afraid the patch is wrong. abs(x) is not differentiable at x = 0, and there's no way to "fix" that.
x*abs(x) is differentiable at x = 0 (with derivative being zero). Unfortunately GiNaC can't automatically
compute that. For now one can manually substitute x^2 -> abs(x)^2 which will reduce
x^2/abs(x) + abs(x) to 2*abs(x)
Best regards,
Alexey
More information about the GiNaC-devel
mailing list