Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

Several factors at once could be handled by:

m:=proc()
foldl(M,1,args);
end proc:

m(I,J,K); -1

@hermitian 

Yes, it is a bit naive. For a human mind, computing for a fixed numerical dimension or a symbolic one may make  not much difference. But computers are quite stupid, if something is not programmed it will not work. It may involve different algorithms, data structures, etc. This is the case of linear algebra or tensor calculus with symbolic dimension. I think that they could be implemented in Maple, but nobody has done it, as far as I know.

@hermitian 

Yes, it is a bit naive. For a human mind, computing for a fixed numerical dimension or a symbolic one may make  not much difference. But computers are quite stupid, if something is not programmed it will not work. It may involve different algorithms, data structures, etc. This is the case of linear algebra or tensor calculus with symbolic dimension. I think that they could be implemented in Maple, but nobody has done it, as far as I know.

@Kamel Boughrara 

In Maxima, the so called control-variable is also local:

(%i2)                     for i thru 10 do display(i)
                                     i = 1
                                     i = 2
                                     i = 3
                                     i = 4
                                     i = 5
                                     i = 6
                                     i = 7
                                     i = 8
                                     i = 9
                                    i = 10
(%o2)                                done
(%i3)                                  i
(%o3)                                  i

@Kamel Boughrara 

In Maxima, the so called control-variable is also local:

(%i2)                     for i thru 10 do display(i)
                                     i = 1
                                     i = 2
                                     i = 3
                                     i = 4
                                     i = 5
                                     i = 6
                                     i = 7
                                     i = 8
                                     i = 9
                                    i = 10
(%o2)                                done
(%i3)                                  i
(%o3)                                  i

@Kamel Boughrara 

In Axiom the loop counter is local:

(1) -> for i in 1..10 repeat output(i)
 
   1
   2
   3
   4
   5
   6
   7
   8
   9
   10
                                                                   Type: Void

(2) -> i
 

   (2)  i
                                                             Type: Variable i

I prefer much more this design.

@Kamel Boughrara 

In Axiom the loop counter is local:

(1) -> for i in 1..10 repeat output(i)
 
   1
   2
   3
   4
   5
   6
   7
   8
   9
   10
                                                                   Type: Void

(2) -> i
 

   (2)  i
                                                             Type: Variable i

I prefer much more this design.

That result from Mathematica has a problem. The integral v1 does depend on Q. For simple checks see the limits for Q->0 and infinity and a sample plot:

J1:=Int((1/(2*Pi)+Q*cos(k*phi))^2/(1+ beta^2*((1/(2*Pi))+Q*cos(k*phi))^2),phi=-Pi..Pi):
value(eval(J1,Q=0)):
simplify(%);
evalf(eval(%,beta=.3));

                                2 Pi
                            -------------
                                2       2
                            4 Pi  + beta

                             0.1587929386

limit(J1,Q=infinity);
evalf(eval(%,beta=.3));

                                2 Pi
                                -----
                                    2
                                beta

                             69.81317008

K1:=eval(J1,[k=2,beta=.3]):
plot(K1,Q=0..100,0..100);

Now, for even k, Tan[k*Pi/2] vanishes, yielding 2*Pi/beta^2 for the integral, independently from Q. This is correct only in the limit Q->infinity. E.g for k=2:

In[1]:= Assuming[Q > 0 && k > 0 && beta > 0 , Integrate[(1/(2 * Pi) + Q * Cos[k * phi])^2/
(1 + beta^2 * ((1 / (2 * Pi)) + Q * Cos[k * phi])^2), {phi, -Pi, Pi}]] ;
In[2]:= %/.k->2
        2 Pi
Out[2]= -----
            2
        beta 

That result from Mathematica has a problem. The integral v1 does depend on Q. For simple checks see the limits for Q->0 and infinity and a sample plot:

J1:=Int((1/(2*Pi)+Q*cos(k*phi))^2/(1+ beta^2*((1/(2*Pi))+Q*cos(k*phi))^2),phi=-Pi..Pi):
value(eval(J1,Q=0)):
simplify(%);
evalf(eval(%,beta=.3));

                                2 Pi
                            -------------
                                2       2
                            4 Pi  + beta

                             0.1587929386

limit(J1,Q=infinity);
evalf(eval(%,beta=.3));

                                2 Pi
                                -----
                                    2
                                beta

                             69.81317008

K1:=eval(J1,[k=2,beta=.3]):
plot(K1,Q=0..100,0..100);

Now, for even k, Tan[k*Pi/2] vanishes, yielding 2*Pi/beta^2 for the integral, independently from Q. This is correct only in the limit Q->infinity. E.g for k=2:

In[1]:= Assuming[Q > 0 && k > 0 && beta > 0 , Integrate[(1/(2 * Pi) + Q * Cos[k * phi])^2/
(1 + beta^2 * ((1 / (2 * Pi)) + Q * Cos[k * phi])^2), {phi, -Pi, Pi}]] ;
In[2]:= %/.k->2
        2 Pi
Out[2]= -----
            2
        beta 

@acer For pure OS dependence, here are the timings of the same set repeated twice, but in a same machine, P4 3GHz 2GB, for 32-bit Windows XP and 32-bit Ubuntu Hardy:

        Windows XP            Ubuntu Hardy

        4.719, 4.735          0.972, 0.973

        6.953, 7.032          1.192, 1.192

        6.188, 6.203          1.160, 1.160

        8.219, 8.250          1.372, 1.370

        4.734, 4.735          0.972, 0.974

        6.671, 6.688          1.276, 1.277

        6.218, 6.219          1.240, 1.243

        8.140, 8.156          1.468, 1.469

Windows: memory used=24.1MB, alloc=2.4MB, time=52.34
Ubuntu: memory used=23.7MB, alloc=2.4MB, time=9.74

I find it remarkable that more modern hardware and Windows version does not produce any significant improvement here.

@Joe Riel Fine, but note that I have already submitted SCRs on this issue. The first one at early 2008. I would like very much this bug to be fixed as I use this browser a lot.

@Joe Riel Fine, but note that I have already submitted SCRs on this issue. The first one at early 2008. I would like very much this bug to be fixed as I use this browser a lot.

For me, the main problem of LibraryTools:-Browse is that most of the times the box in the browser window shows empty when moving up and down through the items listed in the box with the arrow heads or the vertical slider. I do not know whether this is what you mean by "clunky".

For me, the main problem of LibraryTools:-Browse is that most of the times the box in the browser window shows empty when moving up and down through the items listed in the box with the arrow heads or the vertical slider. I do not know whether this is what you mean by "clunky".

Manipulate is a strong selling point of Mathematica. So, it is a challenge for Maplesoft, I think!

First 83 84 85 86 87 88 89 Last Page 85 of 109