## 380 Reputation

10 years, 243 days

## @Preben Alsholm ok, thanks :-)...

@Preben Alsholm ok, thanks :-)

## @acer Thanks. Though shouldn't D con...

@acer Thanks. Though shouldn't D convert D(f^k) to (D(k)*ln(f)+k*D(f)/f)*f^k even if k is not assumed to be constant?

## @acer One may add that the problem seems...

@acer One may add that the problem seems to arise in the subroutine "contour" (infolevel[int]:=5) which makes sense, since the i*Pi/2 term arises precisely because of the residue at t=1.

The sign in the first term seems to arise depending on the branch chosen on the segment (-infinity,0) for the contour integral int(...,t=-infinity..infinity). The integral over the arc vanishes for 0<a<1.

Btw: While it doesn't seem to matter in the assumptions a=1 and a=0 is not allowed.

## @Kitonum This is good :-), but it would ...

@Kitonum This is good :-), but it would be cool if these trig identities are covered by convert(*,radical)

## @acer I really appreciate your effort, b...

@acer I really appreciate your effort, but I must say that the following little loop is probably simpler

restart;
with(ArrayTools);
N := 5;
cosx := Array([0]);
for i to N do
cosx := Append(cosx, sqrt((1 + cosx[i])/2));
end do;
simplify(cosx);
evalf(`-`~(%, [seq(cos(Pi/2^i), i = 1 .. N + 1)]));

The point is, why is such a seemingly simple thing not covered by convert(*,radical)? I looks as if this is the perfect thing for which convert(*,radical) could be called for.

## @ecterrab lol???That's what I precis...

@ecterrab That's what I precisely tried too.

It does not work.

 >
 (1)
 >

## @ecterrab I know I'm getting on your...

@ecterrab I know I'm getting on your nerves, but not satisfying answers were given as to why it can not commute X^2[b] with X[a] if a commutation rule %Commutator(X[i],X[j])=0 has been set. Afterall it can commute P^2[i] with X[j] given the commutation rule %Commutator(X[i],P[j])=i g_[i,j] ??

The only thing you said is that there are issues when X is both a tensor and an operator at the same time.

If not here, where should be place for discussion!?

## @ecterrab  What noncommutative obje...

@ecterrab  What noncommutative objects subject to commutator rules? Not sure what you mean; the only thing that needs to be commuted is X[b]^2 with X[a] which commute by the algebrarule %Commutator(X[a],X[b])=0 !?

Is it possible to do this without using tensor then, but still benefitting from some automatic summation procedure?

## @digerdiga I updated my question....

@Pascal4QM I updated my question.

## @digerdiga Commutator_Algebra_with_...

Whatever the problem before, Defining it as

Define(X,P)

seems to work, while I'm curious why Coordinates does not work!?!?

## @Pascal4QM Commutator_Algebra_with_...

 >
 (1)
 >

See above, what version do you use?

Why didn't it work with Define(X,P) but only with Coordinates?

Second still does not work.

## @Pascal4QM I was talking about the macro...

@Pascal4QM I was talking about the macro:

macro(KroneckerDelta = g_)

but anyway.

Why does the Commutator not work, when I predefine an expression as in

L2 := X[k]^2*P[j]^2 - X[k]*X[j]*P[k]*P[j];

Commutator(L2,X[j]);

He is not shuffling the P all to the right, so it doesn't work. Do I need to define L2 as something?

It is just a definition after all?!

## @Pascal4QM Hey, thanks. I made some edit...

@Pascal4QM Hey, thanks. I made some edits in particular concerning the free indices mentioning in the help. As such they state the macro should work as well, but it does not.

## @acer Is it more clear now?...

@acer Is it more clear now?

 1 2 3 4 5 6 7 Last Page 1 of 19
﻿