Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

20 years, 312 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

That has reminded me of Will's blog post, A Little Humor.

Alec

One of my students (a senior) wrote on the test 2*4 = 24, and when I asked him how he got such an aswer, he showed me how he did that using calculator. Obviously, either * button had some problems, or he didn't push it deep enough.

I guess, he could get the same answer in Standard Maple as well. With a possibility of entering such things as 2x without a multiplication sign, why not to enter 24 without it?

Alec

The statements are executed in the order they are written. In your code, if mode=TE then Q:=QTE1, so it is executed as it should. If you wrote

if mode=TE then if m=0 then Q:=QTE2 elif n=0 then QTE3 else Q:=QT1 fi fi

then for m=0 QTE2 would work, for m not equal 0 and n=0 QTE3 would work, and QT1 would work in other cases.

Alec

Probably, not. You might try though and see how it will go. If you don't have problems with typing, LaTeX may be a good choice. Also, I would start with SAGE rather than with Maple, for various reasons.

Alec

It is not clear from your post what the problem may be. It seems as if it should work pretty straightforward with ifs and elifs. If you posted your code instead of describing it, the problem would be seen more clearly.

Alec

Now, I did that by hand. But this also could be found in Maple using equivalent function from algolib library. First, one has to download algolib from INRIA, then add its location at the beginning of libname, i.e. do

libname:= "/path/to/algolib", libname;

and then, since S_n is the coefficient at x^n in the Taylor series expansion of log(1-2*x)/(x-1) at x=0, do

equivalent(log(1-2*x)/(x-1),x,n);
                         (-ln(2))            (-ln(2))
                2 exp(-n)             exp(-n)
                ----------------- + O(---------------)
                        n                    2
                                            n

simplify(%,symbolic);

                                        n
                          (1 + n)      2
                         2        + O(----) n
                                        2
                                       n
                         --------------------
                                  n

Alec

I've answered to Problem 1 in another thread. Here is the solution of Problem 2.

dsolve({diff(y(t),t,t)+2*t*diff(y(t),t)+3*y(t)},y(t),
    series);
                                      2                3
  y(t) = y(0) + D(y)(0) t - 3/2 y(0) t  - 5/6 D(y)(0) t  + 7/8 y(0)

         4                5      6
        t  + 3/8 D(y)(0) t  + O(t )

Alec

dsolve({diff(y(x),x,x)+4*diff(y(x),x)+5*y(x),
    y(Pi/2)=1/2,D(y)(Pi/2)=-2});

    y(x) = 1/2 exp(Pi) exp(-2 x) sin(x) + exp(Pi) exp(-2 x) cos(x)

Alec

That can be done, for example, as

F:=a->applyop(f,1,a);

F(a[x,y]);
                              a[f(x), y]

or

G:=curry(applyop,f,1);

G(a[x,y]);
                              a[f(x), y]

Alec

It is easy to prove by induction that S_n > 2^(n+1)/(n-1) for n>4. Also, it is easy to prove by induction that if S_m < 2^(m+1)/(m-1-eps) for some (large enough, depending on eps) m, with eps>0, then S_n < 2^(n+1)/(n-1-eps) for all n>m. That proves asymptotic 2^(n+1)/(n-1) for S_n (actually, even more than that, asymptotic would follow from any particular value of eps, say eps=1.)

Alec

For example,

Matrix(map(Bits:-Split,sBox));
                          [0    0    1    1]
                          [                ]
                          [1    0    1    0]
                          [                ]
                          [0    1    1    0]
                          [                ]
                          [1    1    0    1]
                          [                ]
                          [1    0    0    1]
                          [                ]
                          [0    0    0    0]
                          [                ]
                          [0    1    0    1]
                          [                ]
                          [1    0    1    1]
                          [                ]
                          [1    1    0    0]
                          [                ]
                          [0    1    1    1]
                          [                ]
                          [1    1    1    1]
                          [                ]
                          [0    0    0    1]
                          [                ]
                          [1    1    1    0]
                          [                ]
                          [1    0    0    0]
                          [                ]
                          [0    1    0    0]

The same result can be produced with

Matrix(map(convert,sBox,base,2));

Alec

That can be done using contourplot3d. First, you have to find m,

solve(y=2*x/(x-m),m);
                              x (y - 2)
                              ---------
                                  y

It has a singularity for y=0, so that value of y should be avoided. That can be done as follows,

with(plots):
a:=contourplot3d( x*(y-2)/y, x=-10..20, y=-5..-0.01,
    contours=[1,5,10]):
b:=contourplot3d( x*(y-2)/y, x=-10..20, y=0.01..5,
    contours=[1,5,10]):
display(a,b,view=[-10..20,-5..5,0..11]);

Alec

What 3D coordinate variables would you like to have - x, y, and m, and plot only curves for fixed values of m, equal 1, 5, and 10?

Or you want to have 3 or more 2D plots for m equal 1, 5, 10 in xy-coordinates?

In Standard Maple some plots could be built interactively. Type your function, click right mouse button on it, scroll down to Plots etc.

Alec

For such things, applyrule can be used,

s:=[solve](x^3+2*x+1):
applyrule([(108+12*177^(1/2))^(1/3)=alpha,
    1/(108+12*177^(1/2))^(1/3)=1/alpha],s);

     alpha     4    alpha     2            1/2 /  alpha     4  \
  [- ----- + -----, ----- - ----- + 1/2 I 3    |- ----- - -----|,
       6     alpha   12     alpha              \    6     alpha/

        alpha     2            1/2 /  alpha     4  \
        ----- - ----- - 1/2 I 3    |- ----- - -----|]
         12     alpha              \    6     alpha/

normal(%[1]);

                                   2
                              alpha  - 24
                            - -----------
                                6 alpha

Alec

interface(rtablesize=infinity);

Alec

First 53 54 55 56 57 58 59 Last Page 55 of 76