ecterrab

13431 Reputation

24 Badges

19 years, 363 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi Andriy

Below is the answer, I believe easy to understand after you understand how the types `*`, `^` and `.` work -- what is said below applies to all of them - after loading Physics. As usual, I recommend updating to the latest version of Physics downloading it from the Maplesoft R&D Physics webpage.

TypeProduct.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft



download VariablesThatAntiCommute.mw


Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi Hamada
For all of a, b, c, d, g, and F arbitrary, Maple cannot find a solution, which basically means that there is no known algorithm for solving that problem. If you however specialize one or more of these six parameters entering the equation, by means of giving a value to one or more of them, there are infinitely many cases which are fully solvable.

For instance, set a=0 and you receive a solution in terms of Kummer functions, the case a=0, b=0 is solvable in terms of Airy functions, etc. Attached is a worksheet you could run specializing to 0 or 1 either a single parameter, or a couple, triplet, etc. up to the six of them. You could use the worksheet also as a template to try different specializations - the two shown are only to illustrate the idea.

diff(y(x), x) = a*y(x)^3+(b*x+c)*y(x)^2+d*y(x)+g*x+f

diff(y(x), x) = a*y(x)^3+(b*x+c)*y(x)^2+d*y(x)+g*x+f

(1)

lprint(%)

diff(y(x), x) = a*y(x)^3+(b*x+c)*y(x)^2+d*y(x)+g*x+f

 

zero := map(proc (u) options operator, arrow; map(`=`, u, 0) end proc, [seq(op(`ODEtools/permute`([a, b, c, d, g, f], j)), j = 1 .. 6)])

[[a = 0], [b = 0], [c = 0], [d = 0], [g = 0], [f = 0], [a = 0, b = 0], [a = 0, c = 0], [a = 0, d = 0], [a = 0, g = 0], [a = 0, f = 0], [b = 0, c = 0], [b = 0, d = 0], [b = 0, g = 0], [b = 0, f = 0], [c = 0, d = 0], [c = 0, g = 0], [c = 0, f = 0], [d = 0, g = 0], [d = 0, f = 0], [g = 0, f = 0], [a = 0, b = 0, c = 0], [a = 0, b = 0, d = 0], [a = 0, b = 0, g = 0], [a = 0, b = 0, f = 0], [a = 0, c = 0, d = 0], [a = 0, c = 0, g = 0], [a = 0, c = 0, f = 0], [a = 0, d = 0, g = 0], [a = 0, d = 0, f = 0], [a = 0, g = 0, f = 0], [b = 0, c = 0, d = 0], [b = 0, c = 0, g = 0], [b = 0, c = 0, f = 0], [b = 0, d = 0, g = 0], [b = 0, d = 0, f = 0], [b = 0, g = 0, f = 0], [c = 0, d = 0, g = 0], [c = 0, d = 0, f = 0], [c = 0, g = 0, f = 0], [d = 0, g = 0, f = 0], [a = 0, b = 0, c = 0, d = 0], [a = 0, b = 0, c = 0, g = 0], [a = 0, b = 0, c = 0, f = 0], [a = 0, b = 0, d = 0, g = 0], [a = 0, b = 0, d = 0, f = 0], [a = 0, b = 0, g = 0, f = 0], [a = 0, c = 0, d = 0, g = 0], [a = 0, c = 0, d = 0, f = 0], [a = 0, c = 0, g = 0, f = 0], [a = 0, d = 0, g = 0, f = 0], [b = 0, c = 0, d = 0, g = 0], [b = 0, c = 0, d = 0, f = 0], [b = 0, c = 0, g = 0, f = 0], [b = 0, d = 0, g = 0, f = 0], [c = 0, d = 0, g = 0, f = 0], [a = 0, b = 0, c = 0, d = 0, g = 0], [a = 0, b = 0, c = 0, d = 0, f = 0], [a = 0, b = 0, c = 0, g = 0, f = 0], [a = 0, b = 0, d = 0, g = 0, f = 0], [a = 0, c = 0, d = 0, g = 0, f = 0], [b = 0, c = 0, d = 0, g = 0, f = 0], [a = 0, b = 0, c = 0, d = 0, g = 0, f = 0]]

(2)

one := map(proc (u) options operator, arrow; map(`=`, u, 1) end proc, [seq(op(`ODEtools/permute`([a, b, c, d, g, f], j)), j = 1 .. 6)])

[[a = 1], [b = 1], [c = 1], [d = 1], [g = 1], [f = 1], [a = 1, b = 1], [a = 1, c = 1], [a = 1, d = 1], [a = 1, g = 1], [a = 1, f = 1], [b = 1, c = 1], [b = 1, d = 1], [b = 1, g = 1], [b = 1, f = 1], [c = 1, d = 1], [c = 1, g = 1], [c = 1, f = 1], [d = 1, g = 1], [d = 1, f = 1], [g = 1, f = 1], [a = 1, b = 1, c = 1], [a = 1, b = 1, d = 1], [a = 1, b = 1, g = 1], [a = 1, b = 1, f = 1], [a = 1, c = 1, d = 1], [a = 1, c = 1, g = 1], [a = 1, c = 1, f = 1], [a = 1, d = 1, g = 1], [a = 1, d = 1, f = 1], [a = 1, g = 1, f = 1], [b = 1, c = 1, d = 1], [b = 1, c = 1, g = 1], [b = 1, c = 1, f = 1], [b = 1, d = 1, g = 1], [b = 1, d = 1, f = 1], [b = 1, g = 1, f = 1], [c = 1, d = 1, g = 1], [c = 1, d = 1, f = 1], [c = 1, g = 1, f = 1], [d = 1, g = 1, f = 1], [a = 1, b = 1, c = 1, d = 1], [a = 1, b = 1, c = 1, g = 1], [a = 1, b = 1, c = 1, f = 1], [a = 1, b = 1, d = 1, g = 1], [a = 1, b = 1, d = 1, f = 1], [a = 1, b = 1, g = 1, f = 1], [a = 1, c = 1, d = 1, g = 1], [a = 1, c = 1, d = 1, f = 1], [a = 1, c = 1, g = 1, f = 1], [a = 1, d = 1, g = 1, f = 1], [b = 1, c = 1, d = 1, g = 1], [b = 1, c = 1, d = 1, f = 1], [b = 1, c = 1, g = 1, f = 1], [b = 1, d = 1, g = 1, f = 1], [c = 1, d = 1, g = 1, f = 1], [a = 1, b = 1, c = 1, d = 1, g = 1], [a = 1, b = 1, c = 1, d = 1, f = 1], [a = 1, b = 1, c = 1, g = 1, f = 1], [a = 1, b = 1, d = 1, g = 1, f = 1], [a = 1, c = 1, d = 1, g = 1, f = 1], [b = 1, c = 1, d = 1, g = 1, f = 1], [a = 1, b = 1, c = 1, d = 1, g = 1, f = 1]]

(3)

for val in zero do print(val, "============================================"); traperror(timelimit(120, dsolve(subs(val, diff(y(x), x) = a*y(x)^3+(b*x+c)*y(x)^2+d*y(x)+g*x+f), useInt, implicit))) end do;

[a = 0], "============================================"

 

y(x) = -b*((b^2*f^2+(-2*c*f+d^2)*g*b+c^2*g^2)*_C1*(8*(-b*g)^(3/2)+b^2*f^2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*g^2)/(b^2*g^2), 3/2, -(1/4)*(d*(-b*g)^(1/2)-c*g+b*f)^2*(-b*g)^(1/2)*((2*g*x+f)*b+c*g)^2/(b^2*(2*d*(b*f-c*g)*(-b*g)^(1/2)+b^2*f^2+(-2*c*f-d^2)*g*b+c^2*g^2)*g^2))+(-8*b*g*(-b*g)^(1/2)+b^2*f^2+(-2*c*f+d^2)*g*b+c^2*g^2)*KummerM((1/16)*((b^2*f^2+(-2*c*f+d^2)*g*b+c^2*g^2)*(-b*g)^(1/2)+24*b^2*g^2)/(b^2*g^2), 3/2, -(1/4)*(d*(-b*g)^(1/2)-c*g+b*f)^2*(-b*g)^(1/2)*((2*g*x+f)*b+c*g)^2/(b^2*(2*d*(b*f-c*g)*(-b*g)^(1/2)+b^2*f^2+(-2*c*f-d^2)*g*b+c^2*g^2)*g^2)))*g^3)

 

[b = 0], "============================================"

 

[c = 0], "============================================"

 

"time expired"

 

[d = 0], "============================================"

 

[g = 0], "============================================"

 

[f = 0], "============================================"

 

[a = 0, b = 0], "============================================"

 

y(x) = (1/2)*(2*(g/c^(1/2))^(1/3)*c^(1/2)*(AiryAi(1, -(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c))*_C1+AiryBi(1, -(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c)))-d*(_C1*AiryAi(-(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c))+AiryBi(-(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c))))/(c*(_C1*AiryAi(-(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c))+AiryBi(-(c*(g*x+f)-(1/4)*d^2)/((g/c^(1/2))^(2/3)*c))))

 

[a = 0, c = 0], "============================================"

 

y(x) = -g^2*(((-16*b*f^2-16*d^2*g)*(-b*g)^(3/2)-32*b^2*g*(2*g*x+f)*(d*g-(-b*g)^(1/2)*f))*KummerM((1/16)*((-b*g)^(1/2)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/2)*d*f+b*f^2-d^2*g)))+16*b^2*g^3*_C1*(2*d*(2*g*x+f)*(-b*g)^(1/2)+f*(4*g*x+f)*b-d^2*g)*KummerU((1/16)*((-b*g)^(1/2)*b*f^2+(-b*g)^(1/2)*d^2*g+8*b*g^2)/(b*g^2), 3/2, -(1/4)*(d*(-b*g)^(1/2)+b*f)^2*(2*g*x+f)^2*(-b*g)^(1/2)/(b*g^2*(2*(-b*g)^(1/2)*d*f+b*f^2-d^2*g)))+8*(b*f^2+d^2*g)*((-(1/8)*b*f^2-(1/8)*d^2*g)*(-b*g)^(3/2)+b^2*g^3)*_C1*KummerU((1/16)*((-b*g)^(1/2)*b*f^2+(-b*g)^(1/2)*d^2*g+24*b*g^2)/(b*g^2), 3/2, -(1/4)*(d*(-b*g)^(1/2)+b*f)^2*(2*g*x+f)^2*(-b*g)^(1/2)/(b*g^2*(2*(-b*g)^(1/2)*d*f+b*f^2-d^2*g)))+16*KummerM((1/16)*((-b*g)^(1/2)*b*f^2+(-b*g)^(1/2)*d^2*g+24*b*g^2)/(b*g^2), 3/2, -(1/4)*(d*(-b*g)^(1/2)+b*f)^2*(2*g*x+f)^2*(-b*g)^(1/2)/(b*g^2*(2*(-b*g)^(1/2)*d*f+b*f^2-d^2*g)))*b^2*g^3*(b*f^2+d^2*g-8*g*(-b*g)^(1/2)))

 

[a = 0, d = 0], "============================================"

 

y(x) = ((b*f-c*g)*((b*f-c*g)^2*(-b*g)^(1/2)+8*b^2*g^2)*_C1*KummerU(-(1/16)*(-24*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))-3*(-b*g)^(1/2)*(((4/3)*g*x+f)*b+(1/3)*c*g)*(b*f-c*g)*KummerM(-(1/16)*(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))+((b*f-c*g)^2*(-b*g)^(1/2)+8*b^2*g^2)*KummerM(-(1/16)*(-24*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))-48*b^2*(((4/3)*g*x+f)*b+(1/3)*c*g)*g^2*_C1*KummerU(-(1/16)*(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2)))/(b*((b*f-c*g)*(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)*_C1*KummerU(-(1/16)*(-24*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))+((4*g*x+f)*b+3*c*g)*(b*f-c*g)*KummerM(-(1/16)*(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))+(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)*KummerM(-(1/16)*(-24*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))-16*(-b*g)^(1/2)*b*((4*g*x+f)*b+3*c*g)*g*_C1*KummerU(-(1/16)*(-8*b*g*(-b*g)^(1/2)+(b*f-c*g)^2)/((-b*g)^(1/2)*b*g), 3/2, -(1/4)*((2*g*x+f)*b+c*g)^2*(-b*g)^(1/2)/(b^2*g^2))))

 

[a = 0, g = 0], "============================================"

 

y(x) = 2*f*(AiryAi(-((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f))*_C1+AiryBi(-((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f)))/(2*(-b/f^(1/2))^(1/3)*(AiryAi(1, -((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f))*_C1+AiryBi(1, -((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f)))*f^(1/2)-d*(AiryAi(-((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f))*_C1+AiryBi(-((b*x+c)*f-(1/4)*d^2)/((-b/f^(1/2))^(2/3)*f))))

 

[a = 0, f = 0], "============================================"

 

y(x) = -64*b*g*((((1/4)*b*d^2+(1/4)*c^2*g)*(-b*g)^(3/2)+b*g^2*(d*b+c*(-b*g)^(1/2))*(b*x+(1/2)*c))*KummerM((1/16)*((-b*g)^(1/2)*b*d^2+(-b*g)^(1/2)*c^2*g+8*b^2*g)/(b^2*g), 3/2, (1/4)*(d*(-b*g)^(1/2)-c*g)^2*(2*b*x+c)^2*(-b*g)^(1/2)/(b^2*g*(2*(-b*g)^(1/2)*c*d+b*d^2-c^2*g)))+_C1*(((1/4)*b*d^2+(1/4)*c^2*g)*(-b*g)^(3/2)+b*g^2*(d*b+c*(-b*g)^(1/2))*(b*x+(1/2)*c))*KummerU((1/16)*((-b*g)^(1/2)*b*d^2+(-b*g)^(1/2)*c^2*g+8*b^2*g)/(b^2*g), 3/2, (1/4)*(d*(-b*g)^(1/2)-c*g)^2*(2*b*x+c)^2*(-b*g)^(1/2)/(b^2*g*(2*(-b*g)^(1/2)*c*d+b*d^2-c^2*g)))-(1/64)*_C1*(b*d^2+c^2*g)*(b*g*d^2+c^2*g^2+8*(-b*g)^(3/2))*KummerU((1/16)*((-b*g)^(1/2)*b*d^2+(-b*g)^(1/2)*c^2*g+24*b^2*g)/(b^2*g), 3/2, (1/4)*(d*(-b*g)^(1/2)-c*g)^2*(2*b*x+c)^2*(-b*g)^(1/2)/(b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b^2*g), 3/2, (1/4)*(d*(-b*g)^(1/2)-c*g)^2*(2*b*x+c)^2*(-b*g)^(1/2)/(b^2*g*(2*(-b*g)^(1/2)*c*d+b*d^2-c^2*g)))*b^3*g^2*(b*d^2+c^2*g-8*b*(-b*g)^(1/2)))

 

[b = 0, c = 0], "============================================"

 

[b = 0, d = 0], "============================================"

 

[b = 0, g = 0], "============================================"

 

x-Intat(1/(_a^3*a+_a^2*c+_a*d+f), _a = y(x))+_C1 = 0

 

[b = 0, f = 0], "============================================"

 

[c = 0, d = 0], "============================================"

 

"time expired"

 

[c = 0, g = 0], "============================================"

 

[c = 0, f = 0], "============================================"

 

Warning,  computation interrupted

 

Interrupting after two solvable cases here in order to post in Mapleprimes.

for val in one do print(val, "============================================"); traperror(timelimit(120, dsolve(subs(val, diff(y(x), x) = a*y(x)^3+(b*x+c)*y(x)^2+d*y(x)+g*x+f), useInt, implicit))) end do;

[a = 1], "============================================"

 

[b = 1], "============================================"

 

[c = 1], "============================================"

 

[d = 1], "============================================"

 

Warning,  computation interrupted

 

Interrupting in order to post in Mapleprimes.

``


Download TacklingAbelEquation.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

 

Yes. Acer's answer is the simplest if you want symmetric with respect to permutation of all the indices.

Now if what you need is more control (e.g. symmetries and antisymmetries at the same time, regarding permutations of some, not all of the indices) there are two more standard ways of doing that.

First, if what you intend to do is tensor computations then the simplest approach I think is to use the Physics package, define C as a tensor with the symmetries you prefer (see the help page for Physics,Define) and that is all.

 Second, if all what you need is an indexable C[i, j, k, l] that doesn't change in value when you permute only i with j, create a procedure with the desired symmetry under permutation of i and j (note I name it `index/...`, that naming convention is mandatory), and use it as an indexing function, as follows

`index/C` := proc (idx) local i, j, k, l; i, j, k, l := op(idx); evaln(C[op(sort([i, j])), k, l]) end proc:

Now assign a table(C) to C itself

C := table(C)

table( [ ] )

(1)

That is all.

C[i, j, k, l]

C[i, j, k, l]

(2)

Swap the first two indices: they get reordered

C[j, i, k, l]

C[i, j, k, l]

(3)

It works regardless of the name of the indices

C[b, a, c, d]

C[a, b, c, d]

(4)

C[1, 2, 3, 4]-C[2, 1, 3, 4]

0

(5)

``

 

Download Cijkl_symmetric.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


Hi guyp,

This is an unfortunate old issue: there is a premature evaluation of the summation dummy indices. There are a number of ways of tackling this issue, but I know only one solution that is general and covers all the situations at once: use the Physics:-Setup command, to redefine sum so that it keeps all of its computational power and at the same time becomes free of all these evaluation problems in one go.

Here is that at work with your example:

T := proc (x, m) options operator, arrow; sum((sum(binomial(m, k+p), k = 1 .. m-p))*x^p, p = 0 .. m-1) end proc;

proc (x, m) options operator, arrow; sum((sum(binomial(m, k+p), k = 1 .. m-p))*x^p, p = 0 .. m-1) end proc

(1)

This is the evaluation problem mentioned, leading to a wrong result

T(x, 3)

0

(2)

This is the redefinition mentioned

Physics:-Setup(redefinesum = true)

[redefinesum = true]

(3)

Now the result is correct

T(x, 3)

x^2+4*x+7

(4)

Regarding what is this redefinition of sum about, it only wraps around these different forms of premature evaluation problems. The actual summation is still performed by sum. For details on what problems I am referring to, please give a look at the help page updates,Maple18,Physics, the section on "New Enhanced Modes in Physics Setup", item 4.

As mentioned there, this redefinition also extends the ability of sum to perform multi-index summation, similar to the example you posted. For instance (note the summation indices satisfying a relationship)

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n)

(5)

eval((a+b+c)^n = sum(factorial(n)*a^p*b^q*c^r/(factorial(p)*factorial(q)*factorial(r)), p+q+r = n), n = 2)

(a+b+c)^2 = a^2+2*a*b+2*a*c+b^2+2*b*c+c^2

(6)

``


Download RedefineSum.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft


restart; with(Physics):
Setup(mathematicalnotation=true, noncommutativeprefix={M,H,S});

[mathematicalnotation = true, noncommutativeprefix = {H, M, S}]

(1)

GetAdvCommutator0:=proc(power::integer,order::integer,M)
option cache;
    if power <= 0 then
        M
    elif power = 1 then
        mtaylor(Commutator(M, add(lambda^l * S[l], l=1..order)), lambda, order+1)
    else
        mtaylor(Commutator(procname(power-1, order, M), add((lambda^l) * S[l], l=1..order)), lambda, order+1)
    fi:
end proc:

 

Your procedure without that eval enclosing the addition

HOffDiag := n ->
add(1/((2*j + 1)!)*GetAdvCommutator0(2*j + 1, n, H[0]), j=0..iquo(n-1, 2) + 1)
+ add(1/((2*j + 1)!)*GetAdvCommutator0(2*j + 1, n, lambda*H[1]), j=0..iquo(n-2, 2) + 1)
+ add(1/((2*j)!)*GetAdvCommutator0(2*j, n, lambda*H[2]), j=0..iquo(n-1,2) + 1):


Timings using the latest Physics update available for download at the Maplesoft R&D Physics webpage

time(HOffDiag(1))

0.33e-1

(2)

time(HOffDiag(2))

.216

(3)

time(HOffDiag(3))

.701

(4)

time(HOffDiag(4))

2.786

(5)

time(HOffDiag(5))

11.625

(6)

time(HOffDiag(6))

64.756

(7)

The amount of calls to Commutator gives an idea of why takes 1 minute to compute. Within Commutator, there is a an attempt to expand the commutator and in doing so a normalization of products is performed, and there is where most of the time is spent.

 

If all what you need is for this result to be computed, you can turn OFF that normalization of noncommutative products within the Physic package in the following way

kernelopts(opaquemodules = false); Physics:-iNormal := proc (f) options operator, arrow; f end proc


And then the time consumed is ~1/4 (here I am copying from another - fresh - session and pasting

time(HOffDiag(6))

15.043

(8)

NOTE however that after you turned OFF the internal normalizer of the package, various things that depend on this normalization of noncommutative products will not work properly, so I STRONGLY RECOMMEND TO RESTART AFTER YOU GOT THE RESULT YOU WANTED. Do nothing else.

 

IMPORTANT: You can always profile your computations using the various tools for that purpose. Here is the Profile home-made cocktail that I use, that also allows to indicate a timelimit for the computation as well (so that I don't wait forever, and still get partial profiling information if necessary). If you don't understand it please write here again and I will explain furthermore.

print(Profile)

proc (command, x, { sort::(identical(alpha, ralpha, time, rtime, words, rwords, calls, rcalls, load, rload)) := rtime }) kernelopts(profile = true); writeto('output'); if command::'posint' then try timelimit(command, x(args[3 .. -1])) catch "time expired":  end try else try command(args[2 .. -1]) catch:  end try end if; kernelopts(profile = false); writeto(terminal); readlib(exprofile); excallgraph('output', sort) end proc

(9)

Example of use in the case of '3' (note you can sort by different things, check the help page for excallgraph )

Profile(HOffDiag, 3, sort = rcalls)


In the case '6', the whole profiling activity gets out of the road in my machine after producing and output file bigger than 1/2 gigabyte, so I end up interrupting the computation, and analyzed the partial information, that already had the amount of times Commutator got called (7575, search for Commutator below) . After interrupting, the following lines in comments show you how to recover from such an interruption; they are followed by the partial profiling information for HOffDiag(6).

 

Profiling output

   


Download SumOfCommutators_(reviewed).mw

 

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

These are the components of the gamma_[a,b,c] tensor shown in Landau's 'The classical theory of fields', (98.9), page 314; they are now implemented, as well as their linear combinations lambda_[a,b,c] shown in Landau's book as (98.10), that simplify the computation of the gamma_[a,b,c].

A worksheet showing the novelty is included in the zip with the Physics update, available for download in the Maplesoft R&D Physics webpage as usual. This worksheet illustrates how to work with the new predefined tensors, as well as how to define everything from scratch using the ability within the Physics package to define tensors in terms of tensorial expressions (where each tensor is in turn defined in terms of other tensorial expressions, and so on, with no restrictions to the levels of nesting).

The computational power and flexible style of the Physics package are combining in very nice ways. Next step is the implementation of the NP Weyl scalars.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi Age

First please update your Physics with the one provided in the Maplesoft R&D Physics webpage. Tetrads were implemented recently - you many know, nowadays developments in this package are posted on this R&D Physics page around the clock. The documentation is not ready, but the zip that contains the update also contains one worksheet, called NullVectors.mw, that provides, through examples, most of the information you are asking.

I summarize here the novelties:

  • You can set tetrad indices different from spacetime indices, which is equivalent to work with the same tensors in two frames at the same time: the global one, frequently called the 'coordinates' frame, or spacetime frame, and a local one, frequently called local inertial frame (when it is orthonormal, so that the tetrad metric is Minkowski) or the NP (Newman-Penrose, i.e. the tetrad connection is constructed with the NP null vectors);
  • Eight new tensors were added to the package, these are:
    1) the tetrad connection e_[a, mu] (also called vierbein), that maps the tensor components in one frame (global or local) to the tensor components in the other frame;
    2) the tetrad metric eta_[a, b] (if orthonormal, it is of Minkowski type, but you can set it to whatever you want provided it is symmetric, use Setup(tetradmetric = ...); it works the same way as Setup(metric = ...) but sets eta_ instead of g_)
    3) the Ricci rotation coefficients gamma_[a, b, c] (the automatic computation of its components is not in place yet but, coincidentally, I am working on this today and will probably have it in place and uploaded to the R&D Physics webpage by the end of the day);
    4) another related tensor shown in Landau's "The classical theory of fields" book as (98.10) in page 293, this is lambda_[a, b, c] constructed with linear combinations of gamma_[a,b,c]
    5) the four null vectors of the tetrad formalism l_[mu], n_[mu], m_[mu] and mb_[mu], within a new subpackage Physics:-Tetrads.
  • You can work with the vectors 1), 2), 3) and 4) right away, just Setup(tetradindices=lowercaselatin) or to any other kind of letter you prefer. Try for instance e_[], or Setup(tetradmetric = NP) or etc.
  • You can work with the NP null vectors right away; for this, try e_[nullvectors], and you get stuff ready for Define(%) and from there all works as expected.
  • Or, you can enter with(Physics:-Tetrads) and now you have all related automatically set, and the vectors mentioned in 5) automatically defined, and this definition will automatically follow any changes you do in the metric.

There is more, but the above is the gist. As said the implementation is new, 1/2 of it introduced in September, the rest introduced a week or two ago. Things may change but by now the design is stable and working very well. Anyway some parts of the development, as for instance the simplification of contracted tetrad indices, require more work.

Together with these developments I plan to have in place the Weyl scalars (the same way we can now compute the Riemann invariants), so that the Petrov classification is also in place automatically; i.e. you just indicate the line element for your spacetime and everything, even the Petrov classification, is automatically available without you having to indicate anything else.

Note as well that these things mentioned above can be computed using the DifferentialGeometry package, although things are not automatically available after just indicating the metric so you need to go in steps. But it is possible, just not so straighforward and not with input and output using tensor-indicial notation as is the case of the Physics package and frequently seen in Physics textbooks.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Download AddContravariantComponents.mw

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi Age

For summing over repeated indices, so a case where you have mu and ~mu present in the same expression, the command you are looking for is called SumOverRepeatedIndices, one of the commands of the Physics package. For summing over ~mu only, you can use add or sum, for example:

> add(g_[~mu, 2], ~mu=1..2)

does what you want. The key thing is that ~mu is just a symbol; so, it can also be used as a summation dummy withn add or sum.

Depending on the manipulation you want to do with indices you may also want to give a look at SubstituteTensorIndices.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

@rit 

Please give a look at the help pages for Physics,Ricci and for DifferentialGeometry,Tensor,RicciTensor. You will see that you need to set the metric of spacetime. This is shown in the Examples sections of these pages. The coordinates you see set in the Physics pages is equivalent to the DGsetup command in the DifferentialGeometry page. Likewise, setting the metric (equations 6 and 7 of the Physics page) is equivalent to setting the Connection in the DifferentialGeometry page (equations 2.2 and in another example in 2.7). Once you have set the metric you can calculate everything about this tensor as explained in these two help pages.

Edgardo S. Cheb-Terrab 
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi

I believe that the command you are looking for is PDEtools:-dsubs - it performs differential substitutions into expressions.

A more sophisticated operation can be performe with PDEtools:-casesplit, as in 'simplify differential equations taking into account other differential equations'; this is in the end what you are doing with you are performing differential substitutions, although the range of problems you can tackle with PDEtoosl:-casesplit, mainly in the PDE case, is bigger than the kind of substitutions you mentioned.

Anyway both commands do what you ask very well.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Note also that if you use eval instead of subs, you actually don't need to use simplify or Simplify or anything else: the expression automatically cancels upon evaluation of the commutators.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

Hi NOh

The issue is known. You can fix this and related (so called premature evaluation) problems by redefining sum as in:

 

To see an explanation of what this does check please the help page ?Updates,Maple18,Physics, the section on "New Enhanced Modes in Physics Setup", item 4.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

First 40 41 42 43 44 45 46 Last Page 42 of 55