Items tagged with operator operator Tagged Items Feed

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



my question may be simple but I don't find the answer in any help guide.
when I define a function I cannot use a linearalgebra expression such as Trace.
Here is an example of what I would like to do:

If anyone can help me...
Thank you

I have a function related to some values and I want to include the value in the title.  So I initially try ...

plot(sine(1, 2, 0, t), t = 0 .. 1, title = cat(freq, " sine wave cycles"))

but once I use the value in the function it is not remembered, sort of like a subs operation.  A placeholder is the simplest way.

plot(sine(1, a, 0, t), t = 0 .. 1, title = cat(a, " sine wave cycles"))

Dear Maple users,

Is there a way to describe derivatives treated as binary operators in infix notation, in which the derivatives is applied either to the left or right operands. This is useful, for example, when defining generalizations of the Poisson bracket. For a pair of functions f and g, the left and right derivatives are respectively defined as


I have created a test document to check an equation and I would like to feed a range of k values (ranging from 0 to say 512) in increments of 1) to the main function, and then plot the result as a graph of Zuncomp (y-axis) vs k(x-axis).

I can verify the values of the function by typing say Zuncomp(0) or Zuncomp(10) etc but how do you run this so that you do Zuncomp(k) to read all values of k and generate the output to plot?

Using Maple 13 (Windows 7...

here is my code i want to run the loop for every value if there is invalid input in lhs(ans(1)) the loop should not stop and check for next value
> restart;
> f1 := proc (x) options operator, arrow; R*T*(x*ln(x)+(1-x)*ln(1-x))+Omega[l]*x*(1-x) end proc;
x -> R T (x ln(x) + (1 - x) ln(1 - x)) + Omega[l] x (1 - x)
> g1 := proc (x) options operator, arrow; (1-x)*SfA*(T-TfA)+x*SfB*(T-TfB)+R*T*(x*ln(x)+(1-x)*ln(1-x))+Omega[s]*x*(1-x) end proc;


While substituting expressions for θ(t),θ'(t),θ''(t) with some rather simple polynoms (see attached demonstration), the result icludes terms such as "·2" or "θ1·" (see terms multiplying ε8 and ε7in result for C1). It seems MAPLE treates the "·" sign as a variable/constant instead of as an operator. What am I doing wrong?



I'm trying to define a simple forward difference operator Δ to act on a function f(n). I have defined, in a number of ways, Δ(f(n)) = f(n+1) - f(n). This works fine but I want Maple to calculate powers of Δ. e.g Δ2 (f(n))= f(n+2) - 2f(n+1) + f(n). As it stands, Maple returns (f(n+1) - f(n))2 seemingly however I define the functions.
What am I doing wrong? Help much appreciated.


Dear Maple Users

I wonder how I can use Maple to solve the problem:


for the potential \phi(r). The problem is from the artikle:

I'm particularly puzzled how to implement this differential operator and how to enter the Dirac delta function.


Thanks for any hints.

Can anyone explain these results?  I m trying to check on a more complicated form of this expression, but cannot proceed without understanding what is occurring in this case.


I always used something different from D when using diagonal matrices. Now I learned I can unprotect D.

However, I got this:

> restart; with(LinearAlgebra);
> unprotect(D);
> D := DiagonalMatrix([2, 3]);
> D.D;D^(2);
Error, invalid 'D' operator

Maple does interpret D as a matrix that he can square, but the exponentional notation can't be used as he sees it as some sort of operator?  Can anyone point out my mistake?

I am trying to compute commutator like this [d_t +J_x,d_x+J_t], where d_t and d_x are differential operators, J_x and J_t, which contains generators of group, are some currents on group manifold. terms like this [J_x,J_t] could sovled by physics package, but how to manipulate [d_t,J_x]? How to define operator d_t in order to make the commutator works? and if it works we might have another problem as [d_t,J_x]=[d_t, J^a_x*T_a], where T_a are generators, the result is T_a *d_t(J^a_x...

1 2 Page 1 of 2