Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

@Mac Dude 

Probably, the inert add you are looking for, equivalent to Sum, is %add:

%add( i^2, i=1..5 );
value(%);
                          / 2            \
                      %add\i , i = 1 .. 5/
                               55

Actually, conditional is documented, but poorly. See ?patmatch and ?define , as well as ?examples,patmatch. Certainly, these pattern matching facilities were introduced about 15 years ago in Maple V Release 5, see ?updates,R5,symbolic , and the documentation has not improved very much since then...

Actually, conditional is documented, but poorly. See ?patmatch and ?define , as well as ?examples,patmatch. Certainly, these pattern matching facilities were introduced about 15 years ago in Maple V Release 5, see ?updates,R5,symbolic , and the documentation has not improved very much since then...

@Mac Dude 

Missing an actual example of a sum of such expressions involving elements of arrays, I do not see which is the  problem, and in particular why you would have to use Add.

I have used Maple 15.01 for the rule examples above, though probably this facility has not had any change for several years, so that it should be the same in any version during this period. As I do not see either what the problem in your version of Maple could be in not recognizing the conditional construct, an actual example showing that problem could make it more clear.

@Mac Dude 

Missing an actual example of a sum of such expressions involving elements of arrays, I do not see which is the  problem, and in particular why you would have to use Add.

I have used Maple 15.01 for the rule examples above, though probably this facility has not had any change for several years, so that it should be the same in any version during this period. As I do not see either what the problem in your version of Maple could be in not recognizing the conditional construct, an actual example showing that problem could make it more clear.

This integral is being computed by method Meijerg (i.e. no primitive/antiderivative):

J:=Int(cos(a*x)*cos(x)^(a-2), x = 0 .. (1/2)*Pi):
J1:=IntegrationTools:-Change(J, x = arccos(t), t):
Int(op(J1),method=meijerg):
value(%);
                                  0

This integral is being computed by method Meijerg (i.e. no primitive/antiderivative):

J:=Int(cos(a*x)*cos(x)^(a-2), x = 0 .. (1/2)*Pi):
J1:=IntegrationTools:-Change(J, x = arccos(t), t):
Int(op(J1),method=meijerg):
value(%);
                                  0

Certainly, expand pulls contants out of the sum, but it makes also a wide range of transformations on mathematical functions. Depending on whether you want all/part/none of them, it goes the convenience of using expand, as you need to supress explicitly all those unwanted transformations. On the other hand, the rule makes no additional transformation. Compare:

S:=Sum(a*sin(omega*t+phi),t):
expand(S);
        /-----                                                \
        | \                                                   |
      a |  )   (sin(omega t) cos(phi) + cos(omega t) sin(phi))|
        | /                                                   |
        |-----                                                |
        \  t                                                  /

applyrule(factor_sum,S);

                       /-----                   \
                       | \                      |
                     a |  )   sin(omega t + phi)|
                       | /                      |
                       |-----                   |
                       \  t                     /

Certainly, expand pulls contants out of the sum, but it makes also a wide range of transformations on mathematical functions. Depending on whether you want all/part/none of them, it goes the convenience of using expand, as you need to supress explicitly all those unwanted transformations. On the other hand, the rule makes no additional transformation. Compare:

S:=Sum(a*sin(omega*t+phi),t):
expand(S);
        /-----                                                \
        | \                                                   |
      a |  )   (sin(omega t) cos(phi) + cos(omega t) sin(phi))|
        | /                                                   |
        |-----                                                |
        \  t                                                  /

applyrule(factor_sum,S);

                       /-----                   \
                       | \                      |
                     a |  )   sin(omega t + phi)|
                       | /                      |
                       |-----                   |
                       \  t                     /

@acer 

And for text help in the CLI, disambiguation should be a must. Executing ?% yieds ?ditto, with no hint whatsoever to the inertization prefix usage. Moreover, Maple 15 shows a serious regression in this area. While Maple 14 CLI provides disambiguation information, like here:

?dalembertian
Multiple matches found:
   LinearOperators,dAlembertianSolver
   LREtools,polysols
   Slode,dAlembertian_formal_sol
   Physics,dAlembertian

Maple 15 CLI seems to have lost this capability, by showing only ?LREtools,polysols.

@acer 

And for text help in the CLI, disambiguation should be a must. Executing ?% yieds ?ditto, with no hint whatsoever to the inertization prefix usage. Moreover, Maple 15 shows a serious regression in this area. While Maple 14 CLI provides disambiguation information, like here:

?dalembertian
Multiple matches found:
   LinearOperators,dAlembertianSolver
   LREtools,polysols
   Slode,dAlembertian_formal_sol
   Physics,dAlembertian

Maple 15 CLI seems to have lost this capability, by showing only ?LREtools,polysols.

@acer 

May be that the Standard GUI could learn from the older Maple interfaces! Back in Maple V Release 2 (1992) I get already:

?scalar
Try one of the following topics:
                {type[scalar], difforms[scalar], solve[scalar]}

And this feature may well be older. Was Wikipedia's disambiguation inpired in Maple? :)

@acer 

May be that the Standard GUI could learn from the older Maple interfaces! Back in Maple V Release 2 (1992) I get already:

?scalar
Try one of the following topics:
                {type[scalar], difforms[scalar], solve[scalar]}

And this feature may well be older. Was Wikipedia's disambiguation inpired in Maple? :)

@brillet 

The remember table of Li is table based, unlike that of e.g sin, which is Cache based:

op(4,eval(Li));
                      table([0 = 0, infinity = infinity])

op(4,eval(sin));
                                         1/2
                                  Pi    2                            Pi
Cache(512, 'permanent' = [0 = 0, ---- = ----, infinity = undefined, ---- = 1,
                                  4      2                           2
                                                                      1/2
                            Pi                                 Pi    3
    -infinity = undefined, ---- = 1/2, I = sinh(1) I, Pi = 0, ---- = ----])
                            6                                  3      2

On the one hand it implies that the remember table of Li was implemented earlier. Indeed, in Maple 9.03 Li has the same remember table, while sin has none. On the other hand, the Cache based remember table gets items (by execution) of FunctionAdvisor in the temporary section:

FunctionAdvisor(sin, special_values,quiet);
                               1/2               1/2
      Pi               Pi     2          Pi     3
[sin(----) = 1/2, sin(----) = ----, sin(----) = ----, sin(infinity) = undefined,
      6                4       2         3       2
    sin(infinity I) = infinity I, [sin(Pi n) = 0, And(n::integer)],
         (2 n + 1) Pi
    [sin(------------) = -1, And(n::odd)],
              2
         (2 n + 1) Pi
    [sin(------------) = 1, And(n::even)]]
              2
op(4,eval(sin));
                                                   (2 n~ + 1) Pi
Cache(512, 'temporary' = [infinity I = infinity I, ------------- = -1,
                                                         2
                                         (2 n~ + 1) Pi
    z = sin(z), -z = -sin(z), Pi n~ = 0, ------------- = 1], 'permanent' = [
                                               2
                   1/2
            Pi    3
    0 = 0, ---- = ----, -infinity = undefined, I = sinh(1) I, Pi = 0,
            3      2
            1/2
     Pi    2      Pi                                Pi
    ---- = ----, ---- = 1/2, infinity = undefined, ---- = 1])
     4      2     6                                 2 

@brillet 

The remember table of Li is table based, unlike that of e.g sin, which is Cache based:

op(4,eval(Li));
                      table([0 = 0, infinity = infinity])

op(4,eval(sin));
                                         1/2
                                  Pi    2                            Pi
Cache(512, 'permanent' = [0 = 0, ---- = ----, infinity = undefined, ---- = 1,
                                  4      2                           2
                                                                      1/2
                            Pi                                 Pi    3
    -infinity = undefined, ---- = 1/2, I = sinh(1) I, Pi = 0, ---- = ----])
                            6                                  3      2

On the one hand it implies that the remember table of Li was implemented earlier. Indeed, in Maple 9.03 Li has the same remember table, while sin has none. On the other hand, the Cache based remember table gets items (by execution) of FunctionAdvisor in the temporary section:

FunctionAdvisor(sin, special_values,quiet);
                               1/2               1/2
      Pi               Pi     2          Pi     3
[sin(----) = 1/2, sin(----) = ----, sin(----) = ----, sin(infinity) = undefined,
      6                4       2         3       2
    sin(infinity I) = infinity I, [sin(Pi n) = 0, And(n::integer)],
         (2 n + 1) Pi
    [sin(------------) = -1, And(n::odd)],
              2
         (2 n + 1) Pi
    [sin(------------) = 1, And(n::even)]]
              2
op(4,eval(sin));
                                                   (2 n~ + 1) Pi
Cache(512, 'temporary' = [infinity I = infinity I, ------------- = -1,
                                                         2
                                         (2 n~ + 1) Pi
    z = sin(z), -z = -sin(z), Pi n~ = 0, ------------- = 1], 'permanent' = [
                                               2
                   1/2
            Pi    3
    0 = 0, ---- = ----, -infinity = undefined, I = sinh(1) I, Pi = 0,
            3      2
            1/2
     Pi    2      Pi                                Pi
    ---- = ----, ---- = 1/2, infinity = undefined, ---- = 1])
     4      2     6                                 2 
First 74 75 76 77 78 79 80 Last Page 76 of 109