Alec Mihailovs

Dr. Aleksandrs Mihailovs

4475 Reputation

21 Badges

20 years, 40 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 answers submitted by Alec Mihailovs

It's hard to understand your problem. What is p, d(p), and I? Alec

The square brackets [ and ] in Maple are for lists. Try to replace them with usual parentheses, ( and ).

Alec

Perhaps, odeplot can be used. It's hard to guess without seeing the equations. The series solutions are not good for plotting in this example. You could get a plot by removing the O term (the last one) in the series, but it may be very far from the actual plot.

Alec

PS ?odeplot doesn't provide a link to the help page. Is it broken now? -Alec

A workaround is to define the procedure as proc(k) and add L as a global parameter, i.e. insert

global L; 

after local parameters declaration. Then it would work as

L:=[X1(t)=1,0=-X2(t),u=v]:
simp(2);

                               [u = v]

L;

                        [1 = 1, 0 = 0, u = v]

Note that it could be written much more simple. In particular, all the manipulations with newL at the end could be done as simple as

remove(evalb,L);

                               [u = v]

Also, at the beginning, the sequence of cats can be written as

[cat(X,1..3)](t);

                        [X1(t), X2(t), X3(t)]

with k instead of 3. This is an interesting trick that works with more than one range. For example,

cat(X,1..3,4..5);

                     X14, X15, X24, X25, X34, X35

cat((1..2)$3);

                111, 112, 121, 122, 211, 212, 221, 222

Alec

You can decrease the number of points using one of the "smoothing" curves - in my example with splines, or in Robert Israel's example with trigonometric polynomials. 

In my example, if you want to decrease the number of points to 12, that would work as

b:=op([1,1],plot(p,numpoints=12,adaptive=false));

  b := [[1.16666666699999988, 1.],

        [3.49870596809588142, 3.99482389413156724],

        [4.73689407180060140, 5.45419849803051982],

        [6.68984183090909212, 6.29523985738135482],

        [8.65728990727272852, 5.24405147212422485],

        [10.6153870463636366, 2.02309127723753246],

        [11.7518227075357054, -5.34373348722703411],

        [11.2423592600872908, -10.9718829544221262],

        [7.80620132550140244, -12.4404205864451463],

        [3.07099554657893358, -8.60860261419190209],

        [0.816478572181008722, -5.53215607104503171],

        [1.16666666999999790, 1.]]

Alec

That's just a bunch of numbers, not functions (except the last 2, if they represent an indefinite integral). The series for C is divergent, and for D - depends on the choice of \phi. E and F look strange, and after removing "a=" diverge as well (if uneven means odd). G is zeta(4) and H is close to zeta(3)/3+zeta(4) and can be evaluated with add instead of sum in Maple (which has, by the way, only one p in its name, in contrast with plotting which has 2 "t"s.)

A:=evalf(Sum((3*n^2+7*n+1)^(-n),n=1..infinity));

                          A := 0.09228936139

plot(int(exp(1/(1+exp(5*(2-x)))),x=0..x));

Alec

PS Also, in LaTeX, it should be \sum_{n=1}^\infty instead of \sum_{n=[1,infinity]} and the braces around one symbol, such as {1}, {2}, or {n} are not necessary - one can just write 1, 2, or n. -Alec

PPS Also, there is another forum for student's questions - How do I ...? with Maple (Student) -Alec

One can use either Sockets or HTTP packages.

HTTP:-Get or HTTP:-Post don't always work (mainly because they are sending request using 1.1 protocol instead of 1.0, and don't provide the necessary tools to handle HTTP/1.1 requests). 

If they don't work, then Sockets could be used directly (with HTTP/1.0). I have several examples in my blog, as well as forum posts, in particular, the recent one .

Alec

Also, manual logarithmation helps,

solve(map(SolveTools:-CancelInverses,map2(map,ln,{e1,e2})));
                                   -5
               {D = 0.7030777962 10  , Q = 270758.7952}

Alec

The y-values should be -10..10, and not 10..10.

Alec

For GF(2,1024) one can use Magma calculator through the procedure in my blog ,

Magma:=proc(x) 
local s,a,b;
uses StringTools, Sockets;
s:=Open("magma.maths.usyd.edu.au",80);
Write(s,cat("GET /calc/?input=",        
map((c->cat("%",c))@convert,convert(Squeeze(x),bytes),hex)[],
            " HTTP/1.0\n\n"));
a := "";
		b := Read(s):
		while b <> false do
			a := cat(a,b);
			b := Read(s):
		end do;
Close(s);
a[Search("--",a)..Search("Total",a)-1]
end:

and the following procedure,

PrimitivePolynomial:=proc(p,n)
local T,s; 
if nargs>2 then T:=args[3] fi;
s:=Magma(cat("PrimitivePolynomial(GF(",p,"),",n,");"));
try 
parse(StringTools:-SubstituteAll(s[40..-3],
    "$.1", cat("",T)))
catch "incorrect syntax in parse","extra characters":
   printf("%s",s)
end 
end;

For example, as

PrimitivePolynomial(2,100,x);

       52    48    47    45    43    34    31    27    24    22    16
  1 + x   + x   + x   + x   + x   + x   + x   + x   + x   + x   + x

            15    11    36    35    25    20    56    55    44    46
         + x   + x   + x   + x   + x   + x   + x   + x   + x   + x

            57    41    30    37    19    100    8    9    6    3
         + x   + x   + x   + x   + x   + x    + x  + x  + x  + x

            5
         + x

Primitive(%) mod 2;

                                 true

However, for GF(2,2048) the output is too long and is truncated, so one has to use Magma directly, I guess.

Alec

Maple doesn't use Zech's logarithms. Nevertheless, you can obtain the list of elements as in the following example,

F:=GF(2,3);
x:=F:-ConvertIn(F:-variable);
[0,seq(F:-`^`(x,n),n=0..6)];

                      2       2           2              2
           [0, 1, T, T , 1 + T , 1 + T + T , 1 + T, T + T ]
Alec

Also, that could be done as

eval(collect(simplify(p,[x+y=z]),z),z=x+y);

                         1 + (1 + x) (x + y)

Alec
 

 

Email support@maplesoft.com

Alec

The following also should work,

F:=GF(2,32,x^32+x^26+x^19+x^15+x^13+x^11+x^9+x^8+x^4+x+1);

F:-`^`(F:-ConvertIn(x),12345678987654321);

Alec

 

You have several errors here.

First, H is an equation and in the phi definition you have some expression plus that equation multiplied by something. What does that suppose to mean?

Second, you have defined phi and then is using it as phi(x). Either you should use it as phi and not phi(x), or define is as phi :=x-> something (or as a procedure).

Third, you can't integrate equations - say int(x=x^2,x) doesn't have much sense. You need expressions instead of equations.

Alec

 

First 13 14 15 16 17 18 19 Last Page 15 of 76