I am not a Maple user, but once in a while I've tried to use Maple in order to have some ideas about things like the number of zeros of a holomorphic function by integrating on some squares over the complex plane, solve some transcental equations, make some basic calculus with large numbers.
I wanted to define some special operators which act on functions f : R --> R with some regularity conditions in order to see how they lack commuting. These operators are related to Azéma martingales and are not of differential type but more of integro-differential type. Thereafter A is the generator of the Azéma martingales with parameter q (which form a Feller Process); the operator L appears in the change of variables formula related to these processes and is the good square root of the square field operator related to A. An Awful thing is that they do not commute.
I've searched for a few days an How-to do so with Maple both in manuals and on Internet. I've found nothing. So I had to rely on chance and online documentation. Here is the code I finally typed:
restart; qx := x -> q*x; q_1x:= x -> (q-1)*x; L:= unapply((f@qx-f)/q_1x, f): L(f)(x); A:=unapply((f@qx-f-q_1x*D(f))/q_1x**2, f): A(g)(x); r:=A(L(f))(x): simplify(r); r:=L(A(f))(x): simplify(r); r:=L(L(f))(x): simplify(r); r:=A(A(f))(x): simplify(r); r:=A(L(f))(x)-q*L(A(f))(x): simplify(r);
The first point is that the definitions of these operators rely on the variables f a function and x a real. The real variable x appears in the definition of the operator in two way: as a coefficient and as the argument of f or its derivative. What seems necessary is to define coefficients with variable x as predefined functions. Here there is only x --> qx and x --> (q-1)x.
Then one can define L and A as
functions of f only by giving the formula and
unapply
ing the variable f. After each definition,
I've checked if the result was right by asking the expression of
L(f)(x) and A(f)(x). Note
that the syntax obtained for L and A is quite nice.
Then I've made various compositions of the two operators (note also the syntax). The various results are te same as the ones I've obtained by hands (with a hot cup of coffee and strong nerves).