sursumCorda

1099 Reputation

13 Badges

2 years, 4 days

MaplePrimes Activity


These are questions asked by sursumCorda

For instance, considering the expression  ≔ exp(1+LambertW(0,x))*(exp(1)*x+log[exp(1)](sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(0,x))))

restart;
expr := exp(1+LambertW(x))*(exp(1)*x+ln(sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(x)))) assuming x >= -1/exp(1):

The following limit can be calculated directly: 

1/:-limit(expr, x = +infinity, 'left');
                               24

We can also evaluate , 

:-limit(1/expr, x = +infinity, 'left'); # MultiSeries:-limit also returns wrong result. 
                               0

However, according to plot([1/(exp(1+LambertW(x))*(exp(1)*x+ln(sqrt(2*Pi))-lnGAMMA(1/2+exp(1+LambertW(x))))), 24], x = -1/exp(1) .. +exp(Pi), 'legend' = [1/expr, 24]), the limit value 0 cannot be correct. 
So is this a bug? (And has this been fixed in the forthcoming version?)

GraphTheory:-IsReachable can be used to "determine if there is a path between two vertices", and GraphTheory:-ShortestPath can be used to "find a path between two vertices with minimum distance", but which command can be used to "enumerate all (simple) paths from one node to another" like MatLab's allpaths in Maple? 

For instance, I would like to enumerate (not simply count) at most 3483192 paths with total weights at least 45 in the graph constructed from  that begin at node 30 and end at node 29
There exists a practically ready-made procedure  (where only a limited subset of its local variable  is needed) in a previous question. Nevertheless, after waiting for a quarter of an hour, the evaluation still did not terminate and I had to abort it manually. Meanwhile, MatLab completed the same computation within one minutes: 

So, how to list those 1008252 paths (without knowing the actual total number beforehand) faster in Maple?

Note. MatLab also has a built-in function allcycles, whose efficient Maple equivalent has been proposed in How to obtain all cycles in a graph from its cycle basis - MaplePrimes, yet I cannot find an analogue to MatLab's allpaths

For instance, here is a worksheet where I have replaced 1 + 2; with 1 + 1; in advance: 
 

1+1 = 21+1 = 3

1 + 1;

2

(1)

1 + 1;

3

(2)


 

But without re-evaluations, how do I know the second input and the fourth input have been stealthily substituted?

In a Mma notebook, this can be displayed by shadowing the input label: 

But in order to detect changes, which method should be used in Maple?
(Note that I do not mean that no changes are allowed. So I don't think setting the “editable” property is a workaround.)

`lprint` is officially interpreted as “linear printing of expressions”, but in the most recent release, its output looks just like "left printing" (under the default zoom 100%), 

while in some legacy version, `lprint` printed expressions not only on the left but also on the right. 

How to render `lprint` print its arguments not only on the left half?
Although I believe that similar questions must have been asked before, I cannot find such a question. 

Code: 

lprint(_bigPi):
showstat(ellipsoid)

It seems that applyrule cannot handle variable numbers of arguments, and I cannot use something like 

applyrule(f(u::anything, v::seq(anything)) = g(v, u), [f(x, y, z), f(x, y, z, t)]);
 = 
                  [f(x, y, z), f(x, y, z, t)]

Strangely, Maple does support the identical patterns in parameter declarations: 

eval([f(x, y, z), f(x, y, z, t)], f = ((u::anything, v::seq(anything)) → g(v, u)));
 = 
                  [g(y, z, x), g(y, z, t, x)]

So the two designs do not appear coherent. Should this be regarded as a "bug" in a sense? 

Of course there is no need to use the  modifier; here it is enough to use 

evalindets([f(x,y,z),f(x,y,z,t)],'specfunc'(anything,f),w->g(op(2..(),w),op(1,w))):
use f = MakeFunction('g(args[2 .. ], args[1])') in [f(x, y, z), f(x, y, z, t)] end:
use f = unapply('g(_rest, _w)', [_w::anything]) in [f(x, y, z), f(x, y, z, t)] end:

But the problem is, why is there such inconsistency described above? 

3 4 5 6 7 8 9 Last Page 5 of 22