Alec Mihailovs

Dr. Aleksandrs Mihailovs

4455 Reputation

21 Badges

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

Compiler:-Compile works only with limited number of functions. It doesn't compile fsolve.
You have to contact Maplesoft for that. See http://www.maplesoft.com/academic/highschool/index.aspx.
Last time when this question was discussed, nothing except the manuals and programming guides accompanying Maple, was suggested.
I gave up on producing LaTeX from Maple a long time ago. I don't think that there is a workaround for all the problems with that. Perhaps, one of 26 people answering in the current poll that they use Maple for publishing, could share his or her secrets for doing that.
restart; should reset (almost) all the variables.
Here is a simple example, T:=proc() global f,g,m; uses Maplets, Maplets:-Elements; f:=(a,b,c)->is(min(a+b-c,a-b+c,-a+b+c)>0); g:=proc() uses Maplets:-Tools; if f(parse(Get('a')),parse(Get('b')),parse(Get('c'))) then Set('d'=parse(Get('a'))+parse(Get('b'))+parse(Get('c'))); Set('L'('visible')=false) else Set('d'=""); Set('L'('visible')=true) fi end; m := Maplet(["Enter the side lengths:", [TextField['a']('value'=`if`(nargs>0,args[1],3), 10), TextField['b']('value'=`if`(nargs>1,args[2],4), 10), TextField['c']('value'=`if`(nargs>2,args[3],5), 10)], Label['L']("A triangle with these sides doesn't exist. ", 'visible'='false'), Button("Perimeter",Evaluate('function'="g")), TextField['d']()]); Display(m) end: T(); T(1,2,3);
Here are the steps for making this example with Dev-C++.
  1. Start Dev-C++.
  2. Click File - New - Project, select Console Application, check C Project radio button and type the name of the project - something like SMexample.
  3. Copy the source from ?StartMaple help page and paste it in main.c (instead of pretyped text there).
  4. Click Alt+P (or Project - Project Options), go to Directories, select Include Directories and add C:\Program Files\Maple 10\extern\include there.
  5. In Parameters (in Project Options) in the Compiler window type -D_MSC_VER and in the Linker window click Add Library or Object and add "../Program Files/Maple 10/bin.win/maplec.lib" .
  6. Click Ctrl+F9 (or Execute - Compile).
  7. Start cmd.exe, cd to the folder with the produced executable and type the name of it - something like SMexample.
  8. Enjoy.
J:=int(exp(-I*a*x)/cosh(k*x),x); / | exp(-I a x) J := | ----------- dx | cosh(k x) / student[changevar](u=exp(k*x),J,u): simplify(%); / a I - k |- -------| k / 2 a I - k u LerchPhi(-u , 1, - -------) 2 k ---------------------------------------- k F:=unapply(%,a,k,u): f:=(a,k,theta)->F(a,k,exp(k*theta))-F(a,k,1): f(a,k,theta); / a I - k |- -------| k / 2 a I - k exp(k theta) LerchPhi(-exp(k theta) , 1, - -------)/k 2 k a I - k LerchPhi(-1, 1, - -------) 2 k - -------------------------- k For example, f(1,2,3); (1 - 1/2 I) 2 1/2 exp(6) LerchPhi(-exp(6) , 1, 1/2 - 1/4 I) - 1/2 LerchPhi(-1, 1, 1/2 - 1/4 I) evalf(%); 0.5950313335 - 0.3600265184 I evalf(Int(exp(-I*x)/cosh(2*x),x=0..3)); 0.5950313331 - 0.3600265184 I
For example,
f:=n->[seq(k,k=Array((1..2)$n,()->zip((i,j)->zip([`>`,`<`][i], 
map(`+`@op,combinat:-choose(['p||k'$k=1..n],n-1)),['q||k'$k=1..n])[j],
[args],[$1..n]),order=C_order))]:

f(2);
                  [[q1 < p1, q2 < p2], 
                   [q1 < p1, p2 < q2], 
                   [p1 < q1, q2 < p2],
                   [p1 < q1, p2 < q2]]
f(3);
       [[q1 < p1 + p2, q2 < p1 + p3, q3 < p2 + p3],
        [q1 < p1 + p2, q2 < p1 + p3, p2 + p3 < q3],
        [q1 < p1 + p2, p1 + p3 < q2, q3 < p2 + p3],
        [q1 < p1 + p2, p1 + p3 < q2, p2 + p3 < q3],
        [p1 + p2 < q1, q2 < p1 + p3, q3 < p2 + p3],
        [p1 + p2 < q1, q2 < p1 + p3, p2 + p3 < q3],
        [p1 + p2 < q1, p1 + p3 < q2, q3 < p2 + p3],
        [p1 + p2 < q1, p1 + p3 < q2, p2 + p3 < q3]]
For example, f:=(x,L)->select(n->L[n]=x,{$1..nops(L)}): f(FAIL,L); {5} f(false,L); {1, 2, 6} applyop(0,f(FAIL,L),Z); [z1, z2, z3, z4, 0, z6]
I didn't vote "Other", but some obvious suggestions are, in alphabetical order, Abel, Arnold, Bourbaki, Cartan, Cayley, Galois, Gelfand, Grothendieck, Hamilton, Hardy, Hilbert, Klein, Lie, von Neumann, Ramanujan, Serre, Weil, and Weyl.
Anyway, copying from a friend's homework and pasting it into another worksheet can not be prevented this way, I think.
Programming guides that come with Maple, are very good.
Another suggestion is
icoeff4 := t ->
if t::integer then t
elif t::`*` then map(icoeff4, t)
elif t::`+` then igcd(map(icoeff4, [op(t)])[])
elif op(0, t) = Complex then
    igcd(icoeff4(Re(t)), icoeff4(Im(t)))
else 1
end if:
How about
f:=t->subsindets(t,Not(integer),1):
map(f, [0, 1, -3.0, -3, -0.,  3.0*Pi, 4*Pi, -12/5*I,5*x^2]);

                     [0, 1, 1, -3, 1, 1, 4, 1, 5]
It doesn't work for 5*(x^2+y) though,
f(5*(x^2+y));
                                  10
icoeff doesn't give the right answer as well,
icoeff(5*(x^2+y));
                                  1
Also, both f and icoeff have problems with 3*I,
(f, icoeff)(3*I);

                                 1, 1
First 69 70 71 72 73 74 75 Page 71 of 76