Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

20 years, 337 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

Maple Application Center

I received my Ph.D. from the University of Pennsylvania in 1998 and I have been teaching since then at SUNY Oneonta for 1 year, at Shepherd University for 5 years, at Tennessee Tech for 2 years, at Lane College for 1 year, and this year I taught at the University of Massachusetts Lowell. My research interests include Representation Theory and Combinatorics.

MaplePrimes Activity


These are replies submitted by Alec Mihailovs

You, probably, know that the harmonic series 1+1/2+1/3+1/4+... diverges even if the terms 1/n approach 0 when n approaches infinity, and are decreasing. Multiplying it by a non-zero constant doesn't change that - the series is still divergent.

On the other hand, series sum(1/n^p, n=1..infinity) with p>1 are convergent. From here, if a series term is c/n+O(1/n^p) with p>1 and non-zero c, the series is divergent, and if the series term is O(1/n^p) with p>1, the series is convergent. Now,

asympt((1+1/n)^(n+a)-exp(1),n,3);

                     exp(1) (- 1/2 + a)      1
                     ------------------ + O(----)
                             n                2
                                             n

From here, the series with such terms diverges for a not equal to 1/2 and converges for a=1/2.

Alec

You, probably, know that the harmonic series 1+1/2+1/3+1/4+... diverges even if the terms 1/n approach 0 when n approaches infinity, and are decreasing. Multiplying it by a non-zero constant doesn't change that - the series is still divergent.

On the other hand, series sum(1/n^p, n=1..infinity) with p>1 are convergent. From here, if a series term is c/n+O(1/n^p) with p>1 and non-zero c, the series is divergent, and if the series term is O(1/n^p) with p>1, the series is convergent. Now,

asympt((1+1/n)^(n+a)-exp(1),n,3);

                     exp(1) (- 1/2 + a)      1
                     ------------------ + O(----)
                             n                2
                                             n

From here, the series with such terms diverges for a not equal to 1/2 and converges for a=1/2.

Alec

Just found it in the Efficiency help page - 3 different versions. It is named FACT there.

Alec

Just found it in the Efficiency help page - 3 different versions. It is named FACT there.

Alec

It should be 1 for n=0 and 1*2*3*...*n for positive integer n.

I saw such a procedure somewhere in the guides that come with Maple (actually, several versions of it.) I think, it can be found in the help pages, too.

Here are the most simple solutions avoiding !:

f:=factorial:

f:=GAMMA@curry(`+`,1);

f:=n->GAMMA(n+1);

f:=n->mul(i,i=1..n);

Alec

It should be 1 for n=0 and 1*2*3*...*n for positive integer n.

I saw such a procedure somewhere in the guides that come with Maple (actually, several versions of it.) I think, it can be found in the help pages, too.

Here are the most simple solutions avoiding !:

f:=factorial:

f:=GAMMA@curry(`+`,1);

f:=n->GAMMA(n+1);

f:=n->mul(i,i=1..n);

Alec

With modp, that can be done as

remove(i->convert(modp~(i,[2,3,7]),`*`)=0,[$1..100]);

  [1, 5, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59,

        61, 65, 67, 71, 73, 79, 83, 85, 89, 95, 97]

The Eratosthenes sieve (well, not exactly, but a kind of) solution can be done as

{seq(1..100)} minus {seq(seq(i..100,i),i=[2,3,7])};

  {1, 5, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59,

        61, 65, 67, 71, 73, 79, 83, 85, 89, 95, 97}

Alec

With modp, that can be done as

remove(i->convert(modp~(i,[2,3,7]),`*`)=0,[$1..100]);

  [1, 5, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59,

        61, 65, 67, 71, 73, 79, 83, 85, 89, 95, 97]

The Eratosthenes sieve (well, not exactly, but a kind of) solution can be done as

{seq(1..100)} minus {seq(seq(i..100,i),i=[2,3,7])};

  {1, 5, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 55, 59,

        61, 65, 67, 71, 73, 79, 83, 85, 89, 95, 97}

Alec

Maple has a gfun package with several commands for that, including guessgf. It doesn't work in this example and in another pattern thread because of the primpart component. Without the primpart it works

L:=[seq(doublefactorial(2*n+1)*4^n,n=0..5)];

              L := [1, 12, 240, 6720, 241920, 10644480]

gfun:-guessgf(L,t);

                               1
                        [--------------, egf]
                                  (3/2)
                         (1 - 8 t)

For Fibonacci numbers (in Mathematica example), it gives

gfun:-guessgf([1, 1, 2, 3, 5, 8, 13], x);

                                 1
                         [- -----------, ogf]
                                      2
                            -1 + x + x

Alec

Maple has a gfun package with several commands for that, including guessgf. It doesn't work in this example and in another pattern thread because of the primpart component. Without the primpart it works

L:=[seq(doublefactorial(2*n+1)*4^n,n=0..5)];

              L := [1, 12, 240, 6720, 241920, 10644480]

gfun:-guessgf(L,t);

                               1
                        [--------------, egf]
                                  (3/2)
                         (1 - 8 t)

For Fibonacci numbers (in Mathematica example), it gives

gfun:-guessgf([1, 1, 2, 3, 5, 8, 13], x);

                                 1
                         [- -----------, ogf]
                                      2
                            -1 + x + x

Alec

rect:=convert(piecewise(And(t>-1/2,t<1/2),1,0),Heaviside);

          rect := Heaviside(t + 1/2) - Heaviside(- 1/2 + t)

inttrans[fourier](rect,t,w);

                              2 sin(w/2)
                              ----------
                                  w

Alec

rect:=convert(piecewise(And(t>-1/2,t<1/2),1,0),Heaviside);

          rect := Heaviside(t + 1/2) - Heaviside(- 1/2 + t)

inttrans[fourier](rect,t,w);

                              2 sin(w/2)
                              ----------
                                  w

Alec

Hi, Stephanie,

It's good to know that the developer knows about that. Did you speak also with the reviewer(s) and tester(s)?

Alec

A bug is a bug. Whether it could be easily done, or not. If such a conversion exists (and is documented), it should work at least in such very simple examples with such basic commands as plot and piecewise. Not that many options are there in the plot command and their conversion doesn't look very complicated. Tedious, maybe, but quite simple.

Alec

But then it would work differently in older Maple versions. The following seems to be working the same everywhere,

if searchtext("worksheet",interface('version'))=0 

Alec

First 42 43 44 45 46 47 48 Last Page 44 of 180