John Fredsted

2238 Reputation

15 Badges

19 years, 132 days

MaplePrimes Activity


These are replies submitted by John Fredsted

Perhaps, but I do not know of any other. If anybody else has a better method, I would of course be delighted to hear about it.

There is, however, the following point to be made: If your code was moved to an external file, using some (text) editor, and read into Maple using the read command, say, then it would be possible to use just a single pair of (* ... *) to comment out (arbitrarily) large sections of code. But perhaps this is relevant only if the entire worksheet is moved, and not just some section or subsection, say, as otherwise the worksheet would plausibly appear a bit 'fragmented'.

An example:

(*
for i from 1 to 10 do
   i
end do;
*)

Perhaps I should have mentioned that these 'brackets' must be applied to each execution group separately; they cannot span two or more execution groups. So if your code in the subsection is divided over several execution groups, you will, unfortunately, have to apply these brackets several times. Still, though, it should be easier/faster than having to apply a hash, #, to each code line in the subsection.

@Carl Love: Thumbs up.

@Kitonum: You are absolutely right. My procedure fails if n contains only a single prime power.

@Inacio Aprendanet: Happy to hear that. I agree, work cannot stop on grounds of such an oddity :-).

@Inacio Aprendanet: Please let me know (I am curious), by posting here, if you figure out what is wrong with this first term. I wonder if there is some property of the phi-function that makes this happen but, as already said, have no clue as to what it might be.

Update: See my Answer-post below.

This is indeed an interesting question. The only thing I have been able to do by now is to locate where, more precisely, in your expression (4.3) the error originates. It would seem to originate from the first term, i.e., the phi-term, as executing the following code will show:

eval(op(1,(4.3)),beta = 2);
eval(op(2,(4.3)),beta = 2);
eval(op(3,(4.3)),beta = 2);
eval(op(4,(4.3)),beta = 2);
eval(op(5,(4.3)),beta = 2);

Why that is so I have presently no clue.

@asa12: You are absolutely right. I realized this shortcoming myself this morning before turning on my computer. The procedure above works only if at each level of nesting there is no more than one function among the arguments; if there are two or more, it fails. The following update should remedy that:

getParams := proc(expr::function)
   local s,r;
   s,r := selectremove(type,[op(expr)],function);
   if s <> [] then map(getParams,s)[],r[] else r[] end if
end proc:

@Umbra: You are welcome.

@Umbra: A 5D metric may be created as follows:

Setup(
   mathematicalnotation = true,
   dimension = 5,
   coordinatesystems = {X = [t,r,theta,phi,y]},
   metric = -(1-2*m/r)*dt^2 + 1/(1-2*m/r)*dr^2
            +r^2*dtheta^2 + r^2*sin(theta)^2*dphi^2 + r^2*dy^2
);

where I have just added r^2*dy^2 to the Schwarzschild metric, the front factor r^2 of dy^2 being arbitrarily chosen to yield some nontrivial embedding of the Schwarzschild spacetime into 5D spacetime. The Kretschmann scalar is now given by

Simplify(Riemann[mu,nu,rho,sigma]*Riemann[mu,nu,rho,sigma]);

@Markiyan Hirnyk: I am surprised by the error raised by Maple, as the wedge product is a mathematically completely legitimate one, although identically zero.

@DGromov: Happy to hear that.

How big is the matrix? Which columns are fixed? Could you provide an explicit example?

@Lhunatic: Happy to hear that.

Please upload some code, using the big green arrow in the text editor, so that we have something concrete to work with.

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