Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

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

Works with piecewise,

f:=piecewise(x>1,x+y,x-y);

                         { x + y          1 < x
                    f := {
                         { x - y        otherwise

ff:=unapply(int(f,x=-2..2),y);

                           ff := y -> -2 y

ff(1.2);
                                 -2.4

Alec

First, you listed your variables in F in a different order, F(eta,alpha,R) in de1 and F(eta,R,alpha) in the expression for the substitution. They should be in the same order.

Second, it is better to use eval instead of subs. Note that eval is using a different order of arguments than subs.

Alec

I looked at the code very briefly.

One thing that seems wrong is that "datamatrix[i][j]=myparameter*datamatrix[i][j]:", probably, should have := instead of =.

There is an example of using rtables in Maple in the "samples/OpenMaple/CurveFitting/line.c"

Alec

 

For example,

simplify(arctan(n + 1) - arctan(n - 1)) assuming Re(n)>1;

                                     2
                             arctan(----)
                                      2
                                     n

simplify(arctan(n + 1) - arctan(n - 1)) assuming Re(n)<-1;

                                     2
                             arctan(----)
                                      2
                                     n

simplify(arctan(n + 1) - arctan(n - 1)) assuming Re(n)>-1, Re(n)<1;

                                  2
                          arctan(----) + Pi
                                   2
                                  n

The last one is not necessarily true though. For example,

eq:=n->arctan(2/n^2)=arctan(n+1)-arctan(n-1):
evalf(eq(0.5+0.5*I));

     1.570796327 - 0.2554128119 I = 1.570796327 - 0.2554128119 I

Maple is rather confused about that, however,

evalf(eq(1/2+I/2));

     -1.570796327 - 0.2554128119 I = 1.570796327 - 0.2554128119 I

But sometimes it is definitely true. For example,

evalf(eq(I));

                  -1.107148718 = 2.034443936 + 0. I

Finally, a plot,

n := x+I*y;
plots:-densityplot(Re(arctan(n+1)-arctan(n-1)-arctan(2/n^2)), 
    x = -3 .. 3, y = -3 .. 3, style = patchnogrid, 
    grid = [100, 100], color = red, axes = boxed);

135_arctan.png

Alec

Because your index is greater than the number of elements of the list,

a:=[3,3,3,5]:
a[5];
Error, invalid subscript selector

By the way, if you just wanted to remove from a all the elements that are also in b, that can be done as

remove(`in`,a,b);
                                 [5]

or

remove(member,a,b);
                                 [5]

Alec

sin(Pi-a) = sin(Pi)*cos(a)-cos(Pi)*sin(a) = 0*cos(a) - (-1)*sin(a) = sin(a)

Maple does that automatically,

sin(Pi-a);
                                sin(a)

Alec

All 4 roots are not real,

solve(z^4+z+1.);

  0.7271360845 + 0.9340992895 I, -0.7271360845 + 0.4300142883 I,

        -0.7271360845 - 0.4300142883 I, 0.7271360845 - 0.9340992895 I

Alec

The standard way of combining multiple plots in one is using display (from the plots package), see

?plots,display

plot can be used, as well, and a series of commands from the Statistics package.

Alec

If it is an empty line, put a cursor there and use the Backspace key.

Alec

If you used readdata with 2 columns, you should already get exactly what you needed. No further transformations are required.

Unless you wanted to have an Array as a result, or a Matrix, instead of a list of lists. In that case, you could just do Array(myMatrix), or Matrix(myMatrix), assuming that myMatrix is your list of lists obtained using readdata.

Alec

  1. There shouldn't be any difference except that the exhaustive search may be faster than any other algorithms.
  2. If you mean to ask if there is a difference between ideals in, say, R[x,y], considered as an algebra over R, and an algebra over R[x], then they, as sets of polynomials, are the same - the definition of an ideal in a ring includes only that ring, and doesn't depend on other rings that this ring may be considered as an algebra over. There is a difference in the definition of the Groebner basis though, related to the order of monomials. In the algebra over R, monomials y and xy have different weights. In the algebra over R[x], they have the same weight. Also, (1+x)y is a monomial in the second case, and is not a monomial in the first case.

Alec

There are many books and articles on the Groebner basis. Some of them are available online. Doing a quick Google search, I found an article [2] and a Maple package [1] which may be useful,

  1. SALSA
  2. Makoto Sugita1, Mitsuru Kawazoe2, and Hideki Imai3, Relation between XL algorithm and Gr¨obner Bases Algorithms

Alec

Did you try another way suggested?

X,Y:=<1,2,3>,<1,2,1>;
                                   [1]  [1]
                                   [ ]  [ ]
                           X, Y := [2], [2]
                                   [ ]  [ ]
                                   [3]  [1]
P:=<X|Y>;
                                 [1    1]
                                 [      ]
                            P := [2    2]
                                 [      ]
                                 [3    1]

Alec

You could try something like

f:= beta-6*beta*c_0+3*beta*c_0^2;

plots:-implicitplot(f>0,
beta=-2..2,c_0=-1..3,filledregions);

Alec

I think, you need t=0..34 to get the same plot, and scaling=constrained.

Alec

First 39 40 41 42 43 44 45 Last Page 41 of 76