ecterrab

13316 Reputation

24 Badges

18 years, 89 days

MaplePrimes Activity


These are answers submitted by ecterrab

 

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

Hi Kevin

Use Array instead of Vector, as in X[~nu] = Array([x0, x1, x2, x3]), and that resolves the problem. The use of Array is explained in the help page ?Physics[Define]. By the way a similar question was posted and answered two week ago here. An example of this kind will be added to the help page.

If you update your Physics package with the current version distributed in the Maplesoft webpage "Maple Physics: Research & Development", you can also use a list, as in X[~nu] = [x0, x1, x2, x3]. Your use of 'Vector' for this purpose is anyway natural, to be allowed in the next Physics update (next week). Regarding the Physics update itself, the zip contains a worksheet illustrating the novelties.

Independent of the different ways of defining a 4-Vector, note that defining a coordinate system automatically defines a related 4-Vector as the one you are trying to define manually. So entering Coordinates(X), or Setup(coordinates = X) also work for your purpose - see ?Physics[Coordinates] for some predefined options you have for the components.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 

Hi

I'm not sure I understand your question. What you do mean by eliminating the derivatives of of these lambdas or the last sentence that starts with result?

What I see: if you try PDEtools:-casesplit([a,b,c]) you resolve the system: one differential equation involving only lambda3, plus two non-differential equations expression each of lambda2 and lambda1 as functions of lambda3 and its derivatives. And that is all the elimination that is possible for the system [a,b,c]. If you call your result of 'd', then the only solution of the system [a,b,c,d] is the three lambdas equal to 0; for that try PDEtools:-casesplit([a,b,c,d]).

So you cannot eliminate the three derivatives of lambda, only two of them in favor of a third one, and if you add the equation you called 'result' the system [a,b,c] turns into unsolvable (i.e.: a linear system where the only solution is the trivial one, all the unknowns equal to zero).

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Kuka 

Due to a bug in a Typesetting routine when using 2D math input, you are unable to enter contravariant indices by prefixing them with ~ also in Maple 17.02 (note there has been an update, you are still working with Maple 17.00), as you show. One solution is then to change that 2D math input line into 1D math input (press F5).

A more complete solution is for you to update the Physics library from the Maplesoft "Maple Physics: Research & Development" webpage. This update includes a fix to the Typesetting issue you are mentioning, as well as new functionality, and various tweaks and adjustments. By the way: for 4-Vectors, you can now also use just a list instead of an Array, Matrix or procedure. Also relevant for tensor manipulations see the new Library:-SubstituteTensor command, explained in the PhysicsUpdates.mw worksheet distributed together with the updated Physics library

After updating your Physics.mla, you can get the covariant and contravariant components as mentioned in the help page also when you input in 2D.

Note that Physics is updated on this Maplesoft R & D page rather frequently taking into account feedback posted here in Mapleprimes. So if you find something not working properly, or there is functionality that you need and is not there, by posting here there are good chances that the problem is resolved the same week (please tag your post as 'physics' so that I see it right away).

Edgardo S. Cheb-Terrab
Physics, Maplesoft 

Hi,
Assuming your question is: "Given the components of Aijmn and Cijkl, compute the components of Bmnkl that satisfy AijmnBmnkl=Cijkl", an alternative to Torre's suggestion of using DifferentialGeometry, so using Physics and standard tensor indicial notation instead, is as follows:

1) Define the tensors Aijmn and Cijkl(see 4th paragraph of ?Physics,Define to define A and C specifying their components as Arrays).

2) Construct your tensor equation the same way you posted, as in eq := AijmnBmnkl=Cijkl and transform this equation into a system of equations for the components of Bmnkl using Physics:-Library:-TensorComponents(eq), see ?Physics,Library, section for TensorComponents. Call this system of equations sys. The solving variables are the components of B, so vars := Library:-TensorComponents(Bmnkl).

3) Solve the system the usual way, sol_B := solve(sys, vars)

That is all. The advantage of this approach is that it involves algebraic manipulations using the standard Maple commands and tensorial indicial notation so requiring no additional knowledge. If you have any trouble reproducing these steps please post the example concretely - for that purpose you can upload a worksheet with your reply here in Mapleprimes, and we continue from there.

 

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 PS: where you wrote Aijmn to represent the covariant components, in Maple you enter A[i,j,m,n]. Contravariant indices are prefixed by ~, say ~j instead of j.

 

 

Hola Sergio,

 

PDEtools:-declare(f(x, y))

f(x, y)*`will now be displayed as`*f

(1)

diff(f(x, y), x, y) = f(x, y)

diff(diff(f(x, y), x), y) = f(x, y)

(2)

Mark with the mouse, copy and paste:

diff(f(x, y), y, x) = f(x, y)

 

Now, what you want is the old behavior, where you copy and paste "as displayed", i.e. with jet notation. The following is part of developments for the next release but already works in Maple 17.02:

PDEtools:-declare(copyasdisplayed = true)

`Displayed derivatives and declared functions will be copied and pasted

(3)

Try now

diff(f(x, y), x, y) = f(x, y)

diff(diff(f(x, y), x), y) = f(x, y)

(4)

Mark this new output, copy and paste:

f[x, y] = f

Note that if you copy the output of (2) it will continue pasting 'as entered', while the output (4) pasts 'as displayed'.

 

You can switch within a session as much as you want:

PDEtools:-declare(copyasdisplayed = false)

`Displayed derivatives and declared functions will be copied and pasted

(5)

diff(f(x, y), x, y) = f(x, y)

diff(diff(f(x, y), x), y) = f(x, y)

(6)

Mark (6), copy and paste

diff(f(x, y), y, x) = f(x, y)

 

Independent of that, you can always use PDEtools:-ToJet and PDEtools:-FromJet, optionally using different kinds of jet notation, then mark, copy and paste, and the pasted object is always 'as displayed'.

Download DeclareCopyAndPast.mw

Edgardo S. Cheb-Terrab
Physics, Maplesoft

PS: for some reason some of the output of the uploaded mw appear with "?". In the attached mw things are displayed correctly.

Hi

The simplification of hypergeometric functions is a complicated problem, although computer algebra systems nowadays have powerful algorithms to reduce to a special case involving more famlilar functions *when that is possible*. Of course it is not always possible. Calling your hypergeometric function of pFq, the convert(pFq, StandardFunctions) mentioned by Carl is one way of trying a simpler expression.

There is something more general though: FunctionAdvisor(specialize, pFq). That will give you not only what convert/StandardFunctions can give you but also the different specializations for the parameters within pFq (for instance, your t ) such that the pFq could be rewritten in terms of other functions of all available kinds.

With your example, that is pFq = hypergeom([1/t, 1/t], [(t+1)/t], z), for specialized values of t (these specializations may or not be what you need) I see various equivalent mathematical representations of pFq involving one or many of ChebyshevT, ChebyshevU, GAMMA, HeunC, HeunG, HeunGPrime, JacobiP, LerchPhi, MeijerG, Psi, arccos, arccosh, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, ln, sin.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Andriy 

Note first that conjugate does not split into Re and Im. It is simplify that, under certain circumstances, splits into Re and Im; and I am saying that your example in this thread shows a case where the splitting is mostly undesired, not really a simplification.

But there are other cases where this splitting into Re and Im by simplify are, generally speaking, understood as a simplification: when occurrences of z and conjugate(z) in an expression can be combined into 1)  only Re(z) in the expression, or 2) only Im(z), or 3) only Re(z)*Im(z) plus reducing the degree of occurrences of conjugate(z). The cases 1) and 2) are more or less natural simplifications. Case 3) is trickier, here is an example:

> conjugate(z)^2 - z^2;

> simplify(%, conjugate);
                                  -4 I Re(z) Im(z)

This output looks to me simpler than the input conjugate(z)^2 - z^2. On top of these considerations, Maple always performed this "simplification" above, regardless of whether some people may prefer to see conjugate(z)^2 - z^2. In a situation like this, changing previous behavior is inconvenient, makes things that worked in previous releases to stop working in the next one.

On the other hand, as said, some 'simpilfications' are really not simplifications - at all - for basically any reasonable person. In situations like these it is of course OK to change the behavior, it becomes an improvement. Your example is in this class, and also I rewrote simplify/conjugate recently. I'm still busy with other stuff but will see soon how the rewritten simplify/conjugate can be tweaked a bit more to do a better job with examples like yours, while keeping previous desired behavior (items 1), 2) and 3) above) working.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

First 46 47 48 49 50 51 52 Page 48 of 55