Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

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

Yes, it can be exported as animated gif. See, for example, my old blog post.

Alec

Well, that's what I would use. Can't you do that programming with Sage?

Magma also can be used - and it can be accessed from Maple, see my old blog post,

Magma("k<a>:=GF(16);
P<x,y>:=PolynomialRing(k,2,\"glex\");
I:=ideal<P|x^2+a*y,x^3+(1+a^2)>;
GroebnerBasis(I);");

  "-------------------------------------

        [
            x^2 + a*y,
            x*y + a^7,
            y^2 + a^6*x
        ]

        "

Alec

Also, here is an example in Mupad 5.1.0 (which is a part of Matlab 7.7.0 (R2008b)).

k:=Dom::GaloisField(2, 4, a^4+a+1):

k::Name:="k":

groebner::gbasis([poly(x^2+a*y,[x,y],k),poly(x^3+(a^2+1),[x,y],k)]);

[poly(x^2 + a*y,[x,y],k),poly(x*y + a + a^3 + 1,[x,y],k),poly((a^3 + a^2)*x + y^2,[x,y],k)]

Alec

PS It's not related to that topic, but I had some fun including Mupad's output inside <maple> and </maple> tags above :) Looks better in Mupad though,

\left[\mathrm{poly}\!\left(x^2 + a\, y,\left[x,y\right],k\right),\mathrm{poly}\!\left(x\, y + a + a^3 + 1,\left[x,y\right],k\right),\mathrm{poly}\!\left(\left(a^3 + a^2\right)\, x + y^2,\left[x,y\right],k\right)\right]

Alec

Just add the multiplication signs and get rid of not needed parentheses,

f := (a*(a*x+b)/(c*x-a)+b)/(c*(a*x+b)/(c*x-a)-a);

simplify(f);

                                      x

Or, slightly more interesting,

f := x-> (a*x+b)/(c*x-a);

                                  a x + b
                             x -> -------
                                  c x - a

f(f(x));

                               a (a x + b)    
                               ----------- + b
                                 c x - a      
                               ---------------
                               c (a x + b)    
                               ----------- - a
                                 c x - a      
simplify(%);

                                      x

Alec

Perhaps, one can zip them -then the attaching (and viewing) should work.

Alec

solve( {3*x + 9*y=10,8*x-7*y=20}); 

                               250      20
                          {x = ---, y = --}
                               93       93
assign(%);
sin(x)+sqrt(y);

                                         1/2
                             250    2 465
                         sin(---) + --------
                             93        93

Alec

As I suggested earlier, it is better to use right tools for the job. If one needs statistics - use R (it is included in Sage, too, by the way). If one needs mathematics - use Sage.

Maple has included a Physics package recently, but the Mathematics package is still missing.

Note that Maple is easily accessible from Sage, too, like maple("2+2;"), for example, so you could use your existing Maple code from Sage, too, if necessary.

Alec

Even if that is possible in Maple, it is much easier to use more mathematically oriented CAS, such as Sage, for instance. For example,

sage: k.<a>=GF(16)
sage: R.<x,y>=k['x,y']
sage:  I=ideal(x^2-a*y,x^3-(a^2+1))
sage: print I.groebner_basis()
[x^2 + (a)*y, x*y + (a^3 + a + 1), y^2 + (a^3 + a^2)*x]

Alec

I like your posts. They are detailed and well written. And you discovered a serious bug in int:

int(2 - (4 * (z/s)) / ( 4 * (z/s)^2 + 1)^(1/2),z=H..infinity);

                               infinity

You are very welcomed to this site. Fixing that bug in future Maple versions will make Maple a better tool for all of us.

Alec

I don't have Maple 6 to check. If it gives 2 and 4 solutions, it is wrong.

In Maple 12.02, the sequence of commands that I wrote above, produces

-1/8*(-8*h^2-3*s^2+4*(4*h^2+s^2)^(1/2)*h)/(-2*h+(4*h^2+s^2)^(1/2))

which looks like the correct solution. I don't think it is unphysical.

Alec

S_Z is a positive function, so the integral of it from H to infinity is a decreasing function of H, which means that there is only one midz such that the integral from H+midz to infinity is equal to the half of the integral from H to infinity. Thus, for any H the solution is unique, and the answer given by Maple is correct.

For exactly the same reason the solution in the second case is also unique. Using assumption s>0, Maple also evaluates it correctly,

S_z := 2 - (4 * (z/s)) / ( 4 * (z/s)^2 + 1)^(1/2);
S_zmid1 := int(S_z,z=h..h+midz) assuming s>0;
S_zmid2 := int(S_z,z=h+midz..infinity) assuming s>0;
zmid := solve(S_zmid1 = S_zmid2,midz);

Alec

Also, if say, Statistics:-Fit is used for fitting to a circle, then that conversion is not necessary. For example,

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

Statistics:-Fit(b+abs(sqrt(c^2-(x-a)^2)),
X,Y,x,output=parametervalues);

  [a = 1.99999999986953302, b = 0.999965580912601014,

        c = 0.99999999768014902]

If one still needs a matrix, then it can be constructed as follows,

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

Alec

Worked OK for me in Maple 12.02, even with using z instead of Zeta in four and zeta in five.

Alec

See the last example in ?zip

Alec

I understand that other functions are similar. The difference is that if you typed them here, I could just copy them and paste in the worksheet. Since you didn't type them, I had to type them in the worksheet myself, which needed some additional time that is not always easy to find.

Assuming that the x-values in the plot are the same (which is not always the case), the Matrix can be created as

Mat:=Matrix([op([1,1],data)[1..,1], 
seq(op([i,1],data)[1..,2],i=1..4)])^%T;

However, using a plot is not the best way to produce such a matrix. The best way is to define your functions as functions, and not as expressions,

H99 := t -> .008375209380+19.99162479*exp(-.09949999999*t);

and then calculate the matrix that you would like to have as something like

M:=Matrix(50,5,(i,j)->[x->x, H85, H95, H97, H99](i*0.5)[j]);

Alec

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