JacquesC

Prof. Jacques Carette

2401 Reputation

17 Badges

20 years, 89 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 replies submitted by JacquesC

In Ontario (where I live), being an "engineer" is a legal term and a designation that can only be used by licensed engineers. The licensing is supposed to insure that you have the background necessary for doing the work that you are doing. Part of that is that, as an engineer (civil, mechanical, even software), you 'sign' that the work done under your supervision is 'fit-for-purpose', you also get the legal liability if you are wrong. To know that you are correct, you (should?) need some mathematics, at least if your design involves anything that's not cookie-cutter. I don't see engineers not needing math. In fact, the trend is in the opposite direction: biologists, chemists and even health care professionals are using more math than ever. I have seen a demo of a piece of medical software (for treatment planning, aimed to be put out into hospitals) which uses a numerical PDE solver as part of its core components.
I have no answer for you there -- there seems to be a real dearth of choices.
As VRML is essentially obsolete, the Maple support for it is rather patchy (ie whatever was done the first time around, that's it, warts and all). If VRML is experiencing a rebirth, maybe the Maple support for it will too.
You essentially have F(xi(x,t)) in your system, where F is not polynomial but an integral -- and pdsolve can't handle that. But all is not lost! If you differentiate that last equation with respect to b, you get a nice equation:
> diff(PDE[3],b);

           /                       / 2          \
           |                       |d           |
  0 = l Lp |(2 G + lambda (v - 1)) |--- xi(b, t)|
           |                       |  2         |
           \                       \db          /

                     / 4          \\
                   2 |d           ||
         + 1/12 Y d  |--- xi(b, t)||
                     |  4         ||
                     \db          //

Putting that into your system, Maple can solve it:
> PPP := [PDE[1], PDE[2], subs(b=x, %)]:
> pdsolve(PPP);

                                       1/2   1/2
                                    2 3    %1    t
  {xi(x, t) = (%3 _C1 + %2 _C3) sin(--------------)
                                       1/2    1/2
                                    d v    rho

                                    1/2   1/2
                                 2 3    %1    t
         + (%3 _C2 + %2 _C4) cos(--------------) + _F1(t) + _F2(t) x,
                                    1/2    1/2
                                 d v    rho

                         /  /   /
                         | |   |
        delta(x, y, t) = | |   |  24 ((v/2 - 1/2) lambda + G)
                         | |   |
                         \/   /

                                             /
        //        7 v\                     \ |
        ||- 7/8 + ---| lambda + G (3/4 + v)| |
        \\         8 /                     / |
                                             \

                            1/2   1/2      1/2      1/2    1/2
                         2 3    %1    (-t Y    + x v    rho   )
        (-_C1 - _C4) cos(--------------------------------------)
                                      1/2    1/2  1/2
                                   d v    rho    Y

                               1/2   1/2      1/2      1/2    1/2
                            2 3    %1    (-t Y    + x v    rho   )
         + (-_C2 + _C3) sin(--------------------------------------)
                                         1/2    1/2  1/2
                                      d v    rho    Y

                              1/2   1/2     1/2      1/2    1/2
                           2 3    %1    (t Y    + x v    rho   )
         + (_C1 - _C4) cos(-------------------------------------)
                                       1/2    1/2  1/2
                                    d v    rho    Y

                  1/2   1/2     1/2      1/2    1/2              \
               2 3    %1    (t Y    + x v    rho   )             |
         - sin(-------------------------------------) (_C2 + _C3)|
                           1/2    1/2  1/2                       |
                        d v    rho    Y                          /

           /   2                 2                           2
          /  (d  Y rho) dt dt Y d  - 12 v (%3 _C1 + %2 _C3) y
         /

                                               1/2   1/2
                                            2 3    %1    t          2
        (G + 1/2 lambda v - 1/2 lambda) sin(--------------) - 12 v y
                                               1/2    1/2
                                            d v    rho

        (%3 _C2 + %2 _C4) (G + 1/2 lambda v - 1/2 lambda)

               1/2   1/2                              \
            2 3    %1    t       2                    |   /     2
        cos(--------------) + Y d  (_F4(x) + _F3(x) t)|  /  (Y d ),
               1/2    1/2                             | /
            d v    rho                                /

        Q(t) = 0}

  %1 := 2 G + lambda (v - 1)

               1/2   1/2
            2 3    %1    x
  %2 := cos(--------------)
                   1/2
                d Y

               1/2   1/2
            2 3    %1    x
  %3 := sin(--------------)
                   1/2
                d Y

You essentially have F(xi(x,t)) in your system, where F is not polynomial but an integral -- and pdsolve can't handle that. But all is not lost! If you differentiate that last equation with respect to b, you get a nice equation:
> diff(PDE[3],b);

           /                       / 2          \
           |                       |d           |
  0 = l Lp |(2 G + lambda (v - 1)) |--- xi(b, t)|
           |                       |  2         |
           \                       \db          /

                     / 4          \\
                   2 |d           ||
         + 1/12 Y d  |--- xi(b, t)||
                     |  4         ||
                     \db          //

Putting that into your system, Maple can solve it:
> PPP := [PDE[1], PDE[2], subs(b=x, %)]:
> pdsolve(PPP);

                                       1/2   1/2
                                    2 3    %1    t
  {xi(x, t) = (%3 _C1 + %2 _C3) sin(--------------)
                                       1/2    1/2
                                    d v    rho

                                    1/2   1/2
                                 2 3    %1    t
         + (%3 _C2 + %2 _C4) cos(--------------) + _F1(t) + _F2(t) x,
                                    1/2    1/2
                                 d v    rho

                         /  /   /
                         | |   |
        delta(x, y, t) = | |   |  24 ((v/2 - 1/2) lambda + G)
                         | |   |
                         \/   /

                                             /
        //        7 v\                     \ |
        ||- 7/8 + ---| lambda + G (3/4 + v)| |
        \\         8 /                     / |
                                             \

                            1/2   1/2      1/2      1/2    1/2
                         2 3    %1    (-t Y    + x v    rho   )
        (-_C1 - _C4) cos(--------------------------------------)
                                      1/2    1/2  1/2
                                   d v    rho    Y

                               1/2   1/2      1/2      1/2    1/2
                            2 3    %1    (-t Y    + x v    rho   )
         + (-_C2 + _C3) sin(--------------------------------------)
                                         1/2    1/2  1/2
                                      d v    rho    Y

                              1/2   1/2     1/2      1/2    1/2
                           2 3    %1    (t Y    + x v    rho   )
         + (_C1 - _C4) cos(-------------------------------------)
                                       1/2    1/2  1/2
                                    d v    rho    Y

                  1/2   1/2     1/2      1/2    1/2              \
               2 3    %1    (t Y    + x v    rho   )             |
         - sin(-------------------------------------) (_C2 + _C3)|
                           1/2    1/2  1/2                       |
                        d v    rho    Y                          /

           /   2                 2                           2
          /  (d  Y rho) dt dt Y d  - 12 v (%3 _C1 + %2 _C3) y
         /

                                               1/2   1/2
                                            2 3    %1    t          2
        (G + 1/2 lambda v - 1/2 lambda) sin(--------------) - 12 v y
                                               1/2    1/2
                                            d v    rho

        (%3 _C2 + %2 _C4) (G + 1/2 lambda v - 1/2 lambda)

               1/2   1/2                              \
            2 3    %1    t       2                    |   /     2
        cos(--------------) + Y d  (_F4(x) + _F3(x) t)|  /  (Y d ),
               1/2    1/2                             | /
            d v    rho                                /

        Q(t) = 0}

  %1 := 2 G + lambda (v - 1)

               1/2   1/2
            2 3    %1    x
  %2 := cos(--------------)
                   1/2
                d Y

               1/2   1/2
            2 3    %1    x
  %3 := sin(--------------)
                   1/2
                d Y

First, Maple has only one set of 'brackets', namely () [unlike mathematics]. The [] brackets are for list, so what you typed above is syntactically problematic. Also, it is a very very bad idea to mix exact and approximate, so that you should enter .5 as 1/2 and the other is 1/16. Next, if Q is dependent, then you need to write it as such: Q(x) or Q(x,y). Next, your third equation contains neither x nor y -- is this meant to be a boundary condition? Where should Q be evaluated at? Considering just the first two equations as defining the PDE, and assuming the most general case (Q(x,y)), then Maple gives
pde := [0 = (1/2*y^2-1/16*d^2)*Y*diff(xi(x),x, x, x, x)+
     (((2*G+lambda)*v-lambda))*diff(xi(x),x, x)+
     16*Q(x,y)^2*y*(d^2-2*y^2)/(d^4*b^2*l^2*e), 
 diff(delta(x,y),y) = y*v*diff(xi(x),x, x)];

              /  2      2 \   / 4       \
              | y      d  |   |d        |
  pde := [0 = |---- - ----| Y |--- xi(x)|
              \ 2      16 /   |  4      |
                              \dx       /

                                       / 2       \
                                       |d        |
         + ((2 G + lambda) v - lambda) |--- xi(x)|
                                       |  2      |
                                       \dx       /

                     2     2      2
           16 Q(x, y)  y (d  - 2 y )
         + -------------------------,
                   4  2  2
                  d  b  l  e

                             / 2       \
        d                    |d        |
        -- delta(x, y) = y v |--- xi(x)|]
        dy                   |  2      |
                             \dx       /

> pdsolve(pde);

  {xi(x) = _C1 x + _C2, delta(x, y) = _F1(x), Q(x, y) = 0}, {

                                       /                 /
                                       |     2      2    |
        xi(x) = xi(x), Q(x, y) = -1/16 |y (-d  + 2 y ) e |
                                       |                 |
                                       \                 \

            / 4       \        / 4       \         / 2       \
            |d        |  2     |d        |  2      |d        |
        8 Y |--- xi(x)| y  - Y |--- xi(x)| d  + 32 |--- xi(x)| v G
            |  4      |        |  4      |         |  2      |
            \dx       /        \dx       /         \dx       /

              / 2       \             / 2       \         \\1/2
              |d        |             |d        |         ||
         - 16 |--- xi(x)| lambda + 16 |--- xi(x)| v lambda||    l b
              |  2      |             |  2      |         ||
              \dx       /             \dx       /         //

         2   /       2      2
        d   /  (y (-d  + 2 y )),
           /

                               / 2       \
                           2   |d        |
        delta(x, y) = 1/2 y  v |--- xi(x)| + _F1(x)}, {xi(x) = xi(x),
                               |  2      |
                               \dx       /

                               / 2       \                          /
                           2   |d        |                          |
        delta(x, y) = 1/2 y  v |--- xi(x)| + _F1(x), Q(x, y) = 1/16 |
                               |  2      |                          |
                               \dx       /                          \

                         /    / 4       \        / 4       \
             2      2    |    |d        |  2     |d        |  2
        y (-d  + 2 y ) e |8 Y |--- xi(x)| y  - Y |--- xi(x)| d
                         |    |  4      |        |  4      |
                         \    \dx       /        \dx       /

              / 2       \          / 2       \
              |d        |          |d        |
         + 32 |--- xi(x)| v G - 16 |--- xi(x)| lambda
              |  2      |          |  2      |
              \dx       /          \dx       /

              / 2       \         \\1/2
              |d        |         ||         2   /       2      2
         + 16 |--- xi(x)| v lambda||    l b d   /  (y (-d  + 2 y ))}
              |  2      |         ||           /
              \dx       /         //
First, Maple has only one set of 'brackets', namely () [unlike mathematics]. The [] brackets are for list, so what you typed above is syntactically problematic. Also, it is a very very bad idea to mix exact and approximate, so that you should enter .5 as 1/2 and the other is 1/16. Next, if Q is dependent, then you need to write it as such: Q(x) or Q(x,y). Next, your third equation contains neither x nor y -- is this meant to be a boundary condition? Where should Q be evaluated at? Considering just the first two equations as defining the PDE, and assuming the most general case (Q(x,y)), then Maple gives
pde := [0 = (1/2*y^2-1/16*d^2)*Y*diff(xi(x),x, x, x, x)+
     (((2*G+lambda)*v-lambda))*diff(xi(x),x, x)+
     16*Q(x,y)^2*y*(d^2-2*y^2)/(d^4*b^2*l^2*e), 
 diff(delta(x,y),y) = y*v*diff(xi(x),x, x)];

              /  2      2 \   / 4       \
              | y      d  |   |d        |
  pde := [0 = |---- - ----| Y |--- xi(x)|
              \ 2      16 /   |  4      |
                              \dx       /

                                       / 2       \
                                       |d        |
         + ((2 G + lambda) v - lambda) |--- xi(x)|
                                       |  2      |
                                       \dx       /

                     2     2      2
           16 Q(x, y)  y (d  - 2 y )
         + -------------------------,
                   4  2  2
                  d  b  l  e

                             / 2       \
        d                    |d        |
        -- delta(x, y) = y v |--- xi(x)|]
        dy                   |  2      |
                             \dx       /

> pdsolve(pde);

  {xi(x) = _C1 x + _C2, delta(x, y) = _F1(x), Q(x, y) = 0}, {

                                       /                 /
                                       |     2      2    |
        xi(x) = xi(x), Q(x, y) = -1/16 |y (-d  + 2 y ) e |
                                       |                 |
                                       \                 \

            / 4       \        / 4       \         / 2       \
            |d        |  2     |d        |  2      |d        |
        8 Y |--- xi(x)| y  - Y |--- xi(x)| d  + 32 |--- xi(x)| v G
            |  4      |        |  4      |         |  2      |
            \dx       /        \dx       /         \dx       /

              / 2       \             / 2       \         \\1/2
              |d        |             |d        |         ||
         - 16 |--- xi(x)| lambda + 16 |--- xi(x)| v lambda||    l b
              |  2      |             |  2      |         ||
              \dx       /             \dx       /         //

         2   /       2      2
        d   /  (y (-d  + 2 y )),
           /

                               / 2       \
                           2   |d        |
        delta(x, y) = 1/2 y  v |--- xi(x)| + _F1(x)}, {xi(x) = xi(x),
                               |  2      |
                               \dx       /

                               / 2       \                          /
                           2   |d        |                          |
        delta(x, y) = 1/2 y  v |--- xi(x)| + _F1(x), Q(x, y) = 1/16 |
                               |  2      |                          |
                               \dx       /                          \

                         /    / 4       \        / 4       \
             2      2    |    |d        |  2     |d        |  2
        y (-d  + 2 y ) e |8 Y |--- xi(x)| y  - Y |--- xi(x)| d
                         |    |  4      |        |  4      |
                         \    \dx       /        \dx       /

              / 2       \          / 2       \
              |d        |          |d        |
         + 32 |--- xi(x)| v G - 16 |--- xi(x)| lambda
              |  2      |          |  2      |
              \dx       /          \dx       /

              / 2       \         \\1/2
              |d        |         ||         2   /       2      2
         + 16 |--- xi(x)| v lambda||    l b d   /  (y (-d  + 2 y ))}
              |  2      |         ||           /
              \dx       /         //
In this case, going until k and then computing a limit does work, because that is the definition of such a sum. And maple's limit is more powerful than sum (in some cases), and so it is not altogether suprising that this works. However note that, until very recently, Maple did not check convergence at all. Now it checks convergence but, as far as I know, does not check divergence. Part of that is indeed ``hedging'' in the sense that Alex is talking about -- sum has several notions of summability, and it does not want to commit prematurely (see the part about _EnvFormal in the help page for sum). Part of it is simply an un-implemented feature! As I have said earlier today, there is still a lot of (simple) math that Maple still does not know (or use in the right context).
In this case, going until k and then computing a limit does work, because that is the definition of such a sum. And maple's limit is more powerful than sum (in some cases), and so it is not altogether suprising that this works. However note that, until very recently, Maple did not check convergence at all. Now it checks convergence but, as far as I know, does not check divergence. Part of that is indeed ``hedging'' in the sense that Alex is talking about -- sum has several notions of summability, and it does not want to commit prematurely (see the part about _EnvFormal in the help page for sum). Part of it is simply an un-implemented feature! As I have said earlier today, there is still a lot of (simple) math that Maple still does not know (or use in the right context).
Seek some help (by posting worksheets on primes) for your work, and I am convinced that we can really help you make this work with Maple. You need to show us your model and your exact requirements, and we can show you how to turn that into efficient Maple. ``Efficient Maple'' is, unfortunately, a bit of a black art. But it is the right tool!
Seek some help (by posting worksheets on primes) for your work, and I am convinced that we can really help you make this work with Maple. You need to show us your model and your exact requirements, and we can show you how to turn that into efficient Maple. ``Efficient Maple'' is, unfortunately, a bit of a black art. But it is the right tool!
combinat was written when computers had between 1 and 8 Megs of memory. Actually PCs had less than that, but Maple was mostly written for minis at that time. And if you take a look at the "What's New" for the last 10 or so releases, you'll see very little about combinat -- in other words, it has not been (seriously) updated since it was written. This means that combinat ``works'' just fine, however, it is by no means "optimized" for current machines; if it is optimized at all, it is for working on your cell phone... [which the rest of Maple can't fit in to anymore!].
combinat was written when computers had between 1 and 8 Megs of memory. Actually PCs had less than that, but Maple was mostly written for minis at that time. And if you take a look at the "What's New" for the last 10 or so releases, you'll see very little about combinat -- in other words, it has not been (seriously) updated since it was written. This means that combinat ``works'' just fine, however, it is by no means "optimized" for current machines; if it is optimized at all, it is for working on your cell phone... [which the rest of Maple can't fit in to anymore!].
Lest you think that Maple cannot operate like Excel, you can do evalf( Statistics[CDF](Statistics[RandomVariable](Normal(0,1)), 0.2) ); The reason for splitting things up like Scott03 did is 1) with(Statistics) makes some names shorters (at the cost of poluting your namespace, which Excel does by default) 2) X := RandomVariable(Normal(0,1)); defines a random variable from one distribution (Maple has many, Excel very few) 3) the evalf is to get a numerical result. Of course, if all you *really* want is ``the same'' as what Excel does, then you can do: NORMDIST := proc(t) evalf(1/2*(1+erf(t/sqrt(2)))) end; NORMDIST(0.2); The nice thing about doing that is that the resulting code is hugely faster! [See previous posts on the slowness of Statistics]
Lest you think that Maple cannot operate like Excel, you can do evalf( Statistics[CDF](Statistics[RandomVariable](Normal(0,1)), 0.2) ); The reason for splitting things up like Scott03 did is 1) with(Statistics) makes some names shorters (at the cost of poluting your namespace, which Excel does by default) 2) X := RandomVariable(Normal(0,1)); defines a random variable from one distribution (Maple has many, Excel very few) 3) the evalf is to get a numerical result. Of course, if all you *really* want is ``the same'' as what Excel does, then you can do: NORMDIST := proc(t) evalf(1/2*(1+erf(t/sqrt(2)))) end; NORMDIST(0.2); The nice thing about doing that is that the resulting code is hugely faster! [See previous posts on the slowness of Statistics]
First 91 92 93 94 95 96 97 Last Page 93 of 119