JacquesC

Prof. Jacques Carette

2401 Reputation

17 Badges

20 years, 77 days
McMaster University
Professor or university staff
Hamilton, Ontario, Canada

Social Networks and Content at Maplesoft.com

From a Maple perspective: I first started using it in 1985 (it was Maple 4.0, but I still have a Maple 3.3 manual!). Worked as a Maple tutor in 1987. Joined the company in 1991 as the sole GUI developer and wrote the first Windows version of Maple (for Windows 3.0). Founded the Math group in 1992. Worked remotely from France (still in Math, hosted by the ALGO project) from fall 1993 to summer 1996 where I did my PhD in complex dynamics in Orsay. Soon after I returned to Ontario, I became the Manager of the Math Group, which I grew from 2 people to 12 in 2.5 years. Got "promoted" into project management (for Maple 6, the last of the releases which allowed a lot of backward incompatibilities, aka the last time that design mistakes from the past were allowed to be fixed), and then moved on to an ill-fated web project (it was 1999 after all). After that, worked on coordinating the output from the (many!) research labs Maplesoft then worked with, as well as some Maple design and coding (inert form, the box model for Maplets, some aspects of MathML, context menus, a prototype compiler, and more), as well as some of the initial work on MapleNet. In 2002, an opportunity came up for a faculty position, which I took. After many years of being confronted with Maple weaknesses, I got a number of ideas of how I would go about 'doing better' -- but these ideas required a radical change of architecture, which I could not do within Maplesoft. I have been working on producing a 'better' system ever since.

MaplePrimes Activity


These are answers submitted by JacquesC

I have never heard of "coefficients of determination". What are they? Can you give an example?
Silly me, I clicked on the "MapleNet" link, and the result was quite unreadable! What on earth is Typesetting:-delayDotProduct? Why are all the proper matrices displaying as Matrix(id=34958734) instead of something sensible? I know that %T is short-form for transpose for ascii-centric input -- but what is it doing in the output? That is super ugly. And while I am ranting, what's with the italics font for user-input? Compared to the surrounding text, it looks spectacularly ugly! The old fogey way of doing this reveals the deep problem:
> eqn[1] := '(A^%T) .A' = Matrix([[1,2,3],[4,5,6],[7,8,9]]);
                                       [1    2    3]
                             %T        [           ]
                 eqn[1] := (A  ) . A = [4    5    6]
                                       [           ]
                                       [7    8    9]

> eval(eqn[1], A = Matrix(3,3,symbol=a));
Error, (in rtable/Product) invalid arguments

> lprint(eqn[1]);
A^%T*A = Matrix(3,3,{(1, 1) = 1, (1, 2) = 2, (1, 3) = 3, (2, 1) = 4, (2, 2) = 5, (2, 3) = 6, (3, 1) = 7, (3, 2) = 8, (3, 3) = 9},datatype = anything,storage = rectangular,order = Fortran_order,shape = [])
and if you squint, you'll see Maple's bug: it has "simplified" the dot-product (.) to a plain multiplication (*), which is just plain wrong.
There are many many different ways to do this. The help page is a little obscure about this option, but you can also use an Array or a Vector instead of an array. So output=Vector(50, (i -> i/10.)) will output 50 time steps, from 0.1 to 5.0 in 0.1 increments. As you can use an arbitrary function to fill the Vector, you can program the steps to be exactly as you want them.
You need to escape those < for things to display properly. In any case, the result is 0 < -1+Re(c) and 0 < 6+Re(12*c^2-19*c) which means that the real part of c has to be greater than 1 and the real part of 12*c^2-19*c has to be greater than -6. If your c is real, then you can pass the result of IsDefinite straight to solve, and you get c > (19+sqrt(73))/24 as the result.
The name of the command is 'Equal', which sits in the LinearAlgebra package. To give the long form of that name, you can use either LinearAlgebra:-Equal or LinearAlgebra[Equal]. After you do with(LinearAlgebra), its name is simply Equal (same as within a use block). :-Equal actually refers to the global Equal which, in this case, does not exists.
If you want to integrate numerically, you need to give values to all the parameters, as in
> T := 5: mu := 1.3:
> evalf(Int(sqrt(x)/(exp((x-mu)/T)+1), x = 0 .. infinity));

                             9.270205270

Your problem is not 'numerical' since it has two symbolic parameters in it.
Maple essentially uses an LU decomposition in many cases, but sometimes an SVD or a special algorithm for univariate polynomials over the integers. You can see this by perusing the following:
> interface(verboseproc=3):
> print(LinearAlgebra:-LA_Main:-Rank);

  proc(M)
local DatatypeM, DatatypeMix, i, j, localM, n, m, r, svd, v,
typeM, typeZx, dummy1, dummy2, dummy4;
option `Copyright (c) 1990 by the University of Waterloo. A\
ll rights reserved.`,
`Copyright (c) 1999 Waterloo Maple Inc. All rights reserved.`
;
    if UseHardwareFloats = 'deduced' then UseHardwareFloats
         :=
        `if`(Digits <= floor(evalhf(Digits)), true, false)
    end if;
    ASSERT(CheckArgs([args], ['Matrix']), `CheckArgs/Msg`);
    DatatypeM := rtable_options(M, 'datatype');
    if
    DatatypeM = 'anything' or DatatypeM = 'complex(anything)'
    then typeM := CheckFloat(M)
    else typeM := DatatypeM
    end if;
    m, n := op(1, M);
    if member(typeM,
    ['sfloat', 'float[8]', 'complex(sfloat)', 'complex[8]'])
    then
        userinfo(2, 'LinearAlgebra',
            `computing singular value decomposition`);
        DatatypeMix := GetResultDataType(typeM, typeM,
            UseHardwareFloats);
        if DatatypeMix = DatatypeM then localM := M
        else localM := Matrix(M, 'datatype' = DatatypeMix,
            'shape' = [rtable_indfns(M)],
            'storage' = rtable_options(M, 'storage'),
            'order' = 'Fortran_order')
        end if;
        svd := SingularValues(localM, 'output' = ['S'],
            'conjugate' = true, 'outputoptions'['U'] = [],
            'outputoptions'['S'] = [],
            'outputoptions'['Vt'] = []);
        for i to min(m, n) do
            if svd[i] = 0. then return i - 1 end if;
            if 10^(Digits - 1)*abs(svd[i]) < abs(svd[1]) then
                return i - 1
            end if
        end do;
        return min(m, n)
    elif DatatypeM = 'polynom(integer)' or
    DatatypeM = 'polynom(rational)' then
        userinfo(2, 'LinearAlgebra',
            "fraction free Gaussian elimination");
        r := LUDecomposition(M, 'method' = 'FractionFree',
            'output' = ['rank'], 'conjugate' = false,
            'inplace' = false, 'outputoptions'['P'] = [],
            'outputoptions'['L'] = [],
            'outputoptions'['U'] = [],
            'outputoptions'['U1'] = [],
            'outputoptions'['R'] = [],
            'outputoptions'['NAG'] = []);
        return r
    end if;
    if not member(DatatypeM, ['integer', 'complex(integer)',
    'realcons', 'complex(realcons)', 'rational', 'numeric',
    'extended_numeric', 'complex(numeric)', 'integer[1]',
    'integer[2]', 'integer[4]', 'integer[8]',
    'complex(extended_numeric)']) then
        v := select(type, indets(M), name)
    else v := {}
    end if;
    v := map(eval, v);
    if nops(v) = 0 and type(M, 'Matrix'(integer)) and (
    24 < min(m, n) or 5 < max(m, n) and 64000 < max(m, n)^3*
    evalf(log10(max(1,
    LinearAlgebra:-LA_Main:-Norm(M, 1, 'conjugate' = 'false'))))
    ) then
        localM := Matrix(m, n, M);
        dummy1, dummy2, r, dummy4 :=
            `FFGE/iTRANS`(localM, m, n, 1, n, 0, 1, 3)
    elif nops(v) = 1 and type(M, 'Matrix'(polynom(integer)))
    then
        userinfo(2, 'LinearAlgebra', "modular reduction for\
             univariate polynomial case");
        r := `Rank/univar`(M, m, n, v[1])
    elif type(M, 'Matrix'(polynom(rational))) then
        userinfo(2, 'LinearAlgebra',
            "fraction free Gaussian elimination");
        r := LUDecomposition(M, 'method' = 'FractionFree',
            'output' = ['rank'], 'conjugate' = false,
            'inplace' = false, 'outputoptions'['P'] = [],
            'outputoptions'['L'] = [],
            'outputoptions'['U'] = [],
            'outputoptions'['U1'] = [],
            'outputoptions'['R'] = [],
            'outputoptions'['NAG'] = [])
    else
        userinfo(2, 'LinearAlgebra', "Gaussian elimination");
        r := LUDecomposition(M,
            'method' = ':-GaussianElimination',
            'output' = ['rank'], 'conjugate' = false,
            'inplace' = false, 'outputoptions'['P'] = [],
            'outputoptions'['L'] = [],
            'outputoptions'['U'] = [],
            'outputoptions'['U1'] = [],
            'outputoptions'['R'] = [],
            'outputoptions'['NAG'] = [])
    end if;
    r
end proc
So I guess what you really need is to implement some kind of Gaussian Elimination routine in Maple.
Are you asking for a ``copy'' of what LinearAlgebra[Rank] does? What would you consider to be appropriate Maple functionality to use, and what not? I mean, are any functions in LinearAlgebra ok, or none, or???
You have not forgotten how this works, Maple has. Whatever version of Maple you are using has a bug. Your command works perfectly in Maple 10 Classic (and TTY, and older versions of Classic/TTY as well).
I believe the command you are looking for is 'roots'.
I am sorry, but I read your question 3 times, and I am still not sure what you are asking for.
When I try your commands in Maple 10, collect does what is expected. So I am wondering if you are perhaps using an older version?
Think about it: if such things were never allowed to change, even in the least bit, would Maplesoft ever be able to really improve older commands (via better algorithms, etc)? That would mean that 'old' commands would simply be frozen at some release, because even fixing a bug might introduce a change that breaks some other users' worksheet. Then the only 'progress' would be through new functionality, with older broken functionality being frozen in time. That would lead to a bloated product in no time. Minor differences like the above are the price to pay for actual improvements. And DEs is one area where Maple, for many releases in a row now, shows very steady improvements.
Maple is a dynamically typed, interpreted language -- which means that Records need to contain all this information. For example:
> dismantle( Sq[3,3] );
MODULE(4) #[record]
   EXPSEQ(4)
      NAME(5): Number
      NAME(6): Possible
      NAME(6): NumPossible
   MODDEF(10) #[record]
      EXPSEQ(2)
         NAME(6): thismodule
      EXPSEQ(1)
      EXPSEQ(2)
         NAME(5): record
      EXPSEQ(4)
         NAME(5): Number
         NAME(6): Possible
         NAME(6): NumPossible
      EXPSEQ(1)
      EXPSEQ(1)
      EXPSEQ(1)
      EXPSEQ(1)
      EXPSEQ(1)
   EXPSEQ(1)
Note that if I were to code InitializeArray, I would forgo all this imperative code and instead go with InitializeArray := proc (dim)     Array(1..dim, 1..dim, (i,j) -> Record('Number' = 0, 'Possible'=Array(1..dim, fill=true), 'NumPossible' = 9)); end proc;
First, a Maple library routine should never ever die with "too many levels of recursion", that points to a bug in the library somewhere (though not necessarily in the routine you get the error from, BTW). The reason you get the error is that your syntax is incorrect, your 6*exp^(3*t) should be 6*exp(3*t) (ie no ^). With that, Maple easily solves this as y(t) = exp(-t)*sin(5*t)*_C2+exp(-t)*cos(5*t)*_C1+6/41*exp(3*t)
First 17 18 19 20 21 22 23 Page 19 of 23