ecterrab

13558 Reputation

24 Badges

18 years, 292 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi

Yes you can change the way the solution is written, but this equation admits no Liouvillian solution (for a definition see ?DEtools[kovacicsols], 2nd paragraph). So you cannot avoid using special functions, e.g. Legendre or something more general as pFq (hypergeom) to represent the solution.

So you can try dsolve(ode, [hyper3]) to see a solution in terms of hypergeometric functions, and alternatively you can also try FunctionAdvisor(specialize, special_function) (where in your case special_function is LegendreP(1/2*I*sqrt(7)-1/2, I*sqrt(7), 2*I*tau) to see the specializations (different ways of expressing pecial_function) that Maple knows about.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

Regarding Lie algebras or vector fields, there is also PDEtools:-SymmetryCommutator, DifferentialGeometry:-LieBracket and Physics:-LieBracket.

But within the Physics package, the natural commands for this are Commutator and AntiCommutator, and there this missing functionality is an oversight. I fixed this now. The fix is already uploaded and available in Maplesoft's  Physics: Research & Development webpage. With the fix,

with(Physics):

A := Matrix(2, 2, [a, b, c, d])

Matrix(%id = 18446744078296945478)

(1)

B := Matrix(2, 2, [f, g, h, j])

Matrix(%id = 18446744078296946198)

(2)

Commutator(A, B)

Matrix(%id = 18446744078296947878)

(3)

AntiCommutator(A, B)

Matrix(%id = 18446744078296943422)

(4)

 

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

Hi

See the Physics package. In its help page ?Physics you see all the commandas available and a two lines description for each of them. Basically, to define tensors use its Define command. To set the metric use the Setup, or the metrics command g_ itself, as in g_[sc] will do it for the Schawrzschild metric. To compute the geodesics you can use the Physics:-Geodesics command, or Physics:-KillingVectors to compute the Killing vectors, and so on.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
Your post appeared in my radar after Carl added the physics tag. I see that the main question has been answer, but looking at your worksheet, it gives me the impression that perhaps you are not aware of the existence of the Physics package? In your worksheet you define the Dirac matrices, fermions, antifermions, a spacetime metric, etc. All this exists in standard Maple through its Physics package; at first sight I'd say that you can simplify your computation in various ways using Physics.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Marko,

T(3^22-1)-T_ex(3^22-1)

Error, (in T_ex) invalid subscript selector

 

Try tracelast

tracelast

 T_ex called with arguments: 31381059608
 #(T_ex,3): add(3^j*(1+m-j)^3*add(d[k+1]*3^k,k = j .. m),j = 0 .. m)

Error, (in T_ex) invalid subscript selector

 

 locals defined as: m = 22, d = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

So the problem happens when executing the add statement within T_ex. So debug this procecure

debug(T_ex)

T_ex

(1)

T_ex(3^22-1)

{--> enter T_ex, args = 31381059608

 

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

22

 

<-- ERROR in T_ex (now at top level) = invalid subscript selector}

Error, (in T_ex) invalid subscript selector

 

Now you have the data to identify the problem. Copy and paste into input lines the value of d and m

d := [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

(2)

You see there are only 22

nops(d)

22

(3)

So if you go beyond this number:

d[23]

Error, invalid subscript selector

 

Let's see then:

m := 22

22

(4)

Replace d by %d, and get all the %d[anything] in this add structure withou your procedure:

indets(add(3^j*(1+m-j)^3*add(%d[k+1]*3^k, k = j .. m), j = 0 .. m), %d[anything])

{%d[1], %d[2], %d[3], %d[4], %d[5], %d[6], %d[7], %d[8], %d[9], %d[10], %d[11], %d[12], %d[13], %d[14], %d[15], %d[16], %d[17], %d[18], %d[19], %d[20], %d[21], %d[22], %d[23]}

(5)

You see there, at the end, %d[23], wo when it is d[23] it interrupts with an error.

 

At Digits = 50 the situation is different: m = 21, not 22.

Digits := 50

50

(6)

T_ex(3^22-1)

{--> enter T_ex, args = 31381059608

 

[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

 

21

 

3806850983304031497242

 

<-- exit T_ex (now at top level) = 3806850983304031497242}

 

3806850983304031497242

(7)

And with m = 21, the maximum index for d is 22, not 23, so you don't see an error.

 

Summary: ilog[3](n) depends on the value of Digits, that explains why an error for Digits = 10 (default value) but no error for Digits = 50.


Download debug.mw

 

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Sergio
Not sure whether this is of use for you but just in case: PDEtools:-casesplit returns, basically, a triangularization equivalent to a differential Groebner basis, computed using DEtools[rifsimp] or optionally the more formal DifferentialAlgebra:-RosenfeldGroebner. If you want to do the same triangularization but with the derivatives seen as independent of the functions (sort of algebraic Grobner basis, say as in a jet space) you can apply PDEtools:-ToJet(pdesys), then pass the system to PDEtools:-casesplit.

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

Hi

In situations like this one, besides what Markiyan correctly pointed out (see ?to_special_function for a list of conversions including class conversions), the way to go to investigate an expression is

> FunctionAdvisor(specialize, F);

where in your example F = hypergeom([1/2],[3/2,3/2,2,2], rho^2/64). Doing that, you see that the system only knows how to related this F to MeijerG (so not simpler).

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

 

Hello Dmitriy

How are you? Indeed, this is the best forum to post these issues, and indeed it is expected from the simplifier to simplify expressions like this one.

 

I uploaded now version 39.3 with an adjustment resolving the issue.

 

So,

restart; with(Physics); Setup(notation = true, spacetimeindices = lowercaselatin)

`* Partial match of  'notation' against keyword 'mathematicalnotation'`

 

[mathematicalnotation = true, spacetimeindices = lowercaselatin]

(1)

Define(F[a])

`Defined objects with tensor properties`

 

{Physics:-Dgamma[mu], F[a], Physics:-Psigma[mu], Physics:-d_[mu], Physics:-g_[mu, nu], Physics:-KroneckerDelta[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu]}

(2)

Your example

-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(252730487637, KroneckerDelta[`~n`, n]), F[`~f`]), F[f]), F[`~d`]), F[d]), F[j]), F[`~j`]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(126442568484, KroneckerDelta[`~n`, n]), KroneckerDelta[g, `~g`]), F[`~f`]), F[`~d`]), F[d]), F[f]), F[a]), F[b]), F[c])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, g_[`~j`, `~i`]), F[j]), F[i]), F[`~d`])-Physics:-`*`(Physics:-`*`(Physics:-`*`(162, KroneckerDelta[`~i`, j]), KroneckerDelta[`~d`, i]), F[`~j`])+Physics:-`*`(Physics:-`*`(Physics:-`*`(27, KroneckerDelta[`~i`, i]), KroneckerDelta[j, `~d`]), F[`~j`]), Physics:-`*`(Physics:-`*`(Physics:-`*`(27, g_[`~l`, `~n`]), g_[n, l]), F[b])+Physics:-`*`(Physics:-`*`(Physics:-`*`(1539, KroneckerDelta[l, `~l`]), KroneckerDelta[`~n`, b]), F[n])+Physics:-`*`(Physics:-`*`(Physics:-`*`(432, F[`~n`]), F[n]), F[b])), Physics:-`*`(Physics:-`*`(Physics:-`*`(2511, g_[d, h]), F[`~h`]), F[a])+Physics:-`*`(Physics:-`*`(Physics:-`*`(27, g_[h, a]), F[`~h`]), F[d])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, KroneckerDelta[g, `~g`]), KroneckerDelta[`~h`, a]), F[h]), F[d])), Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1701, g_[`~f`, `~e`]), F[f]), F[e]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, KroneckerDelta[`~e`, c]), F[e]), F[f]), F[`~f`])-Physics:-`*`(Physics:-`*`(Physics:-`*`(1350, KroneckerDelta[f, `~e`]), KroneckerDelta[c, `~f`]), F[e]))-Physics:-`*`(Physics:-`*`(Physics:-`*`(81, -Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(7938, g_[c, f]), F[`~f`]), F[e]), F[`~e`])+Physics:-`*`(Physics:-`*`(Physics:-`*`(27, KroneckerDelta[`~e`, e]), g_[f, c]), F[`~f`])), Physics:-`*`(Physics:-`*`(Physics:-`*`(135, KroneckerDelta[b, `~d`]), F[i]), F[`~i`])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, F[i]), F[`~i`]), F[b]), F[`~d`])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(5832, KroneckerDelta[`~i`, h]), KroneckerDelta[i, `~h`]), F[b]), F[`~d`])), Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, KroneckerDelta[j, `~k`]), KroneckerDelta[`~j`, a]), F[k]), F[d])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(8100, g_[a, k]), KroneckerDelta[`~j`, d]), F[`~k`]), F[j])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, F[k]), F[`~k`]), F[a]), F[d]))+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(32188971097548, KroneckerDelta[`~n`, n]), F[`~e`]), F[h]), F[`~h`]), F[e]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(25470904248, F[`~h`]), F[`~n`]), F[h]), F[`~i`]), F[n]), F[i]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(148090286178, F[`~e`]), F[e]), F[n]), F[`~h`]), F[h]), F[`~n`]), F[i]), F[`~i`]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(5, -Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1539, KroneckerDelta[`~j`, j]), KroneckerDelta[`~m`, k]), KroneckerDelta[`~k`, d]), F[m])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1539, KroneckerDelta[m, `~k`]), F[`~m`]), F[k]), F[d])), -Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(5994, KroneckerDelta[`~g`, a]), g_[b, e]), F[g]), F[`~e`])-Physics:-`*`(Physics:-`*`(Physics:-`*`(2700, KroneckerDelta[`~g`, b]), F[g]), F[a])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(2349, KroneckerDelta[`~e`, e]), g_[a, b]), F[`~g`]), F[g])), Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(81, KroneckerDelta[`~i`, c]), KroneckerDelta[h, `~d`]), F[`~h`]), F[i])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(5022, g_[`~h`, `~i`]), KroneckerDelta[`~d`, h]), F[i]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1458, KroneckerDelta[h, `~i`]), g_[i, c]), F[`~h`]), F[`~d`]))+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4623536700, KroneckerDelta[`~n`, n]), KroneckerDelta[`~i`, i]), KroneckerDelta[g, `~g`]), F[d]), F[`~d`]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(115665476445, KroneckerDelta[`~j`, j]), KroneckerDelta[`~e`, e]), g_[a, b]), F[h]), F[g]), F[`~h`]), F[`~g`]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(4591650240, KroneckerDelta[g, `~g`]), F[`~e`]), F[e]), F[`~n`]), F[i]), F[n]), F[d]), F[`~i`]), F[`~d`]), F[a]), F[b]), F[c])+Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(12784344696, KroneckerDelta[`~n`, n]), KroneckerDelta[g, `~g`]), F[`~d`]), F[d]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(5548244040, KroneckerDelta[g, `~g`]), KroneckerDelta[`~n`, n]), KroneckerDelta[`~i`, i]), F[`~e`]), F[`~d`]), F[d]), F[e]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1294904711925, KroneckerDelta[`~n`, n]), F[`~h`]), F[h]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(18175282200, KroneckerDelta[g, `~g`]), KroneckerDelta[`~n`, n]), F[`~e`]), F[e]), F[`~d`]), F[j]), F[`~j`]), F[d]), F[a]), F[b]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(115665476445, KroneckerDelta[`~e`, e]), g_[a, b]), F[`~h`]), F[g]), F[h]), F[`~k`]), F[k]), F[`~g`]), F[c])-Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(Physics:-`*`(1378008798300, F[h]), F[`~n`]), F[`~h`]), F[n]), F[a]), F[b]), F[c])

-1010921950548*F[`~f`]*F[f]*F[`~d`]*F[d]*F[j]*F[`~j`]*F[a]*F[b]*F[c]-2023081095744*F[`~f`]*F[f]*F[`~d`]*F[d]*F[a]*F[b]*F[c]+(81*F[i]*F[j]*F[`~d`]*Physics:-g_[`~i`, `~j`]-162*F[`~j`]*Physics:-KroneckerDelta[i, `~d`]*Physics:-KroneckerDelta[j, `~i`]+108*F[`~j`]*Physics:-KroneckerDelta[j, `~d`])*(432*F[b]*F[n]*F[`~n`]+27*F[b]*Physics:-g_[l, n]*Physics:-g_[`~l`, `~n`]+6156*F[n]*Physics:-KroneckerDelta[b, `~n`])*(2511*F[a]*F[`~h`]*Physics:-g_[d, h]+324*F[d]*F[h]*Physics:-KroneckerDelta[a, `~h`]+27*F[d]*F[`~h`]*Physics:-g_[a, h])*(1701*F[c]*F[e]*F[f]*Physics:-g_[`~e`, `~f`]-81*F[e]*F[f]*F[`~f`]*Physics:-KroneckerDelta[c, `~e`]-1350*F[e]*Physics:-KroneckerDelta[c, `~f`]*Physics:-KroneckerDelta[f, `~e`])-(-642978*F[e]*F[`~e`]*F[`~f`]*Physics:-g_[c, f]+8748*F[`~f`]*Physics:-g_[c, f])*(81*F[b]*F[i]*F[`~d`]*F[`~i`]-5832*F[b]*F[`~d`]*Physics:-KroneckerDelta[h, `~i`]*Physics:-KroneckerDelta[i, `~h`]+135*F[i]*F[`~i`]*Physics:-KroneckerDelta[b, `~d`])*(81*F[a]*F[d]*F[k]*F[`~k`]+81*F[d]*F[k]*Physics:-KroneckerDelta[a, `~j`]*Physics:-KroneckerDelta[j, `~k`]+8100*F[j]*F[`~k`]*Physics:-g_[a, k]*Physics:-KroneckerDelta[d, `~j`])+128755884390192*F[`~e`]*F[h]*F[`~h`]*F[e]*F[a]*F[b]*F[c]-25470904248*F[`~h`]*F[`~n`]*F[h]*F[`~i`]*F[n]*F[i]*F[a]*F[b]*F[c]-148090286178*F[`~e`]*F[e]*F[n]*F[`~h`]*F[h]*F[`~n`]*F[i]*F[`~i`]*F[a]*F[b]*F[c]-(-7695*F[d]*F[k]*F[`~m`]*Physics:-KroneckerDelta[m, `~k`]-30780*F[m]*Physics:-KroneckerDelta[d, `~k`]*Physics:-KroneckerDelta[k, `~m`])*(-5994*F[g]*F[`~e`]*Physics:-g_[b, e]*Physics:-KroneckerDelta[a, `~g`]-2700*F[a]*F[g]*Physics:-KroneckerDelta[b, `~g`]-9396*F[g]*F[`~g`]*Physics:-g_[a, b])*(-5022*F[c]*F[i]*Physics:-g_[`~h`, `~i`]*Physics:-KroneckerDelta[h, `~d`]+81*F[i]*F[`~h`]*Physics:-KroneckerDelta[c, `~i`]*Physics:-KroneckerDelta[h, `~d`]-1458*F[`~d`]*F[`~h`]*Physics:-g_[c, i]*Physics:-KroneckerDelta[h, `~i`])+500455863936*F[d]*F[`~d`]*F[a]*F[b]*F[c]-1850647623120*Physics:-g_[a, b]*F[h]*F[g]*F[`~h`]*F[`~g`]*F[c]-18366600960*F[`~e`]*F[e]*F[`~n`]*F[i]*F[n]*F[d]*F[`~i`]*F[`~d`]*F[a]*F[b]*F[c]-355087618560*F[`~e`]*F[`~d`]*F[d]*F[e]*F[a]*F[b]*F[c]-5179618847700*F[`~h`]*F[h]*F[a]*F[b]*F[c]-290804515200*F[`~e`]*F[e]*F[`~d`]*F[j]*F[`~j`]*F[d]*F[a]*F[b]*F[c]-462661905780*Physics:-g_[a, b]*F[h]*F[g]*F[`~h`]*F[`~k`]*F[k]*F[`~g`]*F[c]-1378008798300*F[`~h`]*F[`~n`]*F[h]*F[n]*F[a]*F[b]*F[c]

(3)

Taking into account Einstein's sum rule for repeated indices, the symmetry properties of g[i, j] and delta[i, j] and considering all contracted indices as tensorial dummy indices, this tensorial expression is equal to zero

Simplify(-1010921950548*F[`~f`]*F[f]*F[`~d`]*F[d]*F[j]*F[`~j`]*F[a]*F[b]*F[c]-2023081095744*F[`~f`]*F[f]*F[`~d`]*F[d]*F[a]*F[b]*F[c]+(81*F[i]*F[j]*F[`~d`]*Physics:-g_[`~i`, `~j`]-162*F[`~j`]*Physics:-KroneckerDelta[i, `~d`]*Physics:-KroneckerDelta[j, `~i`]+108*F[`~j`]*Physics:-KroneckerDelta[j, `~d`])*(432*F[b]*F[n]*F[`~n`]+27*F[b]*Physics:-g_[l, n]*Physics:-g_[`~l`, `~n`]+6156*F[n]*Physics:-KroneckerDelta[b, `~n`])*(2511*F[a]*F[`~h`]*Physics:-g_[d, h]+324*F[d]*F[h]*Physics:-KroneckerDelta[a, `~h`]+27*F[d]*F[`~h`]*Physics:-g_[a, h])*(1701*F[c]*F[e]*F[f]*Physics:-g_[`~e`, `~f`]-81*F[e]*F[f]*F[`~f`]*Physics:-KroneckerDelta[c, `~e`]-1350*F[e]*Physics:-KroneckerDelta[c, `~f`]*Physics:-KroneckerDelta[f, `~e`])-(-642978*F[e]*F[`~e`]*F[`~f`]*Physics:-g_[c, f]+8748*F[`~f`]*Physics:-g_[c, f])*(81*F[b]*F[i]*F[`~d`]*F[`~i`]-5832*F[b]*F[`~d`]*Physics:-KroneckerDelta[h, `~i`]*Physics:-KroneckerDelta[i, `~h`]+135*F[i]*F[`~i`]*Physics:-KroneckerDelta[b, `~d`])*(81*F[a]*F[d]*F[k]*F[`~k`]+81*F[d]*F[k]*Physics:-KroneckerDelta[a, `~j`]*Physics:-KroneckerDelta[j, `~k`]+8100*F[j]*F[`~k`]*Physics:-g_[a, k]*Physics:-KroneckerDelta[d, `~j`])+128755884390192*F[`~e`]*F[h]*F[`~h`]*F[e]*F[a]*F[b]*F[c]-25470904248*F[`~h`]*F[`~n`]*F[h]*F[`~i`]*F[n]*F[i]*F[a]*F[b]*F[c]-148090286178*F[`~e`]*F[e]*F[n]*F[`~h`]*F[h]*F[`~n`]*F[i]*F[`~i`]*F[a]*F[b]*F[c]-(-7695*F[d]*F[k]*F[`~m`]*Physics:-KroneckerDelta[m, `~k`]-30780*F[m]*Physics:-KroneckerDelta[d, `~k`]*Physics:-KroneckerDelta[k, `~m`])*(-5994*F[g]*F[`~e`]*Physics:-g_[b, e]*Physics:-KroneckerDelta[a, `~g`]-2700*F[a]*F[g]*Physics:-KroneckerDelta[b, `~g`]-9396*F[g]*F[`~g`]*Physics:-g_[a, b])*(-5022*F[c]*F[i]*Physics:-g_[`~h`, `~i`]*Physics:-KroneckerDelta[h, `~d`]+81*F[i]*F[`~h`]*Physics:-KroneckerDelta[c, `~i`]*Physics:-KroneckerDelta[h, `~d`]-1458*F[`~d`]*F[`~h`]*Physics:-g_[c, i]*Physics:-KroneckerDelta[h, `~i`])+500455863936*F[d]*F[`~d`]*F[a]*F[b]*F[c]-1850647623120*Physics:-g_[a, b]*F[h]*F[g]*F[`~h`]*F[`~g`]*F[c]-18366600960*F[`~e`]*F[e]*F[`~n`]*F[i]*F[n]*F[d]*F[`~i`]*F[`~d`]*F[a]*F[b]*F[c]-355087618560*F[`~e`]*F[`~d`]*F[d]*F[e]*F[a]*F[b]*F[c]-5179618847700*F[`~h`]*F[h]*F[a]*F[b]*F[c]-290804515200*F[`~e`]*F[e]*F[`~d`]*F[j]*F[`~j`]*F[d]*F[a]*F[b]*F[c]-462661905780*Physics:-g_[a, b]*F[h]*F[g]*F[`~h`]*F[`~k`]*F[k]*F[`~g`]*F[c]-1378008798300*F[`~h`]*F[`~n`]*F[h]*F[n]*F[a]*F[b]*F[c])

0

(4)

  

Download MaplePrimesTensoria.mw


Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

Please give a look at the PDEtools package. In the corresponding help page ?PDEtools you will see an section entitled 'Symmetry and related solution PDE commands" linking a set of 30 commands and help pages for performing symmetry analysis of ODEs, PDEs and systems of them, in general.

Besides that, also excellent stuff, only older, restricted to ODEs and not handling systems of equations, within DEtools you have DEtools[symgen] to compute the infinitesimals of a single ODE, DEtools[canoni] to compute the corresponding canonical coordinates, buildsym, equinv and some others, all of which have corresponding more general commands in PDEtools that as said work with ODEs, PDEs and systems of them.

Finally, within the framework of the theory of differential forms, the DifferentialGeometry package also has commands for performing some of the operations you see listed in ?PDEtools in the section for Symmetries.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

The relevant page to look at is ?Physics/Define, 4th paragraph, defining tensors as equations with an Array of components in the right-hand side. I recommend you to update the Physics library downloading it from the Maplesoft Physics Research & Development webpage. The update contains various fixes and improvements all around. With the update in place you can also define a tensor as an equation with just a list of components in the right-hand side. In brief, use Define(A[~mu] = [A1, A2, cosh(x2), A4]), where A1, A2, and A4 could be any algebraic expression.

Working examples: there are some in other replies in Mapleprimes

4-Vectors

Define A Vector as A Tensor

solving tensor equation

If these don't match your problem, could you please describe it more specifically. In connection with your post note also that there is a command Physics/KillingVectors.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

PS: regarding the tag you used, 'relativity', if you use 'physics' your post gets noticed faster.

 

Looking closer: this kind of problem can be tackled directly using resultants.

 

Let's construct the problem backwards, departing from a solution, so that we see how it works. Suppose then that the solution to your problem is:

A = (B^2+2*B-1)/(B+2)

A = (B^2+2*B-1)/(B+2)

(1)

and suppose you B is given by the one you posted (after converting it to rational)

B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138)

B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138)

(2)

So your a(t) would look like

normal(subs(B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138), A = (B^2+2*B-1)/(B+2)), expanded)

A = (-100*t^6-3640*t^5-46656*t^4-233524*t^3-170759*t^2+1882320*t+3808800)/(200*t^6+8180*t^5+129010*t^4+996100*t^3+3967890*t^2+7715580*t+5713200)

(3)

And now you want to rewrite expression (3) in terms of B in order to expand in series with respect to B. That is the same as eliminating t in favor of B in expression (3); for this purpose you can just rewrite the two equations (2) and (3) as polynomials and tackle the problem using resultant (see resultant )

numer((lhs-rhs)(B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138)))

10*B*t^3+200*B*t^2+1050*B*t-18*t^2+1380*B-341*t-1380

(4)

numer((lhs-rhs)(A = (-100*t^6-3640*t^5-46656*t^4-233524*t^3-170759*t^2+1882320*t+3808800)/(200*t^6+8180*t^5+129010*t^4+996100*t^3+3967890*t^2+7715580*t+5713200)))

200*A*t^6+8180*A*t^5+100*t^6+129010*A*t^4+3640*t^5+996100*A*t^3+46656*t^4+3967890*A*t^2+233524*t^3+7715580*A*t+170759*t^2+5713200*A-1882320*t-3808800

(5)

Take now the resultant with respect to t

resultant(10*B*t^3+200*B*t^2+1050*B*t-18*t^2+1380*B-341*t-1380, 200*A*t^6+8180*A*t^5+100*t^6+129010*A*t^4+3640*t^5+996100*A*t^3+46656*t^4+3967890*A*t^2+233524*t^3+7715580*A*t+170759*t^2+5713200*A-1882320*t-3808800, t)

6235558352100000000*(A*B-B^2+2*A-2*B+1)^3

(6)

You see that t got completely eliminated. Solve now for A, and remove roots that are equal (DropMultiplicity option, see solve,details )

has(%, t)

false

(7)

solve(6235558352100000000*(A*B-B^2+2*A-2*B+1)^3, {A}, DropMultiplicity)

{A = (B^2+2*B-1)/(B+2)}

(8)

You see this is the expected solution (departing equation (1)).

 

Now: In order to this be a genuine rational function decomposition, it is required that there is only one single solution for A as a function of B. To understand the issue, add to equation (3) the equation 0 = t, , as in "normal(subs(B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138), A = (B^2+2*B-1)/(B+2)), expanded)+0 = `t"`, and you see that a complete elimination of t in equation (6) still happens, but now there are multiple solutions, indicating this is not a genuine rational function decomposition. Indeed, there is no way express t as a function of B in a unique way: try

nops([solve(B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138), t)])

3

(9)

Anyway that may or not be relevant depending on the problem you want to solve.

 

With this understanding, let's now do the same with your actual problem after converting to rational

B = convert((1.8*t^2+34.1*t+138.)/(t^3+20.*t^2+105.*t+138.), rational)

B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138)

(10)

So your a(t) would is

A = convert(.4292960410*(t^3+20.0*t^2+105.0*t+138.0)^5/(((t+1.881246817-.5978370144*I)*(t+2.472494183-.1946676251*I)*(t+5.550661347)*(t+5.496908401)*(t+12.46933729)*(t+12.44618893-0.9642646277e-2*I)*(t+.5725282710)*(t+5.589440415)*(t+12.49222265)*(t+12.44618893)*(t+12.46933729))*(t+5.496908401)*(t+5.550661347)*(t+2.472494183+.1946676251*I)*(t+1.881246817+.5978370144*I)), rational)

A = (20905/48696)*(t^3+20*t^2+105*t+138)^5/((t+40618/21591-(19624/32825)*I)*(t+45709/18487-(9207/47296)*I)*(t+44483/8014)^2*(t+114682/20863)^2*(t+25213/2022)^2*(t+141899/11401-(3299/342126)*I)*(t+25213/44038)*(t+47745/8542)*(t+97177/7779)*(t+141899/11401)*(t+45709/18487+(9207/47296)*I)*(t+40618/21591+(19624/32825)*I))

(11)

 

Rewrite the two equations (8) and (9) as polynomials to tackle the problem with resultant

eq_B := numer((lhs-rhs)(B = ((9/5)*t^2+(341/10)*t+138)/(t^3+20*t^2+105*t+138)))

10*B*t^3+200*B*t^2+1050*B*t-18*t^2+1380*B-341*t-1380

(12)

Avoid displaying large expressions

eq_A := numer((lhs-rhs)(A = (20905/48696)*(t^3+20*t^2+105*t+138)^5/((t+40618/21591-(19624/32825)*I)*(t+45709/18487-(9207/47296)*I)*(t+44483/8014)^2*(t+114682/20863)^2*(t+25213/2022)^2*(t+141899/11401-(3299/342126)*I)*(t+25213/44038)*(t+47745/8542)*(t+97177/7779)*(t+141899/11401)*(t+45709/18487+(9207/47296)*I)*(t+40618/21591+(19624/32825)*I))))

 

Take now the resultant with respect to t

ans_AB := resultant(eq_B, eq_A, t)

 

You see that t got completely eliminated.

has(ans_AB, t)

false

(13)

 The result is of degree 3 in A and of high degree in B

(degree, ldegree)(ans_AB, A)

3, 0

(14)

(degree, ldegree)(ans_AB, B)

15, 0

(15)

Solve now for A (recall it is of degree 3 in A, expect radicals and imaginary unit)

ans_A := solve(ans_AB, {A}, DropMultiplicity)

In this case there are three different solutions (roots)

nops([ans_A])

3

(16)

So we fall in the undesired case: this is not a genuine rational function decomposition. If in your case that is not a problem, you can proceed computing the series - say of the first solution:

whattype(ans_A[1])

set

(17)

nops(ans_A[1])

1

(18)

whattype(ans_A[1][1])

`=`

(19)

So the series is computed for rhs(ans_A[1][1])

series(rhs(ans_A[1][1]), B)

 

Download MaplePrimesResultan.mw


Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

To perform an expansion of a(t) in terms of b(t) you need to express a(t) in terms of b(t) first. The way to accomplish that, when possible, would be:

1. Assign eq[1] := convert(a(t) = ...., rational): and eq[2] := convert(b(t) = ..., rational). So do not use floating point numbers (compute with everything exact) and create two equations without assigning a(t) or b(t).

2. Rewrite the right-hand side of eq[1] in terms of b(t), that is, eliminate, in eq[1], the righ-hand side of eq[2] in favor of its left-hand side (b(t)).

3. If in step 2 you obtain an expression that only depends on t through a(t) and b(t) then substitue b(t) by a symbol, say B, and compute a taylor series in terms of B using the series or taylor commands.

So the real question here is how to perform step 2. and whether you obtain the necessary type of result to perform step 3. There are some different tools to perform step 2., for instance see ?PDEtools[ReducedForm] and ?DifferentialAlgebra[ReducedForm]; see also ?RegularChains.

But for the example you posted there is no solution: I tried now and there is no way to eliminate the right-hand side of eq[2] introducing the function 'b(t)' in eq[1]. What that means: the right-hand-side of eq[1] is not a rational function of the right-hand-side of eq[2]. You can also view this problem as performing a rational function decomposition - see also ?DEtools[FunctionDecomposition] for a compact explanation and, as said, in this example you posted it is not possible.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi nm

There are two different ideas behind what you see in Maple and in Mathematica. Generally speaking (and there are exceptions here and there), in Maple there is an intentional emphasis in giving you control as much as possible over every step of a computation, while not going 'static'. Among two good examples of that, 1) in Maple you then have inert representations for mostly everything, you can compute with integrals, derivatives, or functions without ever computing the integrals, derivatives of the functions themselves, just taking into account their properties; 2) in Maple, products of powers of the same base - say a^n * a^m - are not automatically combined. In some sense this is equivalent to requesting from you to sometimes guide the system more specifically in this or that direction. On the other hand, in Mathematica, preference is given to perform these computations automatically, assuming that you are not interested in controlling any of these steps.

So, for example, if in Mathematica you enter Exp[x/2]*Exp[-3/2*x] the exponentials are automatically combined. while if you try the same in Maple, exp(x/2)*exp(-3/2*x), these two factors are not combined. But then if you add exp(x/2), in Maple you can factor this sum easily, as in 

> factor(exp(x/2) + exp(x/2)*exp(-3/2*x)));

exp(x/2)*(exp(-3/2*x)+1)

while in Mathematica you get the less convenient result

In[1]:= Factor[Exp[x/2] + Exp[-3*x/2]*Exp[x/2]]

Out[1]= E^-x (1 + E^(x/2)) (1 - E^(x/2) + E^x)

So sometimes it is convenient to combine products of powers of the same base, sometimes not.

The corollary: yes these systems are different in a number of things, there are advantages and disadvantages in both approaches, and depending on the example one approach is more convenient than the other one. Taking that into account, in each system the commands you need to enter to obtain a result are not the same. I cannot claim neutrality as I work for Maplesoft but, anyway, in my opinion I really like the control maple offers over the computations, and I also like options to switch gears and compute in a more automatic mode. In the context of the Physics package, for instance, one new option (so far experimental) lets you 'automatically combine powers of the same base', another will optionally let you compute derivatives with respect to complex variables using Wirtinger operators instead of the standard classical complex analysis, and etc.

Edgardo S. Cheb-Terrab
Physics, Maplesoft


It is implemented in the version of Maple under development. It will be in place in the upcomming DifferentialEquation updates page (a new page equivalent to the one we have for Physics here).

 

So, for example, this is an ODE system in Vector notation

ode := Vector([diff(x(t), t), diff(y(t), t)]) = Vector([2*x(t)+y(t), 3*y(t)-x(t)])

Vector[column](%id = 18446744078727259310) = Vector[column](%id = 18446744078727259430)

(1)

New: dsolve handles the Vector equation; this fixes the oversight mentioned

dsolve(ode)

{x(t) = exp((5/2)*t)*(_C1*sin((1/2)*3^(1/2)*t)+_C2*cos((1/2)*3^(1/2)*t)), y(t) = -(1/2)*exp((5/2)*t)*(_C2*sin((1/2)*3^(1/2)*t)*3^(1/2)-_C1*cos((1/2)*3^(1/2)*t)*3^(1/2)-_C1*sin((1/2)*3^(1/2)*t)-_C2*cos((1/2)*3^(1/2)*t))}

(2)

New: if the DE system is in vector notation, so is it the output of odetest

odetest({x(t) = exp(5/2*t)*(_C1*sin(1/2*3^(1/2)*t)+_C2*cos(1/2*3^(1/2)*t)), y(t) = -1/2*exp(5/2*t)*(_C2*sin(1/2*3^(1/2)*t)*3^(1/2)-_C1*cos(1/2*3^(1/2)*t)*3^(1/2)-_C1*sin(1/2*3^(1/2)*t)-_C2*cos(1/2*3^(1/2)*t))}, ?)

Vector[column](%id = 18446744078727252678)

(3)

New: the variables can also be specified in Vector notation, in which case dsolve's output will also be in Vector notation

V := Vector([x(t), y(t)])

Vector[column](%id = 18446744078727253638)

(4)

sol := dsolve(ode, V)

Vector[column](%id = 18446744078727253638) = Vector[column](%id = 18446744078727246782)

(5)

New: odetest can test this kind of Vector solution and returns in the same notation

odetest(sol, ode)

Vector[column](%id = 18446744078727244486)

(6)

All the same is implemented for pdsolve and pdetest too. Opinions?

Please recall that the above does not work in your copy of 17.02. These changes will be available for download when we install the Maplesoft DifferentialEquation updates page equivalent to the Maplesoft Physics R&D updates page.

Download DESystemInVectorNota.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@nm @Markiyan Hirnyk 

Since Maple 17, dsolve and pdsolve accept a system of equations of type 'Matrix', 'Vector', or more generally 'rtable'. It is an oversight that it doesn't work with equations where both sides have the same dimensions. Likely, both dsolve and pdsolve could accept a Vector as second argument indicating the solving variables. I'll adjust the code.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

First 47 48 49 50 51 52 53 Page 49 of 56