ecterrab

13431 Reputation

24 Badges

19 years, 362 days

MaplePrimes Activity


These are answers submitted by ecterrab

Hi Suresh

Maple R5 is from 1997 ... it does not run in current machines (not in the macs I use).

The only solution I could see to your problem is for you to update to current Maple: the latest Maple 2016 or closer - and also update the package: the old 'tensor' you are using is deprecated, not maintained since years, and its functionality superseded by both the Physics and DifferentialGeometry packages, the latter including the spinor formalism you are interested in.

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


Example with the `Schwarzschild metric`

with(Physics)

Set the metric and coordinates in one go (you could use Setup, but this is just faster)

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))

(1)

The Weyl scalars are there

Weyl[scalars]

psi__0 = 0, psi__1 = 0, psi__2 = -m/r^3, psi__3 = 0, psi__4 = 0

(2)

The definition

Weyl[scalarsdefinition]

psi__0 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-l_[alpha]*Physics:-Tetrads:-m_[beta], psi__1 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]*Physics:-Tetrads:-l_[alpha]*Physics:-Tetrads:-m_[beta], psi__2 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-m_[nu]*Physics:-Tetrads:-mb_[alpha]*Physics:-Tetrads:-n_[beta], psi__3 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-l_[mu]*Physics:-Tetrads:-n_[nu]*Physics:-Tetrads:-mb_[alpha]*Physics:-Tetrads:-n_[beta], psi__4 = -Physics:-Weyl[`~mu`, `~nu`, `~alpha`, `~beta`]*Physics:-Tetrads:-n_[mu]*Physics:-Tetrads:-mb_[nu]*Physics:-Tetrads:-n_[alpha]*Physics:-Tetrads:-mb_[beta]

(3)

Supose you change the metric, say change r in 1/r in (1)

simplify(subs(r = 1/r, g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 4) = (r-2*m)/r}, storage = triangular[upper], shape = [symmetric]))))

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

(4)

Set this as the new metric

"Setup(?)"

[metric = {(1, 1) = 1/(2*m*r-1), (2, 2) = -1/r^2, (3, 3) = -sin(theta)^2/r^2, (4, 4) = -2*m*r+1}]

(5)

The Weyl scalars for this new metric

Weyl[scalars]

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

(6)

``

For the spin formalism you may want to give a look at the DifferentialGeometry[Tensor][NPSpinCoefficients]  command


Download WeylScalars.mw

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

Hi

This question is already answered ; as explained there this issue is resolved in Maple 2016 (without further updates) and also Maple 215 (installing the update mentioned in that answer given),

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

Both the DifferentialGeometry and Physics packages have commands for computing Lie derivatives, check for instance the help pages for Physics:-LieDerivative and DifferentialGeometry:-LieDerivative.

Edgardo S. Cheb-Terrab 

Physics, Differential Equations and Mathematical Functions, Maplesoft

Dear Ogilvie
This new feature, FunctionAdvisor(plot, ...), as any other Maple feature, is part of an alive project, in this case, the one of bringing visualization to the mathematical functions.

My approach for these visualizations - plots -  was/is

  1. have in Maple 2016 all those shown in the Digital Library of Mathematical Functions (NIST-DLMF) for functions that do exist in Maple;
  2. add to that plots showing branch cuts when it is the case and are not present in 1.;
  3. add to that when appropriate for other reasons (mainly periodicity or symmetry).

For Maple 2016 we finished 1. for functions that do exist in Maple. And I am very happy with the result, a really nice step forward. Incidentally, regarding your actual question, note that there are no plots for the Heun functions in the NIST-DLMF.

Independent of that, we already started moving with 2. and 3. and, as usual, these further developments are posted every week to everybody in the Maplesoft R&D webpage for Mathematical Functions and Differential Equations, together with the updates for Physics.

In brief, then, update your library with the one available in that web page and you will see your Maple 2016 FunctionAdvisor(plot, ...) displaying plots for all the Heun functions, including the HeunPrime ones, among other new developments.

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

This issue, related to the display of products, is resolved in Maple 2016, also in the update distributed on the web for Maple 2015, available from the Maplesoft R&D Physics webpage.

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


restart; with(PDEtools)

DepVars := [u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

[u(x, t), v(x, t), r[1](t), r[2](t), s[1](t), s[2](t), p[1](t), p[2](t), alpha[1](x, t), beta[1](x, t), beta[2](x, t), delta[1](x, t), delta[2](x, t)]

(1)

alias(u = u(x, t), v = v(x, t), r[1] = r[1](t), r[2] = r[2](t), s[1] = s[1](t), s[2] = s[2](t), p[1] = p[1](t), p[2] = p[2](t), alpha[1] = alpha[1](x, t), beta[1] = beta[1](x, t), beta[2] = beta[2](x, t), delta[1] = delta[1](x, t), delta[2] = delta[2](x, t))

FA, `y'''''''`, `y''''''`, `y'''''`, `y''''`, `y'''`, `y''`, `y'`, u, v, r[1], r[2], s[1], s[2], p[1], p[2], alpha[1], beta[1], beta[2], delta[1], delta[2]

(2)

As you noticed, dcoeffs works with one variable. You can still use it in the case of many variables as follows: enclose your system between square brackets, to form a list of equations (even then there is only one of them) and remove dependent variables from denominators

map(numer, [(diff(r[1], t))*(-s[1]*u*(diff(u, x))-p[1]*((diff(u, x))*v+u*(diff(v, x)))-alpha[1]*(diff(u, x))-beta[1]*u-delta[1])/r[1]+r[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x, x))+(diff(s[1], t))*u*(diff(u, x))+s[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(u, x))+s[1]*u*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(p[1], t))*((diff(u, x))*v+u*(diff(v, x)))+p[1]*((diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))*v+(diff(u, x))*(alpha[1]*(diff(v, x))+beta[2]*v+delta[2])+(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])*(diff(v, x))+u*(diff(alpha[1]*(diff(v, x))+beta[2]*v+delta[2], x)))+(diff(alpha[1], t))*(diff(u, x))+alpha[1]*(diff(alpha[1]*(diff(u, x))+beta[1]*u+delta[1], x))+(diff(beta[1], t))*u+beta[1]*(alpha[1]*(diff(u, x))+beta[1]*u+delta[1])+diff(delta[1], t)])

[u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))]

(3)

Now initialize 'L', the list of coefficients, to be the system itself, and loop mapping dcoeffs with respect to each F in DepVars. To avoid long output, end the lop with `:`

L := [u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]]

for F in DepVars do L := map(dcoeffs, L, F) end do

This is the result

L

[1, 1, 1, 2, 1, 1, 1, -1, 1, 1, 2, 2, -1, 1, 1, 1, 1, -1, 1, 2, 1, 1, 1, 1, 2, 1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1]

(4)

Alternatively, you can convert to Jet notation and use the standard coeffs Maple command

ToJet([u*r[1]^2*(diff(diff(beta[1], x), x))+(diff(u, x))*r[1]^2*(diff(diff(alpha[1], x), x))+alpha[1]^2*r[1]*(diff(diff(u, x), x))+alpha[1]*r[1]^2*(diff(diff(diff(u, x), x), x))+beta[1]*r[1]^2*(diff(diff(u, x), x))-(diff(r[1], t))*u*beta[1]-(diff(r[1], t))*(diff(u, x))*alpha[1]+(diff(beta[1], t))*u*r[1]+(diff(alpha[1], t))*(diff(u, x))*r[1]+alpha[1]*r[1]*(diff(delta[1], x))+beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+2*(diff(u, x))*r[1]^2*(diff(beta[1], x))+2*r[1]^2*(diff(alpha[1], x))*(diff(diff(u, x), x))+r[1]^2*(diff(diff(delta[1], x), x))-(diff(r[1], t))*delta[1]+(diff(delta[1], t))*r[1]+s[1]*u*(diff(u, x))*r[1]*(diff(alpha[1], x))+s[1]*u*alpha[1]*r[1]*(diff(diff(u, x), x))+u*p[1]*v*r[1]*(diff(beta[1], x))+u*p[1]*v*r[1]*(diff(beta[2], x))+u*p[1]*(diff(v, x))*beta[1]*r[1]+u*p[1]*(diff(v, x))*r[1]*(diff(alpha[1], x))+u*p[1]*(diff(v, x))*r[1]*beta[2]+u*p[1]*alpha[1]*r[1]*(diff(diff(v, x), x))+(diff(u, x))*p[1]*v*beta[1]*r[1]+(diff(u, x))*p[1]*v*r[1]*(diff(alpha[1], x))+(diff(u, x))*p[1]*v*r[1]*beta[2]+p[1]*v*alpha[1]*r[1]*(diff(diff(u, x), x))+2*s[1]*u*(diff(u, x))*beta[1]*r[1]+2*(diff(u, x))*p[1]*(diff(v, x))*alpha[1]*r[1]+u*alpha[1]*r[1]*(diff(beta[1], x))+(diff(u, x))*p[1]*r[1]*delta[2]+(diff(u, x))*v*r[1]*(diff(p[1], t))+(diff(u, x))*alpha[1]*r[1]*(diff(alpha[1], x))+p[1]*v*r[1]*(diff(delta[1], x))+p[1]*(diff(v, x))*delta[1]*r[1]+s[1]*u^2*r[1]*(diff(beta[1], x))+s[1]*(diff(u, x))^2*alpha[1]*r[1]-(diff(r[1], t))*s[1]*u*(diff(u, x))-(diff(r[1], t))*u*p[1]*(diff(v, x))-(diff(r[1], t))*(diff(u, x))*p[1]*v+s[1]*u*r[1]*(diff(delta[1], x))+s[1]*(diff(u, x))*delta[1]*r[1]+(diff(s[1], t))*u*(diff(u, x))*r[1]+u*p[1]*r[1]*(diff(delta[2], x))+u*(diff(v, x))*r[1]*(diff(p[1], t))+2*(diff(u, x))*alpha[1]*beta[1]*r[1]][1], DepVars)

u^2*r[1]*s[1]*beta[1][x]+u*v*p[1]*r[1]*beta[1][x]+u*v*p[1]*r[1]*beta[2][x]+u*alpha[1]*p[1]*r[1]*v[x, x]+u*alpha[1]*r[1]*s[1]*u[x, x]+u*beta[1]*p[1]*r[1]*v[x]+2*u*beta[1]*r[1]*s[1]*u[x]+u*beta[2]*p[1]*r[1]*v[x]+u*p[1]*r[1]*v[x]*alpha[1][x]+u*r[1]*s[1]*u[x]*alpha[1][x]+v*alpha[1]*p[1]*r[1]*u[x, x]+v*beta[1]*p[1]*r[1]*u[x]+v*beta[2]*p[1]*r[1]*u[x]+v*p[1]*r[1]*u[x]*alpha[1][x]+2*alpha[1]*p[1]*r[1]*u[x]*v[x]+alpha[1]*r[1]*s[1]*u[x]^2+u*alpha[1]*r[1]*beta[1][x]+u*beta[1]^2*r[1]+u*p[1]*r[1]*delta[2][x]-u*p[1]*v[x]*r[1][t]+u*r[1]^2*beta[1][x, x]+u*r[1]*s[1]*delta[1][x]+u*r[1]*u[x]*s[1][t]+u*r[1]*v[x]*p[1][t]-u*s[1]*u[x]*r[1][t]+v*p[1]*r[1]*delta[1][x]-v*p[1]*u[x]*r[1][t]+v*r[1]*u[x]*p[1][t]+alpha[1]^2*r[1]*u[x, x]+2*alpha[1]*beta[1]*r[1]*u[x]+alpha[1]*r[1]^2*u[x, x, x]+alpha[1]*r[1]*u[x]*alpha[1][x]+beta[1]*r[1]^2*u[x, x]+delta[1]*p[1]*r[1]*v[x]+delta[1]*r[1]*s[1]*u[x]+delta[2]*p[1]*r[1]*u[x]+r[1]^2*u[x]*alpha[1][x, x]+2*r[1]^2*u[x]*beta[1][x]+2*r[1]^2*u[x, x]*alpha[1][x]-u*beta[1]*r[1][t]+u*r[1]*beta[1][t]+alpha[1]*r[1]*delta[1][x]-alpha[1]*u[x]*r[1][t]+beta[1]*delta[1]*r[1]+r[1]^2*delta[1][x, x]+r[1]*u[x]*alpha[1][t]-delta[1]*r[1][t]+r[1]*delta[1][t]

(5)

coeffs(beta[1]*delta[1]*r[1]+u*beta[1]^2*r[1]+r[1]^2*delta[1][x, x]-delta[1]*r[1][t]+r[1]*delta[1][t]+u*v*p[1]*r[1]*beta[1][x]+u*v*p[1]*r[1]*beta[2][x]+u*alpha[1]*p[1]*r[1]*v[x, x]+u*alpha[1]*r[1]*s[1]*u[x, x]+u*beta[1]*p[1]*r[1]*v[x]+u*beta[2]*p[1]*r[1]*v[x]+u*p[1]*r[1]*v[x]*alpha[1][x]+u*r[1]*s[1]*u[x]*alpha[1][x]+v*alpha[1]*p[1]*r[1]*u[x, x]+v*beta[1]*p[1]*r[1]*u[x]+v*beta[2]*p[1]*r[1]*u[x]+v*p[1]*r[1]*u[x]*alpha[1][x]+2*u*beta[1]*r[1]*s[1]*u[x]+2*alpha[1]*p[1]*r[1]*u[x]*v[x]-u*p[1]*v[x]*r[1][t]+u*r[1]*s[1]*delta[1][x]+u*r[1]*u[x]*s[1][t]+u*r[1]*v[x]*p[1][t]-u*s[1]*u[x]*r[1][t]+v*p[1]*r[1]*delta[1][x]-v*p[1]*u[x]*r[1][t]+v*r[1]*u[x]*p[1][t]+alpha[1]*r[1]*u[x]*alpha[1][x]+delta[1]*p[1]*r[1]*v[x]+delta[1]*r[1]*s[1]*u[x]+delta[2]*p[1]*r[1]*u[x]+2*alpha[1]*beta[1]*r[1]*u[x]+u^2*r[1]*s[1]*beta[1][x]+alpha[1]*r[1]*s[1]*u[x]^2+u*alpha[1]*r[1]*beta[1][x]+u*p[1]*r[1]*delta[2][x]+u*r[1]^2*beta[1][x, x]+alpha[1]^2*r[1]*u[x, x]+alpha[1]*r[1]^2*u[x, x, x]+beta[1]*r[1]^2*u[x, x]+r[1]^2*u[x]*alpha[1][x, x]-u*beta[1]*r[1][t]+u*r[1]*beta[1][t]+alpha[1]*r[1]*delta[1][x]-alpha[1]*u[x]*r[1][t]+r[1]*u[x]*alpha[1][t]+2*r[1]^2*u[x]*beta[1][x]+2*r[1]^2*u[x, x]*alpha[1][x])

1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 2, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, -1, 1, -1, 1, 1, 1, 1, 1

(6)

NULL


Download Coefficients_in_differential_expression_(reviewed).mw

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

Hi wgraf

First and foremost, why are you using GRTensor in Maple 18? Note please that the functionality installed in the Physics and DifferentialGeometry packages of Maple 18 - and in the case of Physics you can also updated it using the large number of improvements that went into Physics of Maple 2015 by (see the Maplesoft R&D Physics webpage) - superseed in various ways the functionality offered by GRTensor (a great package, but by now old and incomplete).

Besides that, if sqrt(5) does not terminate after you load GRTensor as you say, it can only be that some internal Maple routines are being redefined by the version of GRTensor you are loading (and this should really not be done, but as it happens with any package that is not built by Maplesoft, the company has no way to assure that people won't build a package in inappropriate ways).

In summary, why don't you post here more about the problem you are tackling using GRTensor and perhaps we can help you showing how you could do the same with the existing Maple packages mentioned above.

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

Hi

This is the same question you posted in Symmetry analysis with parameters. I am copying from there the answer to your question:


In your worksheet, you input:

parameters = A, B

parameters = A, B

(1)

What you are missing here is the order of precedence of operations. You intended one object, an equation, with left-hand side being parameters and right-hand side being A, B. But = has higher precedence than `,` so you got two objects instead of one equation,

nops([parameters = A, B])

2

(2)

Where the first and second objects are, respectively,

op(1, [parameters = A, B])

parameters = A

(3)

op(2, [parameters = A, B])

B

(4)

So how do you input what you intended? Enclosing the parameters as a set or list, for instance as follows:

parameters = {A, B}

parameters = {A, B}

(5)

nops([parameters = {A, B}])

1

(6)

op(1, [parameters = {A, B}])

parameters = {A, B}

(7)

This is explained in the help page of the commands you are using.

``

 

So, by passing the parameters as a set (enclosed within {...}) or as a list (enclosed within [...]) you can work with an unlimited number of parameters and split into cases, as shown in my first reply to Symmetry analysis with parameters, with respect to some or all of them.

 

Download parameters_as_a_set.mw

 

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


Define the Laplace operator; use simplify/size (not mandatory, but useful in cases like this)

L := proc (F) options operator, arrow; simplify(diff(r^2*(diff(F, r)), r)+(diff(sin(theta)*(diff(F, theta)), theta))/sin(theta)+(diff(F, phi, phi))/sin(theta), size) end proc

proc (F) options operator, arrow; simplify(diff(r^2*(diff(F, r)), r)+(diff(sin(theta)*(diff(F, theta)), theta))/sin(theta)+(diff(F, phi, phi))/sin(theta), size) end proc

(1)

For readability, use compact display (derivatives are displayed indexed and the function dependency ommited - check the help page for declare)

PDEtools:-declare(F(r, theta, phi))

F(r, theta, phi)*`will now be displayed as`*F

(2)

Try first Laplace operator itself on a function of r only

L(F(r))

r*((diff(diff(F(r), r), r))*r+2*(diff(F(r), r)))

(3)

The "second power" of the operator is just the composition of the operator with itself. In Maple, the composition operator is @ (check its help page)

L__2 := `@`(L, L)

L@@2

(4)

L__2(F(r, theta, phi))

(sin(theta)^3*(diff(diff(diff(diff(F(r, theta, phi), theta), theta), theta), theta))+2*(diff(diff(diff(diff(F(r, theta, phi), phi), phi), theta), theta))*sin(theta)^2+sin(theta)*(diff(diff(diff(diff(F(r, theta, phi), phi), phi), phi), phi))+2*r^2*(diff(diff(diff(diff(F(r, theta, phi), r), r), theta), theta))*sin(theta)^3+2*sin(theta)^2*(diff(diff(diff(diff(F(r, theta, phi), phi), phi), r), r))*r^2+sin(theta)^3*(diff(diff(diff(diff(F(r, theta, phi), r), r), r), r))*r^4+2*cos(theta)*sin(theta)^2*(diff(diff(diff(F(r, theta, phi), theta), theta), theta))+4*r*(diff(diff(diff(F(r, theta, phi), r), theta), theta))*sin(theta)^3+4*sin(theta)^2*(diff(diff(diff(F(r, theta, phi), phi), phi), r))*r+2*cos(theta)*sin(theta)^2*(diff(diff(diff(F(r, theta, phi), r), r), theta))*r^2+8*sin(theta)^3*(diff(diff(diff(F(r, theta, phi), r), r), r))*r^3+(-cos(theta)^2*sin(theta)-2*sin(theta)^3)*(diff(diff(F(r, theta, phi), theta), theta))+(cos(theta)^2+sin(theta)^2)*(diff(diff(F(r, theta, phi), phi), phi))+4*cos(theta)*sin(theta)^2*(diff(diff(F(r, theta, phi), r), theta))*r+14*sin(theta)^3*(diff(diff(F(r, theta, phi), r), r))*r^2+(cos(theta)^3+cos(theta)*sin(theta)^2)*(diff(F(r, theta, phi), theta))+4*sin(theta)^3*(diff(F(r, theta, phi), r))*r)/sin(theta)^3

(5)

You can also use the repeated composition operator, for instance to compose more than twice:

L__3 := L@@3

L@@3

(6)

L__3(F(phi))

(sin(theta)^2*(diff(diff(diff(diff(diff(diff(F(phi), phi), phi), phi), phi), phi), phi))+(5*cos(theta)^2*sin(theta)+3*sin(theta)^3)*(diff(diff(diff(diff(F(phi), phi), phi), phi), phi))+(9*cos(theta)^4+12*cos(theta)^2*sin(theta)^2+3*sin(theta)^4)*(diff(diff(F(phi), phi), phi)))/sin(theta)^5

(7)

``


Download powers_of_operators.mw

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

Hi

The PDEtools:-dcoeffs command is probably what you are looking for. 

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

Hi zia,

Your question "Plot Heun in Maple" from October 24 is the same as this one now on "How to plot HeunTprime in Maple": you are entering your expressions using the (default) 2D input mode, which in my opinion works well for most things and is nicer than 1D, but for this "Smart Operators" (default is "checked") which keeps putting invisible multiplication operators between ][ and )( and that ends corrupting your input without you perceiving. So it is not you but this Smart Operators default. You can change that in "Maple -> Preferences -> Interface -> Smart operators", just uncheck it then click "Apply Global", and you will never have this problem again; i.e in your example in this post your [7.6613, 8.0102, 8.1790][1] will become 7.6613 instead of the nonsensical [7.6613, 8.0102, 8.1790]*[1].

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

Hi

Unfortunately, you use the MTM package and it redefines the 'dsolve' command in a way that it stops working properly. You do that after equation (2) of your worksheet.

So first you need to undo that redefinition (or otherwise do not load MTM). You can undo this wrong redefinition as shown in the reviewed worksheet (linked at the end) entering uprotect(dsolve): dsolve := eval(:-dsolve); protect(dsolve);

After doing that there is still another source of error interruption in your formulation: some letters x1... x10 depend on t, as in x10(t), others do not, as x8, and some appear both with and without dependency at the same time, in the system sys1, that you want to solve - that is not correct syntax. So second you need to revise who depends on t and who doesn't. In the reviewed worksheet linked at the end of this answer I made x9 and x10 depend on t always (as oppposed to some times yes and some other times no), but left x8 untouched for instance. In this way you can run dsolve without error interruptions. But then the output is "NULL" meaning the algorithms installed cannot solve this problem.

In summary: the question you mentioned in this post (what is the source of the error interruption) is resolved (the MTM issue) but you need to revise your formulation anyway in order to tell whether the system is or not solvable by Maple's dsolve.

M_(reviewed).mw

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

Hi

I enhanced one bit the design of the types in Physics so that from now on there are no more error interruptions in type commutative, anticommutative or noncommutative. So, the error interruptiion you noticed doesn't happen anymore. In order to install the new version you need to update your Physics.mla library with the one distributed on the Maplesoft R&D Physics webpage.

Independent of that, there is an issue with the generation of Matlab code: after equation (26), within the double loop seen in your worksheet, the code interrupts as shown below, but this has not to do with Physics and only with the way you are formulating your problem, I think. Note as well that in the worksheet you posted, from Physics, you only use diff and `.`, so you could as well, instead of "with(Physics)", use "with(Physics, diff, `.`)".

transverse_linearization_(reviewed).mw

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

The idea of providing these updates literally around the clock is relatively new. So there are updates only for Maple 17 and ahead till the current Maple 2015. By the way the update covers not only Physics, but also the Differential Equations and Mathematical Functions libraries.

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

First 34 35 36 37 38 39 40 Last Page 36 of 55