# [GiNaC-list] How to differentiate from a Tensor?

Vladimir V. Kisil kisilv at maths.leeds.ac.uk
Tue Jul 18 10:09:24 CEST 2017

```>>>>> On Mon, 17 Jul 2017 19:56:44 +0200, "Richard B. Kreckel" <kreckel at in.terlu.de> said:

RK> On 07/14/2017 11:18 AM, Vladimir V. Kisil wrote:
>> To maintainer: I have run into similar situation working with
>> differential operators. Shall we add "generic" functions to GiNaC
>> with 1, 2, 3, 4 variables?

It seems, not. Assume, I want to calculate the Laplacian in polar
coordinates. Then the expression

f(sqrt(x*x+y*y),atan2(y,x)).diff(x,2)+f(sqrt(x*x+y*y),atan2(y,x)).diff(y,2)

does it, provided that f is a function of two variables without
defined derivatives. For one variable the step function is (the only?)
example of such function.

So my proposition is to add to GiNaC a family of "generic functions"
of 1-4 variables without any specific properties. Advises "derive your
own class" or "define your own function" is a certain barrier for a
set of GiNaC users, I think (from my own experience).

Best wishes,