Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

It is a procedure. In the Standard GUI, after using 2D-input:

showstat(`index/fill`);

`index/fill` := proc(T, iniv)
local low, high, indices, ranges, i, n, nvals;
   1   ranges := [op(2,eval(T))];
   2   if nops(ranges) = nargs-2 then
   3     T[args[3 .. nargs]] := iniv;
   4     return
       end if;
   5   if not type(iniv,list) then
   6     error "initialization of arrays must be done with lists"
       end if;
   7   nvals := nops(iniv);
   8   low := op(1,ranges[nargs-1]);
   9   high := op(2,ranges[nargs-1]);
  10   n := high-low+1;
  11   if n < nvals then
  12     error "a list with %1 entries cannot be used to initialize the range %2", nvals, ranges[nargs-1]
       end if;
  13   indices := args[3 .. nargs];
  14   if nops(ranges) = nargs-1 then
  15     low := low-1;
  16     for i to nvals do
  17       T[indices,low+i] := iniv[i]
         end do
       else
  18     for i to nvals do
  19       procname(T,iniv[i],indices,i-1+op(1,ranges[nargs-1]))
         end do
       end if
end proc

It is a procedure. In the Standard GUI, after using 2D-input:

showstat(`index/fill`);

`index/fill` := proc(T, iniv)
local low, high, indices, ranges, i, n, nvals;
   1   ranges := [op(2,eval(T))];
   2   if nops(ranges) = nargs-2 then
   3     T[args[3 .. nargs]] := iniv;
   4     return
       end if;
   5   if not type(iniv,list) then
   6     error "initialization of arrays must be done with lists"
       end if;
   7   nvals := nops(iniv);
   8   low := op(1,ranges[nargs-1]);
   9   high := op(2,ranges[nargs-1]);
  10   n := high-low+1;
  11   if n < nvals then
  12     error "a list with %1 entries cannot be used to initialize the range %2", nvals, ranges[nargs-1]
       end if;
  13   indices := args[3 .. nargs];
  14   if nops(ranges) = nargs-1 then
  15     low := low-1;
  16     for i to nvals do
  17       T[indices,low+i] := iniv[i]
         end do
       else
  18     for i to nvals do
  19       procname(T,iniv[i],indices,i-1+op(1,ranges[nargs-1]))
         end do
       end if
end proc

In the CLI you can use the $include directive, see ?Preprocessor.

In Maple 14 Standard GUI you can import one worksheet into another, see ?DocumentTools,RunWorksheet.

This convert/Heaviside bug traces back to a curious routine piecewise/booltans that returns Dirac calls on equations and Heaviside calls on inequations:

`piecewise/booltans`(x=1);
                             Dirac(x - 1)

`piecewise/booltans`(x<1);
                           Heaviside(1 - x)

This convert/Heaviside bug traces back to a curious routine piecewise/booltans that returns Dirac calls on equations and Heaviside calls on inequations:

`piecewise/booltans`(x=1);
                             Dirac(x - 1)

`piecewise/booltans`(x<1);
                           Heaviside(1 - x)

I find that the main subject of the OP is the language barrier.

On the one hand, if I go to a forum designed to use a language, I would expect all the messages written in this language, except, eventually, for short phrases in another language. Otherwise it would be a mess.

On the other hand, I have received in recent years quite an ammount of messages asking questions about Maple in Spanish. I have no doubt that the authors of these messages decided to write to me because of my participation in Mapleprimes. And though I have answered these questions when possible, I have encouraged many of them to post their questions here at Mapleprimes so as to receive better answers, from users with different expertise than mine. However, they did not. And though I do not know why, I have strong evidence that the reason was the need to use the English language. And this problem of the linguistic barrier is likely to occur with Maple users with other native languages, here Chineese for the case of the OP.

So, as I see it, the option is between a smaller, monolinguistic user community, or a larger community with multiple fora in diverse languages. Certainly, some other software follow the latter model. The only drawback that I find to it is some level of fragmentation. 

@Alec Mihailovs 

Yes, almost exactly a year ago. I did noticed it, but I do prefer changing kernelopts because if I am looking at the code of a library routine, most often I want to try it and see how it works, missing its documentation.

I agree. Actually, in this thread, some procedures were posted oriented towards this target.

I would further add that now, with the Digital Library of Mathematical Functions available online, it is time for the mathematical functions area of Maple to be put in sync and build upon this wonderful resource.

I agree. Actually, in this thread, some procedures were posted oriented towards this target.

I would further add that now, with the Digital Library of Mathematical Functions available online, it is time for the mathematical functions area of Maple to be put in sync and build upon this wonderful resource.

As I have mentioned here, I have implemented a handful of rules from the Rubi project in a Maple procedure. They allow computing a class of integrals with ln in the integrand that return unevaluated with the standard integrator. This routine is called from a modified version of int/indefinite, so that the int call is made as usual.

The results of the tests are quite satisfactory so far. I am showing here three examples, two of indefinite integration and one of definite integration. I am showing also checks for these results:

int(ln(a^3*x^(u+v))^(-3/2),x);
                                                         3  (u + v) 1/2
                                          1/2        ln(a  x       )
                                      2 Pi    x erfi(------------------)
                                                                1/2
                    2 x                                  (u + v)
       - -------------------------- + ----------------------------------
             3  (u + v) 1/2                                    /  1  \
         ln(a  x       )    (u + v)                            |-----|
                                                               \u + v/
                                              3/2   3  (u + v)
                                       (u + v)    (a  x       )

diff(%,x);
                                                       %1
                                                2 exp(-----)
                 2            1                       u + v
         - ------------- + ------- + ----------------------------------
             1/2             (3/2)                              /  1  \
           %1    (u + v)   %1                                   |-----|
                                                                \u + v/
                                               1/2   3  (u + v)
                                     (u + v) %1    (a  x       )

                                       3  (u + v)
                             %1 := ln(a  x       )

simplify(%-ln(a^3*x^(u+v))^(-3/2));
                                       0


int(ln(a*x^r)^(1/2),x) assuming r<0;
                                                         r 1/2
                                         1/2       ln(a x )
                                     r Pi    x erf(-----------)
                                                         1/2
                         r 1/2                       (-r)
                 x ln(a x )    + 1/2 --------------------------
                                            1/2     r (1/r)
                                        (-r)    (a x )

diff(%,x);
                                                              r
                                                        ln(a x )
                                                  r exp(--------)
                r 1/2            r                         r
          ln(a x )    + 1/2 ----------- - 1/2 -----------------------
                                  r 1/2             r 1/2     r (1/r)
                            ln(a x )          ln(a x )    (a x )

simplify(%-ln(a*x^r)^(1/2)) assuming r<0;
                                       0

int(ln(3*x^5)^(-3/2),x=1..2,method=FTOC,continuous=true);evalf(%);
                 1/2
-2/75 (-15 ln(96)

         1/2               1/2  1/2   1/2  (4/5)      1/2       1/2
     + Pi    erfi(1/5 ln(3)    5   ) 5    3      ln(3)    ln(96)

               1/2
     + 30 ln(3)

         1/2                1/2  1/2   1/2  (4/5)      1/2       1/2    /
     - Pi    erfi(1/5 ln(96)    5   ) 5    3      ln(3)    ln(96)   )  /  (
                                                                      /

         1/2       1/2
    ln(3)    ln(96)   )

                                  0.2487698643

int(ln(3*x^5)^(-3/2),x=1..2,numeric);
                                  0.2487698645

I just note that the Maple definite integrator discontinuity checker chokes when the FTOC routines use some indefinite integrals obtained via the rules that I have implemented. However, disabling this checker with the option continuous, allows using those indefinite integrals. So, rule based definite integration will work as long as continuous indefinite integrals are produced.

On this subject of continuity, Albert Rich has told me that, in response to a discussion that we had on this issue, he has already replaced integration rules that produced discontinuous antiderivatives with continuous ones.

@acer What I have wrote, if you read it, is that I have been using tools/workbench with versions previous to Maple 14, and  it is a very useful tool, not that I like it. And the reason to use it is precisely that CodeTools:-Usage, or an equivalent documented routine, is not available for those versions. 

I find that customizations, short aliases, etc are issues of personal taste or convenience and would better go into the (personal) init file. If you need it frequently with non-networked machines, then I see no problem with putting it into a portable store (USB stick, etc).

[This thread has derailed completely, my excuses to Jacques for my share]

@acer Aren't those pieces of information currently provided by CodeTools:-Usage and CodeTools:-RealTime?

@Joe Riel The mgrep link above is pointing to this same thread. I think that it should be http://www.mapleprimes.com/posts/36687-Mgrep-A-Tool-For-Searching-Maple-Repositories.

I agree, tools/bench is a very useful tool. I have been using it for a while for versions previous to Maple 14 (?updates,Maple14,programming).

And certainly, I find some of the tools routines most useful. Their undocumented status is bad for everybody.

I find that the the introduction of the numeric option to int ?updates,Maple13,numerics goes in the current trend of setting the computation path/algorithm/method/engine as an option, in line to dsolve(...,numeric), etc (instead of using a wrapper like evalf) . Sadly, this option is somewhat hidden in the documentation. For instance, ?int,numeric goes to ?evalf,Int , but no example is shown with this new syntax.

As usual, I am missing somewhat with Jacques' CS jargon, but I see the int/Int "duality" (or also int/%int), in the context of the distinction made by Stephen M. Watt in the title of his talk: Computer Algebra vs Symbolic Computation.

[In preview, the three part help hyperlink above is not properly identified, it should be http://www.maplesoft.com/support/help/AddOns/view.aspx?path=updates/Maple13/numerics&term=updates,Maple13,numerics]

Yet, I do not see a difference/advantage wrt using unevaluation quotes:

dismantle('int(x,x)');
FUNCTION(3)
   NAME(4): int #[protected, _syslib]
   EXPSEQ(3)
      NAME(4): x
      NAME(4): x
First 97 98 99 100 101 102 103 Last Page 99 of 109