Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

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

For example,

flist:=[NUMINTP,NUMASERIES,evalf[1]@DIFFERENCE]:
M:=Matrix(10,3,(i,j)->flist[j](10*i-9));

Alec

It is interesting that Maple places I in the middle of a number, such as 12 I sqrt(1419). At first glance, I didn't even notice it - it looked as 121 sqrt(1419) for me :)

Also, such things as sqrt(5)*sqrt(3) instead of sqrt(15) look strange in the simplified answer.

Another thing that could be simplified more is sin(alpha+Pi/6).

This simplification can be done manually though as

combine(expand(%));
         1/2            1/2                 1/2
  [1/3 15    cos(%1) + 5    sin(%1), -2/3 15    cos(%1),

              1/2            1/2
        1/3 15    cos(%1) - 5    sin(%1)]

                       1/2
                   1419
  %1 := 1/3 arctan(-------)
                      9

Alec

It is interesting that Maple places I in the middle of a number, such as 12 I sqrt(1419). At first glance, I didn't even notice it - it looked as 121 sqrt(1419) for me :)

Also, such things as sqrt(5)*sqrt(3) instead of sqrt(15) look strange in the simplified answer.

Another thing that could be simplified more is sin(alpha+Pi/6).

This simplification can be done manually though as

combine(expand(%));
         1/2            1/2                 1/2
  [1/3 15    cos(%1) + 5    sin(%1), -2/3 15    cos(%1),

              1/2            1/2
        1/3 15    cos(%1) - 5    sin(%1)]

                       1/2
                   1419
  %1 := 1/3 arctan(-------)
                      9

Alec

That, certainly, is much nicer.

By the way, I don't recall using _rest. Is it a recent addition?

Alec

Or, I missed the underscores! With underscores, that could be also done as

sys:=evalindets[flat](sys,'indexed',
x->cat(ListTools:-Join([op(0..-1,x)],_)[]));

Alec

That could be done more simple using evalindets.

sys:=evalindets(sys,'indexed',curry(cat@op,0..-1));

Alec

In this case, you could execute

_EnvExplicit:=true;

before solving the system, and then, after solving it, do

real_solutions:=remove(has,solutions,I);

Alec

In this case, you could execute

_EnvExplicit:=true;

before solving the system, and then, after solving it, do

real_solutions:=remove(has,solutions,I);

Alec

Paulina,

Thank you! That would be a good thing to have and seems to be simple to implement using Robert Israel's suggestion.

Alec

Paulina,

Thank you! That would be a good thing to have and seems to be simple to implement using Robert Israel's suggestion.

Alec

By the way, a lot of people complained for a long time that polar coordinates couldn't be used in contourplot, and it is still not fixed.

In this case, there shouldn't be any backward compatibility issues, in contrast, for example, with strange order of coordinates in various coordinate systems, such as r(theta,z) instead of z(r,theta) in cylindrical coordinates.

Alec

By the way, a lot of people complained for a long time that polar coordinates couldn't be used in contourplot, and it is still not fixed.

In this case, there shouldn't be any backward compatibility issues, in contrast, for example, with strange order of coordinates in various coordinate systems, such as r(theta,z) instead of z(r,theta) in cylindrical coordinates.

Alec

A workaround for maptype is

mymaptype:=parse(StringTools:-Substitute(sprintf("%a",eval(maptype)),
"args[2]","op(2,[args])")):

mymaptype(set,evalf,[2.2222]);
                               [2.2222]

Alec

That related to the following,

f:=[something,evalf]:
f[2](2.2222);
                                 2.2

Alec

You could use contourplot command. For example, as

E:=-sqrt(5-Pi)*r*(cos(2*phi)-sin(2*phi));
eval(E,[r=sqrt(x^2+y^2),phi=arctan(y,x)]);
contourplot(%,x=-1..1,y=-1..1);

Alec

First 128 129 130 131 132 133 134 Last Page 130 of 180