Items tagged with operator operator Tagged Items Feed

Hello, i am recently doing a lot of my (really simple) equation manipulations with Maple and would like to include an expectation operator E( ) in my symbolic equations. As maple threads E() as a function, differentiating is not very convenient, as i have to replace all D(E) ... manually. I tried defining some properties of E() via the define() function, but when trying to set the behavior of d E(f(x))/dx I am not sure how to use (diff()=result) in the define() function. Any help or ideas are greatly appreciated!

In the following, the diff operator calcuates the derivative correctly, but the D operator doesn't.  A bug?


f := x -> a[1][2]*x;    # the double index on a[][] is intended

proc (x) options operator, arrow; a[1][2]*x end proc


diff(f(x), x);






Here is a worksheet containing the commands above in case you want to try it yourself:

Its a well known fact that the spherical harmonics are eigenfunctions of the Laplace operator on the unit sphere with eigenvalues -l(l+1). Its used all over the place in QM for example. However maple does not seem to have this. 



SetCoordinates('spherical'[r, theta, phi])


Laplacian(SphericalY(l, m, theta, phi))



Try it, you might be surprised. Its going to be a mess. How do you deal with it, to simplify it to the known form -l(l+1)r-2Ylm??

I have a nice family of functions of the form:

W:=(p,n,mu,w)->sum(w[k] * (n-k)* mu(n-k),k=1..n)

which can be evaluated for different p's using the operator mu*diff(...,mu)

The recursion begins with p=0 and proceeds using mu*diff(W(p,n,mu,w),mu) = W(p+1,n,mu,w).

Can anybody implement this procedure in Maple

Thank you 

Is it possible to define and use an abstract linear operator L which is a function of y(x) and z(x)? 

For example, Maple should be able to recognise that L(y(x),z(x)) = L(z(x),y(x)) and simplify expressions such as 

L(c*y(x),d*z(x)) = c*d*L(y(x),z(x)) where c and d are constants or numbers.

It should also be able to expand things like L(c*y1(x)+d*y2(x),e*z1(x)+f*z2(x)).


Hi there,

I would like to have an operator (in this case, the natural logarithm) applied to a list/array of points defined as:

ydata := [0.572594976618e-1, 0.327865007249e-1, 0.280821589546e-1, 0.114365745192e-1, 0.578537931608e-2, 0.139154661062e-2, 0.641467839994e-3, 0.18013801847e-3];

How can I apply Maple's ln() operator to the whole array (i.e. avoid to apply it to ydata [1], ydata [2], etc.)?

Thank you,



Partial rectification for the Physics:-Simplify and Physics:-Library:-SortProducts procedures dealing with Fermi annihilation/creation operators

This post will be useful for physicists dealing with Fermi annihilation/creation operators. Physics Package provides plenty of powerful tools for quantum operators handling, however some of them often fail to render correct result.  In particular incorrect behaviour with respect to Fermi annihilation/creation operators is observed for routines Simplify and SortProducts.  In this post I present my procedures S*implifyFermionicOperators and SortProductsFermi which partially solve these issues.

Problems with Physics Package routines


Short explanation of custom routines SimplifyFermionicOperators and SortProductsFermi


"Details for SimplifyFermionicOperators(z,prefix)"


"Details for SortProductsFermi(x,L,prefix)"


Weak points


Final notes



I am trying to extract the terms that are a product of a commutative part and an operator part from the input expression. That is I am trying to extract a terms like a*A.B where A and B are quantum pperators.

I am trying to do it by creating corresponding structured type:

Physics[Setup](op = {A, B}, quiet);

`type/ProdComOp` := `&*`(commutative, specfunc(anything, Physics:-`*`));
z0 := u*A.B-A+k*B+B.A.B+g;
z1 := z0+v*A.B.A;
S1 := indets(z1, ProdComOp);

and all it is Ok. The result is 
But if

z2 := z0-v*A.B.A; 
S2 := indets(z2, ProdComOp);

however I expected to receive the same as S1.

How to handle the sign of the commutative part? Thank you.

Hello Dears

I have this equation

                                          (Napla)^4 * F(x,y) + k^2 *  (Napla)^2 * F(x,y)= 0,      (1)

which may be written as a non-homgeneous Helmholtz equation as

                                          (Napla)^2 * F(x,y) + k^2 * F(x,y)= g(x,y),                (2)

where the function g(x,y) is a harmonic function and (Napla)^2 is the laplace's operator in two dimension.

Can Maple solve equation (1), it will be better. If not may be solve equation (2).


I am trying the following:

Setup(mathematicalnotation = true);
Setup(op = A);

type(A^n, Physics:-`^`(PhysicsType:-ExtendedQuantumOperator, integer));
type(A^n, PhysicsType:-ExtendedQuantumOperator^integer);

the result is


However, I expected to get true in both cases. How to construct correct type for A^n?
Thank you.

for base 10

1 op1 5 = 


op1   12


first digit of first number 1     = 1

first digit of second number 1 = 2

 then find 12 in logic table, it is 1, separation is 1 means move the value 1

to left 1 digit become 10

convert 10 back from base 3 to base 10, it is 3

how to construct this unknown name operator table with the custom logic table Min, Except, Diff

based on the operation described


no matter the logic table is correct or not, hope to mechanize these calculation steps for developing 3 operation table for base 10 quickly.

is it possible to develop a new kind of algebra with 3 new operators with the use of 3 operation table?



I am newbie in Maple, and trying to understand when to use operator `if` as I see in some code vs. normal if. This is in context if using map()

I noticed I can write



map(x->if x<5 then f(x) fi,A);

And they both work the same. When should one use `if` vs. if? with the case of `if` I had to give a third argument NULL for the else part, while with using direct "if", I did not have to give the "else" part.

Also, suppose I want to use  IF .. THEN .. ELIF ... FI, then how would this be done using the operator syntax? in normal "if", I can write

map(x->if x<5 then f(x) elif x=5 then x else x-1 fi,A);

Actually if I understand better when `if` is meant to be used vs. where the normal "if", I might understand more its use. 


ps. I did look at the help here but did not see it recommend when to use over the other (unless I overlooked it)





Dear all,

It's very convenient to define a DE or PDE through Differential Operator D, for example,

((D[1, 1]+D[1, 2]+D[2, 2])(z))(x, y) = exp(x)*sin(y)

Is it possible to realize Inverse Operator Method of Operator D? How to solve the following equation if we rewrite the pde through inverse operator method?

(z)(x, y)=((D[1, 1]+D[1, 2]+D[2, 2])^(-1))exp(x)*sin(y)


Thanks a lot.

how gr operators work?

I tried to run example given there but it is not working,

where can I get more examples to understand working of Gr operators work?

specially for raychaudhuri equations.

AOA...I want to introduce an operator to find the derivative of fractional order i.e.,


J^((alpha)) x^(k):=(GAMMA(k+1))/(GAMMA(k-alpha+1))x^(k-alpha):


when i applied J^(1/2) on x^2+x^3 it gives



1 2 Page 1 of 2