Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

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

Since nobody else replied, I'll briefly and as politely as I can, say few words about that.

  1. I don't think it is possible, and it's really ugly. That's one of the reasons why many people on Linux prefer using command line, and on Windows - Classic Maple (32-bit Linux also has Classic, but it's different than in Windows and also rather ugly.)
  2. It is possible to change the default fonts to slightly less ugly ones - see that recent thread.

Alec

Groebner basis is using monic polynomials (i.e. with the coefficient 1 at the monomial of the highest degree), so there is no need in ordering of the base field - one compares just the degrees of the monomials, and not their coefficients.

All calculations are done purely algebraically, using polynomials of alpha satisfying the conditions given in the root definition, i.e. alpha^3 = -alpha-1 in this example, with that being the same as alpha^3=alpha +1 doing calculations mod 2.

The actual complex value(s) of that root are irrelevant. They are not used in the calculations.

Alec

Groebner basis is using monic polynomials (i.e. with the coefficient 1 at the monomial of the highest degree), so there is no need in ordering of the base field - one compares just the degrees of the monomials, and not their coefficients.

All calculations are done purely algebraically, using polynomials of alpha satisfying the conditions given in the root definition, i.e. alpha^3 = -alpha-1 in this example, with that being the same as alpha^3=alpha +1 doing calculations mod 2.

The actual complex value(s) of that root are irrelevant. They are not used in the calculations.

Alec

If it shows as a table, it is a table. You can convert it to a list, using something like

a:=convert(a,list);

There is no such a command "list" in Maple, so assigning A:=list(30) means that A is a value of the (undefined) function at 30 - same as, say A:=f(30). In the first case, you assign A (I don't want to use l, because it looks like I) to a list, A:=[1,2,3]; so it becomes a list. In the second case, without assigning A to a list, any indexed assignment, such as A[1]:=1, makes it a table. And tables have different ops than lists.

Alec

If it shows as a table, it is a table. You can convert it to a list, using something like

a:=convert(a,list);

There is no such a command "list" in Maple, so assigning A:=list(30) means that A is a value of the (undefined) function at 30 - same as, say A:=f(30). In the first case, you assign A (I don't want to use l, because it looks like I) to a list, A:=[1,2,3]; so it becomes a list. In the second case, without assigning A to a list, any indexed assignment, such as A[1]:=1, makes it a table. And tables have different ops than lists.

Alec

If you try to check your solution, x=-1, you will get 0 in a negative power, and negative powers of 0 are usually not defined,

0^(-1);
Error, numeric exception: division by zero

Alec

It may start working after upgrading to Intrepid.

Alec

As you can see from the print results, your algorithm doesn't work as expected. You got the same error in your real code because the size of the list a is decreasing, and your index eventually gets greater than it. The size of the list can be found using nops - for example, nops(a), or nops(b).

There are many different ways to do what you wanted in Maple. Two ways were already suggested by Doug Meade and Robert Israel in their posts below. Here is another one, using multisets and hashmset module,

a := [2, 2, 3, 3, 3, 5]: 
b := [2, 2, 2, 3, 7]:

use hashmset in map(`$`@op, entries(`intersect`(
    map(new@op@convert,[a,b],multiset)[]))) end;

                              [2, 2, 3]

Alec

As you can see from the print results, your algorithm doesn't work as expected. You got the same error in your real code because the size of the list a is decreasing, and your index eventually gets greater than it. The size of the list can be found using nops - for example, nops(a), or nops(b).

There are many different ways to do what you wanted in Maple. Two ways were already suggested by Doug Meade and Robert Israel in their posts below. Here is another one, using multisets and hashmset module,

a := [2, 2, 3, 3, 3, 5]: 
b := [2, 2, 2, 3, 7]:

use hashmset in map(`$`@op, entries(`intersect`(
    map(new@op@convert,[a,b],multiset)[]))) end;

                              [2, 2, 3]

Alec

Mario,

You said that you needed a proof in Maple, and the first simplify does that - for those values of n, except n=1, in which case it can be simply checked.

The proof "on the paper" for those values of n is rather simple - if one takes tan of both sides, (s)he will get an obvious identity. Now, for n>=1, the lhs is in the interval between 0 and Pi/2, and the rhs is in the same interval. On this interval, tan is increasing, so it is a 1-1 function. Thus, since tan(lhs)=tan(rhs), we have lhs=rhs.

In my post above I didn't analyze where the function exists. I analyzed where the identity holds. It holds in the region painted black on the plot, and it doesn't hold in the region painted red.

The same is true for your last suggested identity. Sometimes it is true, and sometimes the lhs and the rhs of it differ by Pi.

Alec

Mario,

You said that you needed a proof in Maple, and the first simplify does that - for those values of n, except n=1, in which case it can be simply checked.

The proof "on the paper" for those values of n is rather simple - if one takes tan of both sides, (s)he will get an obvious identity. Now, for n>=1, the lhs is in the interval between 0 and Pi/2, and the rhs is in the same interval. On this interval, tan is increasing, so it is a 1-1 function. Thus, since tan(lhs)=tan(rhs), we have lhs=rhs.

In my post above I didn't analyze where the function exists. I analyzed where the identity holds. It holds in the region painted black on the plot, and it doesn't hold in the region painted red.

The same is true for your last suggested identity. Sometimes it is true, and sometimes the lhs and the rhs of it differ by Pi.

Alec

Yes, if the elements were not repeated, and the order didn't matter, then the conversion to sets, using minus, and the conversion back to lists would work.

Alec

Yes, if the elements were not repeated, and the order didn't matter, then the conversion to sets, using minus, and the conversion back to lists would work.

Alec

That's a nice idea! And the plot looks better than with piecewise.

Alec

That's a nice idea! And the plot looks better than with piecewise.

Alec

First 75 76 77 78 79 80 81 Last Page 77 of 180