MaplePrimes Posts

MaplePrimes Posts are for sharing your experiences, techniques and opinions about Maple, MapleSim and related products, as well as general interests in math and computing.

Latest Post
  • Latest Posts Feed
  • Perhaps you have heard the terms "ordering difference" or "session dependent" applied to results of some Maple computation. It used to get heard more often back before Maple 12, when elements of sets in Maple were ordered according to address.

     Here is a example of a cesaro sum used when a series fails to converge in the usual sense of a sum.

    sum((-1)^n*(n^(1/n)-a), n = 1 .. infinity) has a cesaro sum of 1/2*(a+2MRB constant-1).

    Proof:

    We are given that                            S=  sum((-1)^n*(n^(1/n)-a), n = 1 .. infinity) .

    Expanding the infinite series we get         S=(a-1)+(2^(1/2)-a)+(a-3^(1/3))+(4^(1/4)-a)+... .

    Collecting the a's and the surds we see that S=a-a+a-a+...+(-1+2^(1/2)-3^(1/3)+4^(1/4)...) .

    By Grandi's series  we know that             S=1/2*a+(-1+2^(1/2)-3^(1/3)+4^(1/4)...) .

    Collecting the infinite series we get        S=1/2*a+ sum((-1)^n*(n^(1/n)), n = 1 .. infinity).

    Which can be shown to be                     S=1/2*a+ sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity)-1/2 .

    Thus, by factoring out the 1/2, we get           S=1/2*(a+2 sum((-1)^n*(n^(1/n)-1), n = 1 .. infinity)-1) .

    Therefore,                                   S=1/2*(a+2MRB constant-1) .

     

    In order to give symbolic results for that familly of sums Maple shouldmake this identify an integral part of maple in future versions!

    Marvin Ray Burns

    Original investigator of the MRB constant.

    Mapleprimes page order is out. 

    Okay, I decided to dig back into the beginning of mapleprimes pages.  So one would logically think to go to the last page here on mapleprimes ... that would be page 200.  So off I went and to my surprise, nothing is in order.  I expected to find posts in a logical order from first to last at least from 2006 or so but instead I'm finding pages labelled as new as 2009 there. 

    Maybe we could have a button...

    I found this great post on Twitter today. Two fans of Maple dress up as Maple and MATLAB for halloween:

    @pastelpastel @snowangelzz Math costumes from last year! Matl... on Twitpic

    I know that lots of you are big fans of Maple, but how many of you would consider going out in public dressed as Maple?

    ____

    William Spaetzel
    MaplePrimes Administrator
    Software Developer, Maplesoft 

    Hello all,

    I have encountered a curious bug in the EigenConditionNumbers
    procedure. In particular for a pencil pencil (A,B) with B singular,
    and precision higher than hardware precision.

    The following code for Digits=40 produces a Float(undefined) rather
    than a Float(infinity) for the infinite eigenvalue, but an alpha and
    beta that will produce an infinite eigenvalue.

    Digits:=trunc(evalhf(Digits));
    A:=Matrix([[1,0],[0,2]]);
    B:=Matrix([[1,0],[0,0]]);

    Just looked at the badges pages (clicking on the corresponding tab at the top).

    88 people (including me) earned Tumbs-up badge, but only 50 people are listed there, and it says "page 1 of 1", there is no 2nd page - and unfortunately I didn't find myself there.

    Even more interesting - clicking on most earned badges - such as 1st questions etc. - there are many pages, but only the first page for every badge have people listed - all the other pages are empty.

    A couple of days ago I found out that gzread from the zlib library can be used for fast reading of binary files in Maple from the disk to memory - about 100 times faster than readbytes - something like in the following simplified example, 

    A:=Array(1..2^26,99,datatype=integer[1]):

    time(writebytes("A",A));close("A");

                                    9.360

    B:=Array(1..2^26,1,datatype=integer[1]):
    time(readbytes("A",B));close("A");

                                    8.065
    B[1],B[-1];

                                    99, 99

    myreadbytes:=proc(f)
    local gzopen, gzread, gzclose, n, p, A;
    gzopen:=define_external('gzopen',
        'path'::string,
        'mode'::string,
        'RETURN'::integer[4],
        'LIB'="zlibwapi.dll");
    gzread:=define_external('gzread',
        'file'::integer[4],
        'buf'::REF(ARRAY(datatype=integer[1])),    
        'len'::integer[4],
        'RETURN'::integer[4],
        'LIB'="zlibwapi.dll");
    gzclose:=define_external('gzclose',
        'file'::integer[4],
        'RETURN'::integer[4],
        'LIB'="zlibwapi.dll");
    n:=FileTools:-Size(f);
    A:=Array(1..n,datatype=integer[1]);
    try p:=gzopen(f,"rb");
    if gzread(p,A,n)=n
    then return A end if
    finally gzclose(p)
    end try
    end proc:
    time(assign(C=myreadbytes("A")));

                                    0.062

    C[1],C[-1];

                                    99, 99

    'time(myreadbytes("A"))'$5;


                      0.078, 0.062, 0.046, 0.046, 0.046

    E:=Array(1..2^26,2,datatype=integer[1]):
    time(ArrayTools:-Copy(A,E));

                                    0.093

    That needs some tweaking, because that works only on uncompressed files. If a file ("A" in this example) was gzipped, then the gzread would ungzip n (uncompressed) bytes in it in this example, instead of copying it into the memory - but it is not a big deal, in general.

    Does anybody know about a similar replacement for writebytes? gzwrite doesn't work for copying (it compresses the array.)

    I used the zlibwapi.dll library from http://www.winimage.com/zLibDll/index.html, it is a version of zlib 1.2.5 (written by Jean-Loup Gailly and Mark Adler) built by Gilles Vollant. The code is for a 32-bit system (Windows). That should work in 32-bit Linux after replacing that dll with standard libz.so.1, as well as on 64-bit systems after replacing integer[4] with integer[8] in most places.

    Student's t distribution is named after William Sealy Gosset's pseudonym, Student. He published using this pseudonym because his employer, the Guinness brewery in Ireland, did not allow its employees to publish scientific papers after an incident where trade secrets were disclosed. In this blog...

    The Canadian Lotto649 draws are randomized the old fashioned way, the draws are held using a Ryo-Catteau Tulipe ball machine made by a well respected French Company. The draws are video recorded in a secure studio, and broadcast live.  There is no reason to suspect that these draws might not be random, but let us look at some ways we might detect it if it were not random.

    You could look at the Lottery draws as a generator for a binary sequence as I did in my previous post, but as Robert Israel pointed out in the comments, that encoding can hide some non-random behavior (e.g. if the number 25 appeared in every draw, that encoding would not appear less random).

    Read and write English  is a strian!

        My first touch with Maple was in 1997,when I was in my undergraduate course.The software of maple was in three floppy disk.

        Since 2000,I becomes a teacher for mathematics .Now I am using it to compute the integrate,limits,etc.

    To the world you may be one person,but to one person you may be the world!

    Just a suggestion to make it easier to determine wether a question is still open or has been answered.

    I have noticed there are many questions that have not been answered throughout mapleprimes history so here I am suggesting that a small yellow circle in front of the question denote an open question and a small green circle to represent answered questions.

    Sometimes I come across unanswered questions, and it is still open but looks like it could be answered. ...

    This post is a further development of my earlier question in reply to John's post. I have implemented a basic version of the CANDECOMP/PARAFAC algorithm referred to on Wikipedia and described 

    This is not really the next part in my randomness series, but more of an aside.  I used Maple's embedded components to use the Lotto649 drawing data from my last post to create a historical lottery simulator.  Basically, you fill in your prefered numbers, and it simulates you playing the lottery in every draw since 1982.

    There are a few ways to view the source of a Maple procedure, such as by using the commands  showstat and print. And these work as usual for the exports of a module. But for procedures which are declared as local to a module these methods do not work right away since by default modules' contents are opaque.

    One way around this is to change a setting, by issuing kernelopts(opaquemodules=false) prior to attempting...

    First 120 121 122 123 124 125 126 Last Page 122 of 297