John Fredsted

2238 Reputation

15 Badges

20 years, 167 days

MaplePrimes Activity


These are replies submitted by John Fredsted

@Lhunatic: You are welcome. Perhaps a little late, below a few improvements of the previous code:

with(Physics):
Setup(
   mathematicalnotation = true,
   dimension = 3,
   spacetimeindices = lowercaselatin,
   signature = `+`
):
Define(A[i,j] = Matrix(3,3,symbol = 'Q')):
Define(B[i,j] = Matrix(3,3,symbol = 'sigma')):
Define(Sigma[k,l] = A[k,i]*A[l,j]*B[~i,~j]):

The tensors A and B are now defined in correspondence with what you show in your image; previously, they were just left undefined. The extra line signature = `+` is necessary in order to have a positive definite metric. Without this line, some of the terms in Sigma[1,1], as well as in the other components of Sigma, would have the wrong sign.

Please upload your worksheet, or the appropiate part of it, using the big green arrow in the editor.

@umeriqbal: I am not really sure what you exactly want, but maybe the following is inspirational: Let

Theta := (m,theta) -> piecewise(m >= 0,cos(m*theta),-sin(m*theta)):
Z := (m,n) -> (theta,rho) -> N(n,m)*R(m,n,rho)*Theta(m,theta):

almost as before, now defining N and R as functions; and consider the following two codes:

1.) Looping through the various (m,n):

for m from -4 to 4 do
for n from  0 to 4 do
   print(m,n,Z(m,n)(theta,rho))
end do
end do:

2.) Collecting all the 'values' of Z(m,n) in a single Array:

values := Array(-4..4,0..4,(m,n) -> Z(m,n)(theta,rho)):
values[-3,0];   # A 'value'

@Preben Alsholm: Very interesting, thumbs up.

@taro: By the way, rereading your question, in your specific case you could, of course, use just a single 'xxx' at the 'place of departure', going first to the end of your document using Ctrl+End (no need to scroll), and then back to 'xxx' using Ctrl+Home followed by a search for 'xxx' using Ctrl+f.

@acer: Thanks for your comprehensive comment and worksheet. It clearly deserves a thumbs up which I am, unfortunately, unable to give. I think, it will take me quite some time to fully digest their content. It is obvious to me that I am still just a Maple novice :-).

Apart from the elementwise operators, which I have clearly misunderstood, as previously mentioned, there is also the map[n] constructions which I have never used for n > 2; in fact, I was not even aware of their existence, which only serves to prove, somewhat embarrasingly I guess, that I have really only skimmed the help page on map.

I have bookmarked your comment, and will return to it and its linked worksheet when I need some guidance on these matters. But please don't be surprised if I 'fool around' on these matters, nonetheless, in any future posts here on Mapleprimes.

@tomleslie: That was very informative, thanks a lot. I had clearly misunderstood the concept. It's a pitty that I can't give you a thumbs up, for your clarification certainly deserves that.

@Anyone: I find it illogical that A .~ LM should not work, as it was my impression that elementwise operators are such that the operator in question, here matrix multiplication from the left by A, is applied to each of the operands of the quantity, here LM, it is intended to act on. The operands of LM are just the two matrices, so why should that be problematic?

@Preben Alsholm: Thanks for your feedback.

@acer: Thanks for your suggestions, thumbs up, in particular for pointing out to me the use of map2, which made me (re)consult its help page. Please see, though, my above comment titled 'Illogical'.

PS: Apologies for my late reply.

@vv: Thanks for your suggestions, thumbs up, and apologies for my late reply. Please see, though, my above comment titled 'Illogical'.

@toandhsp: I can see that Kitonum has provided an answer, although his condition

if a*b*c <> 0 then ...

removes a total of 1261 triples (a,b,c), rather than just the 61 that I mentioned. If that difference matters, then you could simply augment the above condition to

if a*b <> 0 and b*c <> 0 and c*a <> 0 and a*b*c <> 0 then ...

or perhaps alternatively write

if {a*b,b*c,c*a,a*b*c} <> {0} then ...

@Lali_miani: Please forgive me, but we seem to be going around in circles. I am still missing from you a clear mathematical formulation of the problem. It is not sufficient for me to know that you want simplification of equilibrium points. Please spell out in mathematical terms what that means in terms of your presented procedures.

@Lali_miani: Looking at https://en.wikipedia.org/wiki/Equilibrium_point, I guess that what you are looking for are (x,y,z) for which the three functions vanish for any values of the other variables, mu, delta, lambda, etc.; or is it perhaps the other way around?

PS: Please use the Reply option below, rather than the Answer option above, to generate a reply to this comment of mine.

PPS: I will shut down my computer for today, and return tomorrow.

@Lali_miani: What precisely do you mean by equilibrium points? What is the mathematical definition?

First 10 11 12 13 14 15 16 Last Page 12 of 68