Maple 2020 Questions and Posts

These are Posts and Questions associated with the product, Maple 2020

In the study of the Gödel spacetime model, a tetrad was suggested in the literature [1]. Alas, upon entering the tetrad in question, Maple's Tetrad's package complained that that matrix was not a tetrad! What went wrong? After an exchange with Edgardo S. Cheb-Terrab, Edgardo provided us with awfully useful comments regarding the use of the package and suggested that the problem together with its solution be presented in a post, as others may find it of some use for their work as well.

 

The Gödel spacetime solution to Einsten's equations is as follows.

 

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 858 and is the same as the version installed in this computer, created 2020, October 27, 10:19 hours Pacific Time.`

(1)

with(Physics); with(Tetrads)

_______________________________________________________

 

`Setting `*lowercaselatin_ah*` letters to represent `*tetrad*` indices`

 

((`Defined as tetrad tensors `*`see <a href='http://www.maplesoft.com/support/help/search.aspx?term=Physics,tetrads`*`,' target='_new'>?Physics,tetrads`*`,</a> `*`&efr;`[a, mu]*`, `)*eta[a, b]*`, `*gamma[a, b, c]*`, `)*lambda[a, b, c]

 

((`Defined as spacetime tensors representing the NP null vectors of the tetrad formalism `*`see <a href='http://www.maplesoft.com/support/help/search.aspx?term=Physics,tetrads`*`,' target='_new'>?Physics,tetrads`*`,</a> `*l[mu]*`, `)*n[mu]*`, `*m[mu]*`, `)*conjugate(m[mu])

 

_______________________________________________________

(2)

Working with Cartesian coordinates,

Coordinates(cartesian)

`Systems of spacetime coordinates are:`*{X = (x, y, z, t)}

 

{X}

(3)

the Gödel line element is

 

ds^2 = d_(t)^2-d_(x)^2-d_(y)^2+(1/2)*exp(2*q*y)*d_(z)^2+2*exp(q*y)*d_(z)*d_(t)

ds^2 = Physics:-d_(t)^2-Physics:-d_(x)^2-Physics:-d_(y)^2+(1/2)*exp(2*q*y)*Physics:-d_(z)^2+2*exp(q*y)*Physics:-d_(z)*Physics:-d_(t)

(4)

Setting the metric

Setup(metric = rhs(ds^2 = Physics[d_](t)^2-Physics[d_](x)^2-Physics[d_](y)^2+(1/2)*exp(2*q*y)*Physics[d_](z)^2+2*exp(q*y)*Physics[d_](z)*Physics[d_](t)))

_______________________________________________________

 

`Coordinates: `*[x, y, z, t]*`. Signature: `*`- - - +`

 

_______________________________________________________

 

Physics:-g_[mu, nu] = Matrix(%id = 18446744078354506566)

 

_______________________________________________________

 

`Setting `*lowercaselatin_is*` letters to represent `*space*` indices`

 

[metric = {(1, 1) = -1, (2, 2) = -1, (3, 3) = (1/2)*exp(2*q*y), (3, 4) = exp(q*y), (4, 4) = 1}, spaceindices = lowercaselatin_is]

(5)

The problem appeared upon entering the matrix M below supposedly representing the alleged tetrad.

interface(imaginaryunit = i)

M := Matrix([[1/sqrt(2), 0, 0, 1/sqrt(2)], [-1/sqrt(2), 0, 0, 1/sqrt(2)], [0, 1/sqrt(2), -I*exp(-q*y), I], [0, 1/sqrt(2), I*exp(-q*y), -I]])

Matrix(%id = 18446744078162949534)

(6)

Each of the rows of this matrix is supposed to be one of the null vectors [l, n, m, conjugate(m)]. Before setting this alleged tetrad, Maple was asked to settle the nature of it, and the answer was that M was not a tetrad! With the Physics Updates v.857, a more detailed message was issued:

IsTetrad(M)

`Warning, the given components form a`*null*`tetrad, `*`with a contravariant spacetime index`*`, only if you change the signature from `*`- - - +`*` to `*`+ - - -`*`. 
You can do that by entering (copy and paste): `*Setup(signature = "+ - - -")

 

false

(7)

So there were actually three problems:

1. 

The entered entity was a null tetrad, while the default of the Physics package is an orthonormal tetrad. This can be seen in the form of the tetrad metric, or using the library commands:

eta_[]

Physics:-Tetrads:-eta_[a, b] = Matrix(%id = 18446744078354552462)

(8)

Library:-IsOrthonormalTetradMetric()

true

(9)

Library:-IsNullTetradMetric()

false

(10)
2. 

The matrix M would only be a tetrad if the spacetime index is contravariant. On the other hand, the command IsTetrad will return true only when M represents a tetrad with both indices covariant. For  instance, if the command IsTetrad  is issued about the tetrad automatically computed by Maple, but is passed the matrix corresponding to "`&efr;`[a]^(mu)"  with the spacetime index contravariant,  false is returned:

"e_[a,~mu, matrix]"

Physics:-Tetrads:-e_[a, `~&mu;`] = Matrix(%id = 18446744078297840926)

(11)

"IsTetrad(rhs(?))"

Typesetting[delayDotProduct](`Warning, the given components form a`*orthonormal*`tetrad only if the spacetime index is contravariant. 
You can construct a tetrad with a covariant spacetime index by entering (copy and paste): `, Matrix(4, 4, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = 1, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = sqrt(2)*exp(-q*y), (3, 4) = -sqrt(2), (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = 1}), true).rhs(g[])

 

false

(12)
3. 

The matrix M corresponds to a tetrad with different signature, (+---), instead of Maple's default (---+). Although these two signatures represent the same physics, they differ in the ordering of rows and columns: the timelike component is respectively in positions 1 and 4.

 

The issue, then, became how to correct the matrix M to be a valid tetrad: either change the setup, or change the matrix M. Below the two courses of action are provided.

 

First the simplest: change the settings. According to the message (7), setting the tetrad to be null, changing the signature to be (+---) and indicating that M represents a tetrad with its spacetime index contravariant would suffice:

Setup(tetradmetric = null, signature = "+---")

[signature = `+ - - -`, tetradmetric = {(1, 2) = 1, (3, 4) = -1}]

(13)

The null tetrad metric is now as in the reference used.

eta_[]

Physics:-Tetrads:-eta_[a, b] = Matrix(%id = 18446744078298386174)

(14)

Checking now with the spacetime index contravariant

e_[a, `~&mu;`] = M

Physics:-Tetrads:-e_[a, `~&mu;`] = Matrix(%id = 18446744078162949534)

(15)

At this point, the command IsTetrad  provided with the equation (15), where the left-hand side has the information that the spacetime index is contravariant

"IsTetrad(?)"

`Type of tetrad: `*null

 

true

(16)

Great! one can now set the tetrad M exactly as entered, without changing anything else. In the next line it will only be necessary to indicate that the spacetime index, mu, is contravariant.

Setup(e_[a, `~&mu;`] = M, quiet)

[tetrad = {(1, 1) = -(1/2)*2^(1/2), (1, 3) = (1/2)*2^(1/2)*exp(q*y), (1, 4) = (1/2)*2^(1/2), (2, 1) = (1/2)*2^(1/2), (2, 3) = (1/2)*2^(1/2)*exp(q*y), (2, 4) = (1/2)*2^(1/2), (3, 2) = -(1/2)*2^(1/2), (3, 3) = ((1/2)*I)*exp(q*y), (3, 4) = 0, (4, 2) = -(1/2)*2^(1/2), (4, 3) = -((1/2)*I)*exp(q*y), (4, 4) = 0}]

(17)

 

The tetrad is now the matrix M. In addition to checking this tetrad making use of the IsTetrad command, it is also possible to check the definitions of tetrads and null vectors using TensorArray.

e_[definition]

Physics:-Tetrads:-e_[a, `&mu;`]*Physics:-Tetrads:-e_[b, `~&mu;`] = Physics:-Tetrads:-eta_[a, b]

(18)

TensorArray(Physics:-Tetrads:-e_[a, `&mu;`]*Physics:-Tetrads:-e_[b, `~&mu;`] = Physics:-Tetrads:-eta_[a, b], simplifier = simplify)

Matrix(%id = 18446744078353048270)

(19)

For the null vectors:

l_[definition]

Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-l_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[`~mu`] = 1, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-mb_[`~mu`] = 0, Physics:-g_[mu, nu] = Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]+Physics:-Tetrads:-l_[nu]*Physics:-Tetrads:-n_[mu]-Physics:-Tetrads:-m_[mu]*Physics:-Tetrads:-mb_[nu]-Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[mu]

(20)

TensorArray([Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-l_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[`~mu`] = 1, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[`~mu`] = 0, Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-mb_[`~mu`] = 0, Physics[g_][mu, nu] = Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]+Physics:-Tetrads:-l_[nu]*Physics:-Tetrads:-n_[mu]-Physics:-Tetrads:-m_[mu]*Physics:-Tetrads:-mb_[nu]-Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[mu]], simplifier = simplify)

[0 = 0, 1 = 1, 0 = 0, 0 = 0, Matrix(%id = 18446744078414241910)]

(21)

From its Weyl scalars, this tetrad is already in the canonical form for a spacetime of Petrov type "D": only `&Psi;__2` <> 0

PetrovType()

"D"

(22)

Weyl[scalars]

psi__0 = 0, psi__1 = 0, psi__2 = -(1/6)*q^2, psi__3 = 0, psi__4 = 0

(23)

Attempting to transform it into canonicalform returns the tetrad (17) itself

TransformTetrad(canonicalform)

Matrix(%id = 18446744078396685478)

(24)

Let's now obtain the correct tetrad without changing the signature as done in (13).

Start by changing the signature back to "(- - - +)"

Setup(signature = "---+")

[signature = `- - - +`]

(25)

So again, M is not a tetrad, even if the spacetime index is specified as contravariant.

IsTetrad(e_[a, `~&mu;`] = M)

`Warning, the given components form a`*null*`tetrad, `*`with a contravariant spacetime index`*`, only if you change the signature from `*`- - - +`*` to `*`+ - - -`*`. 
You can do that by entering (copy and paste): `*Setup(signature = "+ - - -")

 

false

(26)

By construction, the tetrad M has its rows formed by the null vectors with the ordering [l, n, m, conjugate(m)]. To understand what needs to be changed in M, define those vectors, independent of the null vectors [l_, n_, m_, mb_] (with underscore) that come with the Tetrads package.

Define(l[mu], n[mu], m[mu], mb[mu], quiet)

and set their components using the matrix M taking into account that its spacetime index is contravariant, and equating the rows of M  using the ordering [l, n, m, conjugate(m)]:

`~`[`=`]([l[`~&mu;`], n[`~&mu;`], m[`~&mu;`], mb[`~&mu;`]], [seq(M[j, 1 .. 4], j = 1 .. 4)])

[l[`~&mu;`] = Vector[row](%id = 18446744078368885086), n[`~&mu;`] = Vector[row](%id = 18446744078368885206), m[`~&mu;`] = Vector[row](%id = 18446744078368885326), mb[`~&mu;`] = Vector[row](%id = 18446744078368885446)]

(27)

"Define(op(?))"

`Defined objects with tensor properties`

 

{Physics:-D_[mu], Physics:-Dgamma[mu], Physics:-Psigma[mu], Physics:-Ricci[mu, nu], Physics:-Riemann[mu, nu, alpha, beta], Physics:-Weyl[mu, nu, alpha, beta], Physics:-d_[mu], Physics:-Tetrads:-e_[a, mu], Physics:-Tetrads:-eta_[a, b], Physics:-g_[mu, nu], Physics:-gamma_[i, j], Physics:-Tetrads:-gamma_[a, b, c], l[mu], Physics:-Tetrads:-l_[mu], Physics:-Tetrads:-lambda_[a, b, c], m[mu], Physics:-Tetrads:-m_[mu], mb[mu], Physics:-Tetrads:-mb_[mu], n[mu], Physics:-Tetrads:-n_[mu], Physics:-Christoffel[mu, nu, alpha], Physics:-Einstein[mu, nu], Physics:-LeviCivita[alpha, beta, mu, nu], Physics:-SpaceTimeVector[mu](X)}

(28)

Check the covariant components of these vectors towards comparing them with the lines of the Maple's tetrad `&efr;`[a, mu]

l[], n[], m[], mb[]

l[mu] = Array(%id = 18446744078298368710), n[mu] = Array(%id = 18446744078298365214), m[mu] = Array(%id = 18446744078298359558), mb[mu] = Array(%id = 18446744078298341734)

(29)

This shows the [l_, n_, m_, mb_] null vectors (with underscore) that come with Tetrads package

e_[nullvectors]

Physics:-Tetrads:-l_[mu] = Vector[row](%id = 18446744078354520414), Physics:-Tetrads:-n_[mu] = Vector[row](%id = 18446744078354520534), Physics:-Tetrads:-m_[mu] = Vector[row](%id = 18446744078354520654), Physics:-Tetrads:-mb_[mu] = Vector[row](%id = 18446744078354520774)

(30)

So (29) computed from M is the same as (30) computed from Maple's tetrad.

But, from (30) and the form of Maple's tetrad

e_[]

Physics:-Tetrads:-e_[a, mu] = Matrix(%id = 18446744078297844182)

(31)

for the current signature

Setup(signature)

[signature = `- - - +`]

(32)

we see the ordering of the null vectors is [n, m, mb, l], not [l, n, m, mb] used in [1] with the signature (+ - - -). So the adjustment required in  M, resulting in "M^( ')", consists of reordering M's rows to be [n, m, mb, l]

`#msup(mi("M"),mrow(mo("&InvisibleTimes;"),mo("&apos;")))` := simplify(Matrix(4, map(Library:-TensorComponents, [n[mu], m[mu], mb[mu], l[mu]])))

Matrix(%id = 18446744078414243230)

(33)

IsTetrad(`#msup(mi("M"),mrow(mo("&InvisibleTimes;"),mo("&apos;")))`)

`Type of tetrad: `*null

 

true

(34)

Comparing "M^( ')" with the tetrad `&efr;`[a, mu]computed by Maple ((24) and (31), they are actually the same.

References

[1]. Rainer Burghardt, "Constructing the Godel Universe", the arxiv gr-qc/0106070 2001.

[2]. Frank Grave and Michael Buser, "Visiting the Gödel Universe",  IEEE Trans Vis Comput GRAPH, 14(6):1563-70, 2008.


 

Download Godel_universe_and_Tedrads.mw

Hello there, 

Would you please tell me how to re-write the 'PMSM_v_eq' as 'PMSM_flux_eq_desired'? My simple attempt was using the 'solve()' command, but it failed. 

Here is the worksheet:


 

restart;

PMSM_v_eq := V__alphabeta(t) = R__s * i__alphabeta(t) + L__s*diff(i__alphabeta(t), t) + diff(lambda__alphabeta(t), t);

V__alphabeta(t) = R__s*i__alphabeta(t)+L__s*(diff(i__alphabeta(t), t))+diff(lambda__alphabeta(t), t)

(1)

 

PMSM_flux_eq := solve(PMSM_v_eq, lambda__alphabeta(t));

Error, (in solve) cannot solve expressions with diff(lambda__alphabeta(t), t) for lambda__alphabeta(t)

 

PMSM_flux_eq_desired := lambda__alphabeta(t) =  int(V__alphabeta(t) - R__s * i__alphabeta(t), t) - L__s*i__alphabeta(t);

lambda__alphabeta(t) = int(V__alphabeta(t)-R__s*i__alphabeta(t), t)-L__s*i__alphabeta(t)

(2)

 


Thank you!

Download PMSM_eq.mw

Hello

I have no choice but use Grid:-Map and Grid:-Seq in my calculations due to the size of them.  Here is a very small example that is puzzling me (Perhaps I did something really silly and did not realize). 

ansa:=CodeTools:-Usage(Grid:-Map(w->CondswithOnesolutionTest(w,eqns,vars,newvars,tlim),conds5s)):

with the following result:

ansa:=set([{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}])

The same thing but now using only map

ansb:=CodeTools:-Usage(map(w->CondswithOnesolutionTest(w,eqns,vars,newvars,tlim),conds5s)):
ansb:={[{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}]}

(This is what I expected as the result).

 

Why did Grid:-Map add set to the answer?  What am I missing?  

 

Many thanks

 

Here is the problem. I start Maple 2020 on windows 10. Run a script which takes 1-2 days to complete. 

During this time, I can't use that Maple at all, since it is busy. 

I could start Maple 2019, and that runs as completely separate process. But I want to use Maple 2020 since some things in my scripts do not work on Maple 2019 that work on Maple 2020.

If I start a new instance of Maple 2020, by doing Start->Maple 2020. it does seem to start it OK, but I noticed it seems to be somehow still connected to the one running somehow.  May be they are sharing the same interface?

I can use the new instance now and open new worksheet and use it. But it seems to become very slow, as if it is sharing something with the other Maple 2020 running the long script which uses lots of resources. It is not RAM issue, I have 64 GB RAM, and there is plenty of free RAM left. 

When I close the new Maple 2020 workseet I started, I get a message asking if I want to save the worksheet that I have open from the earlier instance which is still running ! 

I say no ofcourse, as I do not want to terminate that instance, I want to keep it running until the script is completed.

My question is: Could someone may be explain exactly what happens when one starts new Maple 2020, while one is allready running? Why it seems they are sharing either the interface or something else.  How to start completely separate Maple 2020 instance on same PC while one is allready running?

With Mathematica, this issue does not happen. I can start two instances of same version on same PC, and there is nothing shared between them at all.  This does not seem to be the case with Maple.

Maple 2020.1 on windows 10.

 

sometimes solve returns solution of the form

restart;

#eqs:=.....
#sol:=solve(eqs,{v[1],v[2],v[3]});

sol:={v[1]=t,v[2]=3/2*t,v[3]=v[3]};

And wanted to remove all those that represnt arbitrary solution, which is v[3]=v[3] above.

I could do this using

remove(x->lhs(x)=rhs(x),sol);

which gives

{v[1]=t,v[2]=3/2*t};

But as an excersise, I could not figure how to do the same using subsindent (where I wanted to replace v[3]=v[3] with {} or NULL,. and also using applyrule.

Is it possible to do the same as above but using subsindent and applyrule (which is similar to patmatch)? 

I needed to make symbolic vector, as in  

my_vector:=Vector([v__1,v__2,v__3])

The problem is that, the proc called, has to create this vector on the fly, since the dimension changes on each call. So I used seq command to generate it. But seq did not work. I tried

my_vector:=Vector([seq('v__i',i=1..3)])

 

After looking more at it, It seems to have nothing to do with evaluation. If the subscript index is variable, it does not work.

 

f:=proc(v::symbol,i::posint)  
  print("i=",i);
  print("v__i=",v__i); 
  return (v__i);
end proc;

f(v,2)

One way is to use v[i] instead of v__i, and now it works:

[seq('v[i]',i=1..3)]

But since subscripted variable are supposed to be safer than indexed variable, I wanted to use v__i and not v[i].

 

Why it does not work? And is there a workaround this?  

ps. I could always do this 

V:=[seq(:-parse(cat("v__",convert(i,string))),i=1..3)]
lprint(V[1])

But this seems like a hack to me and I do not know why it should be needed.

ps. any one knows where help on "__" is in Maple? I can't find it. doing ?__ turns out nothing. I do not know under what name help on double subscript is in maple.

Maple 2020.1

dsys6 := {x(t)^2 + n*y(t)^2 = 1, diff(x(t), t, t) = -2*m*x(t), diff(y(t), t, t) = -2*m*y(t) - Pi^2, x(0) = 0, y(0) = -1, D(x)(0) = 1/10, D(y)(0) = 0}


 

# uname -a

Linux p9x79 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I use X with TWM.


When minized, the maple icon is about 1/4" diameter.  How do I change this to a larger icon?

When I type the command

sum(2^n, n=0..N)

Maple calculates it correctly. However, if I then go back to that expression and click on it to change the value of N, Maple tries to execute something before I hit enter. It won't stop unless I press the Interrupt button, and after that I have to insert some other calculation, e.g. 1+1, for it to work once again.

This happens even on completely new files and for any explicit values of N.

Why is this happening?

When Maple converts sin(x)^n to Latex, the result remain  sin(x)^n.  But in Mathematical typesetting, this is normally written as sin^n(x).   Ofcourse this is only for Latex. In Maple code this not valid.

Is it possible to change Maple's Latex to make it do this automatically? Mathematica does this automatically. Here is an example

restart;
expr:=sin(x)^3+cos(3*x)^5;              
Physics:-Latex(expr)
 
            \sin \left(x \right)^{3}+\cos \left(3 x \right)^{5}

Which when compiled gives

Compare to Latex generated by Mathematica

Which compiles to 

Which is more standard in books and papers, than Maple's version.

Both Maple's Physics:-Latex and latex() command do the same thing.

Is there a way to make it generate the improved version for latex?

Maple 2020.1

 

 

Hello

I need to detect if different expressions contain a radical. For example

aaa := X3*(alpha[2, 8]*(sqrt(X2/alpha[1, 7])*alpha[3, 8] + X1*alpha[3, 6])*X2 + X3*(alpha[2, 8] + alpha[3, 9]/2))/(X2*alpha[2, 8])

As can be noticed there is a square root in the expression.   

I have tried type(expr,sqrt) and has but to no avail. (I am not sure if I use them as they should though).   

Many thanks

 

Ed

 

Hi there.

As we all know if we multiply two polynomials f(x) and g(x) of degrees m and n respectively we get polynomial h(x)= f(x)*g(x) of degree m+n and with m+n+1 coefficients in general. Function modp1(('Multiply')(...)) doing this very well. But sometimes we don't need full resulting h(x) - just subset of monomials and subset of coefficients of h(x) - so we don't need to calculate all m+n+1 coefficients of h(x) and waste time and resources for that.

I would request some additional rework of modp1 package: by adding to modp1(('Multiply')(...)) two optional parameters - degrees of first and last calculating coefficients of h(x).

For example:

h:=modp1(Multiply(f, g,n-1,n+1), p) could calculate only monomials with n-1, n and n+1 degrees and set other monomials to zero.

Or maybe it should be new function:

h:=modp1(Multiply_Truncate(f, g,n-1,n+1), p)

 

Is it possible?

It would be great and very efficient in many tasks.

Thank you.

What is the best way to handle this?  Many times one wants to return an expression from inside a proc, which uses local symbls, back to the user (global context).

The problem is, if one tries to simplify this returned expression, adding assumptions on some of the symbols in the expression, it does not work. Since the symbol used in the assuming is global, while the symbol inside the returned expression was local to the proc.

Even though the symbols look the same on the screen, they are actually different symbols, so the simplify does not work as expected.

Here is a simple example

restart;
foo:=proc()
local x;
  return exp(2*sqrt(1/x^2)*x*ln(x)) + exp(sqrt(1/x^2)*x*ln(x)) ;
end proc;

sol:=foo();

simplify(sol) assuming x>0

The above does not work. Since the "x" in assuming x>0 is global, while the "x" in the expression was local to the proc. So even though they look same, they are different symbols.

The standard way to handle this, is to pass the "x" to be used to build the solution, from the user to the proc(), so that when the expression is returned, the "x" used will be the global one. Like this

restart;
foo:=proc(x)
  return exp(2*sqrt(1/x^2)*x*ln(x)) + exp(sqrt(1/x^2)*x*ln(x)) ;
end proc;

sol:=foo(x);

simplify(sol) assuming x>0

Now it works:

But this method is not practical all the time. Suppose the local proc wants to generate an expression with other symbols in it, that the user does not know about. Say alpha, beta, z, eta, and so on. The user does not care about having to pass every possible symbol down on each call.  

Is there a way to tell assuming, that the symbols in assumptions command, are to be taken from the expression itself, and not to be global ones?    i.e. when doing 

simplify(sol) assuming x>0

I want Maple to take that "x" in assuming to be the "x" inside the expression only, and not a global "x".  

This will make life much simpler.  I remember seeing other use of assuming where this could be done, but I can't find it yet.

edit:

This is  just one example, where returning expression with new symbol from local proc can be required sometimes.

This is similar to using constant of integrations _C1 by dsolve when it returns a solution.

But those _C1 are all predefined as system/global symbols. But there can be cases where one needs to use new symbols. 

An example is where int() timesout or it does not produce result.

In this case, instead of leaving it as is (since I need to use the result and do not want Maple to keep evaluating it in the expression it is in), so  I replace int(integrand,x) with Int( new_integrand , alpha=0...x) where new_integrand is the same as integrand but with each in it, is replaced by new symbol alpha

This symbol alpha has to be local to the proc (it was not passed down by user). 

Maple uses _Z sometimes for such a cases, which I do not like. (it looks bad in Latex)

Here is an example

foo:=proc(x)
local int_result,alpha;
local integrand:=1/ln(x^2+1);

int_result:= int(integrand,x);
if has(int_result,'int') then  #did not integrate
   int_result:=Int(subs(x=alpha,integrand),alpha=0..x);
fi;

  return int_result;
end proc:

int_result:=foo(x)

The expression returned contains symbol alpha, which is local to the proc.  Only way around this, is to have the user pass in alpha as well as x, just in case it is needed, which is not practical to do.

This is just one example of many. Another example is when doing some transformation internally (change of variables) to convert the ode from one form to another, and I need to return those intermediate results back to caller. These substitutions use local symbols.

As I said, I could have used _Z or some other system/global known symbol for this. But I do not like how this looks in Latex. And if I need another symbol for another case, I have to look for another one.  Instead, I just make my own local symbols and use them in the expression. (Except for constant of integrations, I use those _C1,_C2, etc....

 

inequal({Re(ecs1) <= c, Re(ecs2) <= c, Re(ecs3) <= c}, Dm1 = 0 .. 1, c = 0 .. 1, color = "DodgerBlue", numpoints = 8000, transparency = 0, labels = [D[m1], c], axesfont = [16, 16], labelfont = [16, 16], axes = boxed)

Hi there, 

I have this issue when I try to name my label to Dm1 I get back "VectorCalculus:-Dm1". I know that after I have the figure, I can manually change it but I have many of them and want to save them automatically, therefore it would be necessary to immediately get the right label. 

Are there any suggestions? Maybe a different way, how to write subscript?

 

Thank you for your help!

 

I solved this linear constant coefficients ode by hand, and wanted to use Maple to check my solution.

dsolve works with no problem. I wanted to check the particular solution on its own, so called DEtools:-particularsol(ode,y(x)); but was surprised it hangs.

Why would DEtools:-particularsol(ode,y(x)); hang, when dsolve gives the complete solution (including particular solutin ofcourse) right away?  It is 7th order ODE. But nothing special. Linear and constant coefficients. Since dsolve solves it right away, I expected DEtools:-particularsol to have no problem as well.

restart;
ode:=diff(y(x),x$7)-2*diff(y(x),x$6)+9*diff(y(x),x$5)-16*diff(y(x),x$4)+24*diff(y(x),x$3)-32*diff(y(x),x$2)+16*diff(y(x),x)=exp(2*x)+x*sin(x)+x^2;

dsolve(ode);  #no problem.

#this hangs. Why?
DEtools:-particularsol(ode,y(x));


 

interface(version);

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 851. The version installed in this computer is 847 created 2020, October 17, 17:3 hours Pacific Time, found in the directory C:\Users\me\maple\toolbox\2020\Physics Updates\lib\`

restart;
ode:=diff(y(x),x$7)-2*diff(y(x),x$6)+9*diff(y(x),x$5)-16*diff(y(x),x$4)+24*diff(y(x),x$3)-32*diff(y(x),x$2)+16*diff(y(x),x)=exp(2*x)+x*sin(x)+x^2;

diff(diff(diff(diff(diff(diff(diff(y(x), x), x), x), x), x), x), x)-2*(diff(diff(diff(diff(diff(diff(y(x), x), x), x), x), x), x))+9*(diff(diff(diff(diff(diff(y(x), x), x), x), x), x))-16*(diff(diff(diff(diff(y(x), x), x), x), x))+24*(diff(diff(diff(y(x), x), x), x))-32*(diff(diff(y(x), x), x))+16*(diff(y(x), x)) = exp(2*x)+x*sin(x)+x^2

#this works
sol:=dsolve(ode)

y(x) = (5/16)*x+(1/128)*exp(2*x)+(1/8)*x^2-(1/4)*exp(-(2*I)*x)*_C3-(1/4)*exp((2*I)*x)*_C3-exp(x)*_C4+(1/8)*exp(-(2*I)*x)*_C5+(1/8)*exp((2*I)*x)*_C5+((1/36)*I)*exp(-I*x)-((1/36)*I)*exp(I*x)-((67/57600)*I)*exp(-(2*I)*x)+((67/57600)*I)*exp((2*I)*x)+((1/4)*I)*exp(-(2*I)*x)*_C5*x-((1/4)*I)*exp((2*I)*x)*_C5*x+(67/28800)*x*exp((2*I)*x)+(67/28800)*x*exp(-(2*I)*x)-(1/4)*exp(-(2*I)*x)*_C6*x-(1/4)*exp((2*I)*x)*_C6*x-((1/36)*I)*exp(I*x)*x+((1/36)*I)*exp(-I*x)*x+((67/21600)*I)*exp(-(2*I)*x)*x+((1/4)*I)*exp(-(2*I)*x)*_C2+((1/8)*I)*exp(-(2*I)*x)*_C6-((67/21600)*I)*exp((2*I)*x)*x-((1/4)*I)*exp((2*I)*x)*_C2-((1/8)*I)*exp((2*I)*x)*_C6+(67/43200)*exp((2*I)*x)+(67/43200)*exp(-(2*I)*x)+(1/54)*exp(-I*x)+(1/54)*exp(I*x)+_C4*exp(x)*x+(1/48)*x^3+_C7+_C1*exp(x)

#this hangs. Why?
DEtools:-particularsol(ode,y(x));

 


 

Download particular_sol.mw

First 31 32 33 34 35 36 37 Last Page 33 of 55