## 13628 Reputation

18 years, 318 days

## Take vector products...

Hi,

Suppose a set of N vectors where there may be one of them parallel to one another: their cross product is zero. So, in Maple, for j to N-1, for k from j+1 to N, if V[j] &x V[k] = 0 then V[j] is parallel to V[k]. You can perform this loop operation either using VectorCalculus or Physics:-Vectors.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Yes...

Hi,
Yes, in Maple 17 you can do substitutions of tensors of the form you mention, taking into account free and dummy indices the same way we do when computing with paper and pencil. You need to update your Physics library with the latest one, available for download at the Maplesoft Physics: Research & Development webpage. The command you use to do these substitutions, SubstituteTensor, is currently a Physics:-Library command, part of an upcomming more general Physics:-Substitute command, to handle also tensorial subexpressions within noncommutative products similar to what algsubs and simplify/siderels do with commutative nontensorial products.

 >
 >
 (1)
 >
 (2)

The repeated and free indices of the lhs and rhs of (2)

 >
 (3)

The easy case

 >
 (4)

The free index in the target expression is not  but

 >
 (5)

Distinction between covariant and contravariant indices

 >
 (6)

The index  found repeated in the rhs of the substitution equation (2) apears also repeated in the following target expression

 >
 (7)
 >
 (8)
 >
 (9)

Substitute (2) in the rhs of (2) itself

 >
 (10)
 >
 (11)

The example you posted as a question

 >
 (12)
 >
 (13)
 >
 (14)
 >

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## DEtools[remove_RootOf]...

Hi
allvalues is the natural command to use in that - when solve can rewrite the RootOf expression free of RootOf - you will get rid of it.

There are other situations though, where you would like to understand the RootOf expression without RootOfs around, or allvalues is of no help because solve cannot rewrite the expression without them. This is a typical situation when working with differential equations. A command helpful in these cases, not so well known, is DEtools[remove_RootOf].

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Other forms of solution?...

You can try other commands of PDEtools as PolynomialSolutions, FunctionFieldSolutions and mainly InvariantSolutions combined with its optional arguments. It would also help seeing the PDE you want to solve - sometimes one can see a change of variables that helps.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Using Physics, not the old tensor....

Hi. My suggestion was for you to do these computations using the Physics package, not the old 'tensor' package. Here it is how.

 >

Example with the Schwarzschild metric in spherical coordinates: instead of using Setup (you can, but you do not need to), set the spacetime metric directly from the the metric command g_

 >
 (1)

The Kretschmann scalar is given by

 >
 (2)
 >
 (3)

The above concerns your fist post, and to see the Ricci tensor you can always

 >
 (4)

Now in your second post, however, you do not use the Physics package as suggested but the old 'tensor' package. The computations with the old 'tensor' are overly complicated and that package is by now obsolete.

My suggestion in the previous replies were computing this using Physics, it is really simpler.

Copying the metric info from the worksheet attached in your last reply and pasting here:

 >
 (5)
 >
 (6)
 >
 (7)
 >
 (8)

Noticing now that your coordinates  are the same introduced above with the Schwarzschild metric where  = t, you can now re-enter the metric in different ways, see Physics:-Setup  .For instance, to avoid disquisitions about the ordering of the coordinates, enter the metric directly as the square of the line element

 >
 >

That is all.

To compute the Kretschmann scalar for this metric, just Simplify(K) again, and no need to re-enter, re-construct or re-define the Riemann tensor or anything else.

 >

Regarding the Schwarzschild limit when  mentioned in your worksheet, this is the metric with

 >
 (9)

(If you want to see the inversse of the metric, just enter  )

This is the value of  at q = 0 :

 >
 (10)

This is the value of the K scalar when q = 0

 >
 (11)

And this is the KScalar for  (a bit of a wallpaper even after simplifying in size)

 >
 (12)

 >

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Physics package = same functionality...

Hi
Note that in Maple 16 you have the same functionality (and furthermore) within the distributed Physics package.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
Note also there is now access to the version of Physics under development, available for download at http://www.maplesoft.com/products/maple/features/physicsresearch.aspx, with adjustments and fixes as they are ready, including the one I mentioned in my previous reply for this problem you posted.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi Peter137
A fix to the problem you posted is now in place, and new: now there is access to the version of Physics under development, available for download at http://www.maplesoft.com/products/maple/features/physicsresearch.aspx. This version includes post 17.01 material, adjustments, fixes, and novelties as they are ready. In the page you can also present your suggestions, etc

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## dsolve's solution is correct...

dsolve's solution is correct:

 > ode := [diff(u(t),t)-f(t)=0, diff(f(t),t)+t*f(t)=0, diff(f(t),t\$2)+(t*sin(a)*sin(b))^2*f(t)=0];
 (1)
 > dsolve(ode);
 (2)

This simplification (see ?PDEtools/casesplit) explains dsolve's solution:

 > PDEtools:-casesplit(ode);
 (3)

You can arrive at the same result by hand. Take the first equation, and you have the solution for f(t) as a function of u(t)

 > isolate(ode[1], f(t));
 (4)

Remove now f(t) from the system

 > eval(ode, %);
 (5)

Take the second equation

 > isolate(%[2], diff(u(t),t,t));
 (6)

Substitute into the third equation

 > factor(PDEtools:-dsubs(%, %%[3]));
 (7)

So, the solution for u(t) is

 > dsolve(%);
 (8)

Then from (4) the solution for f(t) is 0.

 >

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Copy and paste works as you expect start...

The copy and paste issue you mention got resolved in Maple 16. Regarding your other question, ?algsubs and ?simplify,siderels can do what you want.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Normal ordering...

Hi

Quoting wikipedia, "In quantum field theory a product of quantum fields, or equivalently their creation and annihilation operators, is usually said to be normal ordered (also called Wick order) when all creation operators are to the left of all annihilation operators in the product.". That is what Maple does if you call Physics:-Normal, and Physics:-Expand calls Physics:-Normal, and expand calls Physics:-Expand. Hence Normal(am1*ap2) -> ap2*am1.

Besides QFT, the reason for normalizing in computer algebra is zero recognition, for example am1*ap2 - ap2*am1 does not return zero, because the normalization (it could but it) is not happening through `*`, so that you can work with them in the order you want, but then there must be a way to normalize this expression noting that it is equal to zero, and that is what you achieve with all of Normal, Expand, expand, Simplify, simplify.

All this makes sense to me.

As you say you can also program your own operators but If all you want is to expand expressions without normalizing them (ie without identifying subexpressions that are qual to zero) it may be simpler for you to program the expansion of products of sums of these operators instead of programming the operators themselves.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Yes, you can Fundiff with respect to ant...

Yes you can perform functional differentiation with anticommutative functions, or with tensor quantum operators for instance, anticommutative or not.

Now your example had some invalid input as pointed in another reply. So assuming you meant product,

 > with(Physics):
 > Setup(anticommutativeprefix = {Q});

Fix your input say taking the product of two anticommutative functions

 > G := Intc(Q2(x) * Q1(y),x,y);
 (1)
 > Fundiff(G, Q1(u));
 (2)
 >

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## There is unfortunately no solving method...

Hi

I only read your post now - note you can always send me an email through this forum. I revised now my posts of years ago in connection with an email I received today from people working in Orsay - same question. Then gave a look on the web.

I understand there is no solving method whatsoever in what this guy presented in these papers. The paper also presents a claim about a new method to solve a problem not solved before, but then does not show one single example of the method working.

Abel equations are a difficult problem. Progress happened between 1998 and 2004  (see the page ?dsolve,references) but I've seen nothing beyond what we presented there, that is mainly the AIR class and an algorithm to solve it systematically that is implemented in Maple within its dsolve command. In recent years we added some new solvable classes that are of type AIA (as explained in the papers listed in ?dsolve,references), typically one or two at each new Maple release, but that is it.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

## Maple provides support for tensor comput...

Hi

I believe the solution to your problem may be found either in the readme files of GRTensor or asking Kayl directly.

But another question brings me here: are you aware that Maple provides (native) support for computation with tensors in curved spaces? It's true that GRTensor has been a magnificent package for years. I have the impression, however, that what you find in Maple nowadays goes beyond that. The Maple Physics package has builtin commands for performing most of the computations you do in General Relativity (GR), using tensor notation in curved spacetimes, and I'd say in a more natural way than GRTensor, appart from providing functionality not available in GRTensor. And for the less standard functionality you'd eventually need, you still have Maple DifferentialGeometry package (differential forms notation), a vaste and wide range package specialized in GR among other things. The Physics and DifferentialGeometry packages share the same library of solutions to Einstein's equations (metrics, this is equivalent to loading a metric in GRTensor); in turn this library found within Maple is already noticeably larger than the library of metrics (solutions to Einstein's equations) found in GRTensor.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 First 51 52 53 54 55 56 Page 53 of 56
﻿