digerdiga

390 Reputation

8 Badges

11 years, 254 days

MaplePrimes Activity


These are questions asked by digerdiga

Hello,

 

 

 

restart; with(Physics); Setup(mathematicalnotation = true); Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin); g_[]; Define(X[i], P[k]); Setup(quantumop = {P, X}, algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], X[j]) = 0, %Commutator(X[j], P[k]) = Physics:-`*`(I, g_[j, k])}); L2 := Simplify(Physics:-`^`(Physics:-`*`(Physics:-`*`(LeviCivita[i, j, k], X[j]), P[k]), 2)); L2X := Simplify(Commutator(L2, X[k])); L2L2X__1 := Simplify(Commutator(L2, L2X)); L2L2X__2 := Simplify(Expand(AntiCommutator(Physics:-`*`(2, L2), X[k]))); Simplify(L2L2X__1-L2L2X__2)

[mathematicalnotation = true]

 

`The dimension and signature of the tensor space are set to `[3, `- - +`]

 

`The Euclidean metric in cartesian coordinates`

 

`Changing the signature of the tensor spacetime to: `*`+ + +`

 

[dimension = 3, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]

 

Physics:-g_[a, b] = Matrix(%id = 18446746397905475934)

 

`Defined objects with tensor properties`

 

{Physics:-Dgamma[a], P[k], Physics:-Psigma[a], X[i], Physics:-d_[a], Physics:-g_[a, b], Physics:-LeviCivita[a, b, c]}

 

`* Partial match of  '`*quantumop*`' against keyword '`*quantumoperators*`' `

 

_______________________________________________________

 

[algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], X[j]) = 0, %Commutator(X[j], P[k]) = I*Physics:-g_[j, k]}, quantumoperators = {P, X}]

 

(2*I)*Physics:-`*`(X[j], P[j])+Physics:-`*`(Physics:-`^`(X[j], 2), Physics:-`^`(P[k], 2))-Physics:-`*`(X[j], X[k], P[j], P[k])

 

2*X[k]-(2*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])+(2*I)*Physics:-`*`(X[c], X[k], P[c])

 

(12*I)*Physics:-`*`(X[c], X[k], P[c])-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])+4*X[k]+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[h], 2))-4*Physics:-`*`(X[a], Physics:-`^`(X[b], 2), P[a], P[k])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[f], P[f], P[k])-4*Physics:-`*`(X[f], X[i], X[k], P[f], P[i])

 

4*X[k]+(12*I)*Physics:-`*`(X[c], X[k], P[c])+4*Physics:-`*`(Physics:-`^`(X[b], 2), X[k], Physics:-`^`(P[d], 2))-(4*I)*Physics:-`*`(Physics:-`^`(X[b], 2), P[k])-4*Physics:-`*`(X[e], X[f], X[k], P[e], P[f])

 

0

(1)

NULL

 

 

 

 

Download Commutator_Algebra_with_L2.mw

 

 

 

I have the following issue.

The way it is set at the moment, works kinda in that the final result is 0, which I tried to check.

However, the expression L2L2X[1] is not fully Simplified, since the term

-(4*X[a])*X[b]^2*P[a]*P[k] + (4*X[b]^2)*X[f]*P[f]*P[k]

is actually zero. I suppose that he doesn't manage because of the different indices "a" and "f" here. How can this be fixed?

 

When I comment out "Define" and use "Coordinates(X,P)" instead, it doesn't work. Seems to give the wrong result (Difference is not zero).

 

Second Try:

f:= c/(c - 1) - c*(Pi^2 - 12*ln(c))*(1 + c)/(12*(c - 1)^3*n) + (((144*c^3 + 1584*c^2 + 1584*c + 144)*ln(c)^2 - 24*Pi^2*(1 + c)*(c^2 + 10*c + 1)*ln(c) + (-96*c^3 - 288*c^2 + 288*c + 96)*Zeta(3) + Pi^2*((Pi^2 + 24)*c^3 + (11*Pi^2 + 72)*c^2 + (11*Pi^2 - 72)*c + Pi^2 - 24))*c)/(288*(c - 1)^5*n^2)

This expression is already arranged with respect to n. However, the nominator of each term is not collected with respect to c. So naturally I thought

collect(f,[n,c]) or collect(f,[n,c],simplify)

would work. But now he messes up the nominator i.e. he can not factor and simplify. Note that the single variable case collect(f,n,simplify) works in not messing up, but this is not what I want, since the nominator of each n-term is not in c-collected form.

collect(f,[n],u->collect(u,[c],...))

also does not work, since he messes up again.

By c-collected form I mean the following:

The n^0 and n^{-1} term are actually fine. The factorization in the second term is ok. But for the third term

f2:=(144*c^3 + 1584*c^2 + 1584*c + 144)*ln(c)^2 - 24*Pi^2*(1 + c)*(c^2 + 10*c + 1)*ln(c) + (-96*c^3 - 288*c^2 + 288*c + 96)*Zeta(3) + Pi^2*((Pi^2 + 24)*c^3 + (11*Pi^2 + 72)*c^2 + (11*Pi^2 - 72)*c + Pi^2 - 24)

what I mean by c-collected is

collect(f2,c,simplify)

This is the nominator of the n^{-2} term.

I sort of managed by the following to procedings:

of:=[op(f)];
add(`~`[`/`](collect~(numer~(of), c, factor), ` $`, denom(of)));
add(collect~(of, c, simplify));

but the first one seems cumbersome for such a trivial thing that should be handled by collect. It also does not factor out the e.g. 12*ln(c)-Pi^2. This seems to be a general behaviour

g:=a*x*(x+1);
collect(g,x) does not factor out the a as in a*(x^2+x).

With the second method I'm more or less happy, but I didn't manage to completely collect the c terms i.e. the n^{-1} term is still c*(c+1) and not c^2+c.

Hello, Probably there is a way to do this easily but I do not quickly find it within the help.

I want

rand(0..1)

to give a true! random number and not always the same number; otherwise it should be called

predefinedlist()

Seed is deprecated, not sure it would help though. So how do I go abouts?

I want to calculate the below triple integral numerically. I tried different methods and reduced accuracy but nothing works.

Anyone capable?

Thanks

 

restart;
Digits := 15;
with(VectorCalculus);
v1 := <0, 0, 1>;
v2 := <sin(theta2), 0, cos(theta2)>;
v3 := <VectorCalculus:-`*`(sin(theta3), cos(phi3)), VectorCalculus:-`*`(sin(theta3), sin(phi3)), cos(theta3)>;
v1v2 := CrossProduct(v1, v2);
v2v3 := CrossProduct(v3, v2);
DotProduct(v1v2, v2v3);
(simplify(VectorCalculus:-`*`(%, VectorCalculus:-`*`(Norm(v1v2), Norm(v2v3))^VectorCalculus:-`-`(1))) assuming (0 < theta2, theta2 < Pi, 0 < theta3, theta3 < Pi));
evalf(VectorCalculus:-`*`(Int(VectorCalculus:-`*`(arccos(%), sin(theta3)), [theta2 = 0 .. Pi, theta3 = 0 .. Pi, phi3 = 0 .. VectorCalculus:-`*`(2, Pi)], epsilon = 0.001, method = _d01akc), VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(VectorCalculus:-`*`(2, Pi), 2), Pi), 4), Pi)^VectorCalculus:-`-`(1)));

Hey,

Is anyone of you capable of simplifying this expression

f1:=(-3*sin(8*x) + 3*sin(8*x + 2*y) - 3*sin(8*x + 6*y) + 3*sin(8*y + 8*x) + 3*sin(8*y + 6*x) + 3*sin(8*y) - 18*sin(8*y + 4*x) + 3*sin(8*y + 2*x) - 45*sin(6*y + 6*x) + 87*sin(4*y + 6*x) - 3*sin(6*x - 2*y) - 87*sin(6*x + 2*y) + 18*sin(4*x - 4*y) - 93*sin(4*x + 4*y) + 93*sin(4*x + 6*y) - 51*sin(2*x - 4*y) - 342*sin(2*x + 4*y) - 3*sin(-6*y + 2*x) + 51*sin(6*y + 2*x) - 93*sin(-2*y + 4*x) + 342*sin(-2*y + 2*x) + 639*sin(2*x + 2*y) - 639*sin(2*x) + 45*sin(6*x) + 93*sin(4*x) + 231*sin(4*y) - 225*sin(2*y) - 63*sin(6*y) - 57*sqrt(3)*cos(2*x) - 375*sqrt(3)*cos(2*y) + sqrt(3)*cos(8*y + 8*x) - 5*sqrt(3)*cos(8*x + 6*y) - 7*sqrt(3)*cos(8*y + 6*x) + sqrt(3)*cos(8*x) + 192*sqrt(3)*cos(2*y + 4*x) + 43*sqrt(3)*cos(-2*y + 4*x) - 7*sqrt(3)*cos(6*x + 2*y) + 7*sqrt(3)*cos(-6*y + 2*x) - 5*sqrt(3)*cos(6*y) - 149*sqrt(3)*cos(4*x + 4*y) - 149*sqrt(3)*cos(4*x) - 65*sqrt(3)*cos(6*y + 2*x) + 126*sqrt(3)*cos(2*x + 4*y) - 65*sqrt(3)*cos(2*x - 4*y) - 5*sqrt(3)*cos(8*x + 2*y) - sqrt(3)*cos(8*y) + 7*sqrt(3)*cos(8*y + 2*x) + 6*sqrt(3)*cos(8*x + 4*y) - 57*sqrt(3)*cos(2*x + 2*y) + 125*sqrt(3)*cos(4*y) + 126*sqrt(3)*cos(-2*y + 2*x) - 7*sqrt(3)*cos(6*x - 2*y) + 19*sqrt(3)*cos(6*x) + 43*sqrt(3)*cos(4*x + 6*y) + 19*sqrt(3)*cos(6*y + 6*x) - 7*sqrt(3)*cos(4*y + 6*x) + 246*sqrt(3))/(2*(-261*sin(4*x + y) - 297*sin(2*x + 3*y) - 48*sin(5*y + 6*x) + 126*sin(5*y + 2*x) + 9*sin(5*y + 8*x) + 12*sin(7*y + 6*x) - 9*sin(7*y + 4*x) - 36*sin(5*y + 4*x) + 261*sin(3*y + 4*x) + 9*sin(-3*y + 4*x) + 297*sin(-y + 2*x) - 135*sin(3*y) - 21*sin(5*y) - 147*cos(y)*sqrt(3) - 9*sqrt(3)*cos(7*y + 4*x) - 3*sqrt(3)*cos(5*y + 8*x) - 3*sqrt(3)*cos(3*y + 8*x) + 54*sqrt(3)*cos(6*x + 3*y) + 5*sqrt(3)*cos(-5*y + 2*x) + 5*sqrt(3)*cos(7*y + 2*x) - 2*sqrt(3)*cos(6*x - y) - 20*sqrt(3)*cos(6*x + y) - 69*sqrt(3)*cos(4*x + y) + 68*sqrt(3)*cos(4*x - y) + 2*sqrt(3)*cos(8*x + y) + 2*sqrt(3)*cos(7*y + 8*x) - 20*sqrt(3)*cos(5*y + 6*x) - 2*sqrt(3)*cos(7*y + 6*x) + 68*sqrt(3)*cos(5*y + 4*x) - 9*sqrt(3)*cos(-3*y + 4*x) - 69*sqrt(3)*cos(3*y + 4*x) - 171*sqrt(3)*cos(2*x + 3*y) - 35*sqrt(3)*cos(5*y) + 171*sqrt(3)*cos(3*y) - 171*sqrt(3)*cos(-y + 2*x) + 354*sqrt(3)*cos(2*x + y) + sqrt(3)*cos(7*y) + 639*sin(y) - 9*sin(3*y + 8*x) - 12*sin(6*x - y) + 3*sin(7*y) - 9*sin(7*y + 2*x) + 9*sin(-5*y + 2*x) + 48*sin(6*x + y) + 36*sin(4*x - y) - 126*sin(2*x - 3*y)))

 

into

 

cos(y-Pi/3).

 

PS: Actually I managed by expanding the thing out and converting to exp then expanding again and using radnormal. In essence I leave the question, because maybe somebody can explain to me why radnormal seems to be superior (sometimes) to simplify which I thought of as the USEALL choice. Thanks

1 2 3 4 5 6 7 Last Page 2 of 25