Alec Mihailovs

Dr. Aleksandrs Mihailovs

4415 Reputation

20 Badges

17 years, 32 days
Mihailovs, Inc.
Owner, President, and CEO
Tyngsboro, Massachusetts, United States

Social Networks and Content at Maplesoft.com

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 answers submitted by Alec Mihailovs

One book, one community event continues this year.

Do you continue your "One Book, One Company" event this year, Paulina?

Also, it would be interesting to see somebody else's (beside mine's) comments about the Snow Crash.

_______________
Alec Mihailovs, PhD

PS Is it really a question? Shoudn't it be a post? -Alec

Something like that could be done using listdensityplot.

For example,

A:=<<1,0,0,0,0>|<0,1,2,1,0>|<0,2,1,2,0>|<0,1,2,1,0>|<0,0,0,0,1>>;

                          [1    0    0    0    0]
                          [                     ]
                          [0    1    2    1    0]
                          [                     ]
                     A := [0    2    1    2    0]
                          [                     ]
                          [0    1    2    1    0]
                          [                     ]
                          [0    0    0    0    1]

listdensityplot(A,colorstyle=HUE,range=0..3,axes=none);

_______________
Alec Mihailovs, PhD

The following also works,

sum(2*binomial(m-1, k-1)*binomial(n-1, k-1)/binomial(m+n, m)*(1+(-1)^k)/2, k = 1 .. infinity);

           GAMMA(-1 + m + n)
  ------------------------------------
  binomial(m + n, m) GAMMA(m) GAMMA(n)

           hypergeom([-m + 1, -n + 1], [1], -1)
         - ------------------------------------
                    binomial(m + n, m)

map(simplify,%);

             n m            hypergeom([-m + 1, -n + 1], [1], -1)
     -------------------- - ------------------------------------
     (-1 + m + n) (m + n)            binomial(m + n, m)

_______________
Alec Mihailovs, PhD

That could be also done using a little bit of trigonometry,

sum(2*binomial(m-1, k-1)*binomial(n-1, k-1)/binomial(m+n, m)*
(1+cos(Pi*k))/2, k = 1 .. infinity);

           GAMMA(-1 + m + n)
  ------------------------------------
  binomial(m + n, m) GAMMA(m) GAMMA(n)

           hypergeom([-m + 1, -n + 1], [1], -1)
         - ------------------------------------
                    binomial(m + n, m)

map(simplify,%);

             n m            hypergeom([-m + 1, -n + 1], [1], -1)
     -------------------- - ------------------------------------
     (-1 + m + n) (m + n)            binomial(m + n, m)

_______________
Alec Mihailovs, PhD

One can use printf. Something like that,

F:=Array(0..4,0..4):
F[..,0]:=Array([2,3,7,9,.64]):
printf("%.2f",F);
2.00 0.00 0.00 0.00 0.00
3.00 0.00 0.00 0.00 0.00
7.00 0.00 0.00 0.00 0.00
9.00 0.00 0.00 0.00 0.00
0.64 0.00 0.00 0.00 0.00

_______________
Alec Mihailovs, PhD
Maplesoft Member

One way of doing that is

f:=proc(r,k)
local primes;
uses GaussInt, plots;
primes:=(c,rad)->select(x->GInorm(x-c)<=rad^2,
    select(GIprime,[seq(seq(c+i+I*j,j=-ceil(rad)..ceil(rad)),i=-ceil(rad)..ceil(rad))]));
print(display(plottools:-circle([0,0],r,thickness=3, color=blue),map(complexplot,
    [seq(seq([i,j],j in primes(i,k)), i in primes(0,r-k))]),axes=none))
end;

It is not very fast. For example, f(100,2) took more than 1 minute.

f(10,2);

f(100,2);

f(100,sqrt(8.));

_______________
Alec Mihailovs, PhD
Maplesoft Member

Also, Student:-LinearAlgebra does these assumptions automatically,

<a,b>.<c,d>;
                              _     _
                              a c + b d

with(Student:-LinearAlgebra):
<a,b>.<c,d>;

                              a c + b d

and shape=Circulant can be used for the 2nd question,

Matrix(3,shape=Circulant[[0,1,0]]);

                               [0    1    0]
                               [           ]
                          M := [0    0    1]
                               [           ]
                               [1    0    0]

Matrix(4,shape=Circulant[[0,1,0,0]]);

                          [0    1    0    0]
                          [                ]
                          [0    0    1    0]
                          [                ]
                          [0    0    0    1]
                          [                ]
                          [1    0    0    0]

_______________
Alec Mihailovs, PhD
Maplesoft Member

eq:=T^2=4*Pi^2*L/g:
g:=32.2*ft/sec^2:
eval(solve(eq,L),T=1*sec);

                           0.8156355282 ft

eval(implicitdiff(eq,T,L)*dL,[T=1*sec,dL=0.01*ft]);

                          0.006130189070 sec

_______________
Alec Mihailovs, PhD
Maplesoft Member

The correct value of c(n) could be found as

f:=x->sin(x):
c:=unapply(simplify(1/2/Pi*int(convert(f(x)*exp(-n*I*x),trig),
x=-Pi..Pi,AllSolutions) assuming integer), n);

         c := n -> piecewise(n = -1, 1/2 I, n = 1, -1/2 I, 0)

c(n);
                      { 1/2 I          n = -1
                      {
                      { -1/2 I          n = 1
                      {
                      {   0           otherwise

and defining g as following works,

g:=unapply(simplify(add(c(n)*exp(I*n*x),n=-1..1)), x);

                           g := x -> sin(x)

Using the sum gives the following bug,

simplify(sum(c(n)*exp(I*n*x),n=-infinity..infinity));

             { infinity exp(-I Re(x)) I         n = -1
             {
             { -infinity I exp(Re(x) I)          n = 1
             {
             {        undefined                otherwise

which is absurd just because the answer includes n, not even talking about those infinities.

Looking a little bit closer into it, I also found another bug - in converting piecewise functions to Heaviside,

f:=piecewise(x=0,1);

                           { 1          x = 0
                      f := {
                           { 0        otherwise

convert(f,Heaviside);

                               Dirac(x)

 

Absurd.

 

_______________
Alec Mihailovs, PhD
Maplesoft Member

For example,

f1:=Matrix(1,`+`);

                              f1 := [2]

f2:=Matrix(2,`-`);

                                 [0    -1]
                           f2 := [       ]
                                 [1     0]

for i to 2 do f||i^2 od;

                                 [4]


                              [-1     0]
                              [        ]
                              [ 0    -1]

_______________
Alec Mihailovs, PhD
Maplesoft Member

Doron Zeilberger (דורון   ציילברגר) has (at least) 2 Maple procedures proving Morley's theorem on his site - one as a part of RENE, and another one - on that page.

Wikipedia recently updated it's page (having the same picture as in the first post in this thread, just larger) with a rather simple proof which doesn't require Maple (or anything else).

Maple has no problems checking the key identity,

simplify(sin(3*a)-4*sin(a)*sin(a+Pi/3)*sin(a+2*Pi/3));


                                  0

_______________
Alec Mihailovs, PhD
Maplesoft Member

BesselJ(0, x)+GAMMA(Psi)-sqrt(abs(omega))I've just clicked the button in the editor and pasted the expression. In Firefox. Then clicked the centering button to center it.

_______________
Alec Mihailovs, PhD
Maplesoft Member

Another bug is that it was classified as a question. As far as I understand, many (if not most) posts from that forum became posts. Why is this one a question?

Just added a bug tag. Thank you, Acer, for mentioning that. It was the first time I added a tag, I think - I usually went with what was suggested.

_______________
Alec Mihailovs, PhD
Maplesoft Member

May I say what I think about voters down of this post, or that would be considered too insulting?

_______________
Alec Mihailovs, PhD
Maplesoft Member

And another way (also without loops) is

a := [[1], [2,3], [3,4,5], [6,7,8,9]]:  

c:=[assign(c,[]),seq(proc(a,b,c) c:=[a[],b[]] end(c,i,'c'),i=a)];

    c := [[1], [1, 2, 3], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4, 5, 6, 7, 8, 9]]

I got this idea looking at the ListTools:-PartialSums source. It is just an example of Maple programming - not an example of doing that efficiently. But it is better than using loops in some other examples in this thread, one of which got 2 up votes, and another one - with practically the same inefficient loop, just written shorter, got 3 down votes - that tells you something about these "thumb down" voters - doesn't it?

_______________
Alec Mihailovs, PhD
Maplesoft Member

5 6 7 8 9 10 11 Last Page 7 of 76