Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

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

It is not necessary to use display several times. One time is sufficient, either
display([a,b,d,e]);
or
display(a,b,d,e);
For example,
restart;
psi := z*exp(-sqrt(x^2+y^2+z^2)/2):
tx := diff(psi,x$2):
ty := diff(psi,y$2):
tz := diff(psi,z$2):
result := tx+ty+tz:
result:=simplify(result,[x^2+y^2+z^2=r^2]);

        result := -2*exp(-1/2*(r^2)^(1/2))/(r^2)^(3/2)*z*r^2+1/4*exp(-1/2*(r^2)^(1/2))*z

result:=combine(result) assuming r>0;

             result := -2/r*z*exp(-1/2*r)+1/4*z*exp(-1/2*r)

result:=collect(result,[exp,z]);
                    

                  result := (- 2/r + 1/4)*z*exp(- r/2)
The output of `R + (V*c) mod c = R mod c` doesn't look the same - mod and parentheses are italicized and multiplication asterisk is displayed instead of the multiplication dot. The slash in the square root can be displayed as
1/sqrt(1-v^2*`/`*c^2);

                       1/sqrt(1-v^2*`/`*c^2);
The output of `R + (V*c) mod c = R mod c` doesn't look the same - mod and parentheses are italicized and multiplication asterisk is displayed instead of the multiplication dot. The slash in the square root can be displayed as
1/sqrt(1-v^2*`/`*c^2);

                       1/sqrt(1-v^2*`/`*c^2);
I also found 2 problems with replying to private messages. First, half of the text box is hidden at the right hand side. Second, there is no a Preview message button - only Send button. I've uploaded the screenshot,
View file details
If you are interested in a pure real symbolic answer, not just numerical, then it can be easily achieved using hypergeom,
convert(sqrt(1/x^4+1),hypergeom,include=all);

                                             1
                    hypergeom([-1/2], [], - ----)
                                              4
                                             x
int(%,x);

                             1
  x hypergeom([-1/2], [], - ----)
                              4
                             x

                                               1
               hypergeom([1/2, 3/4], [7/4], - ----)
                                                4
                                               x
         - 2/3 ------------------------------------
                                 3
                                x
Now, it can be numerically evaluated as
f:=unapply(%,x):

evalf(f(2)-f(1));

                             1.132090393
非常に歓迎されている
Something similar can be done as
p:=proc(n)
local i,A;
uses LinearAlgebra;
i:=ilog2(n);
A:=<Matrix(i+1,i+2,1,shape=Hessenberg[lower]),
    Vector[row](convert(2*n,base,2))>;
printf("The last row is convert(2*%d,base,2)\n",n);
Per(A)=Permanent(A) 
end:
For example,
p(407);

The last row is convert(2*407,base,2)

         [1    1    0    0    0    0    0    0    0    0]
         [                                              ]
         [1    1    1    0    0    0    0    0    0    0]
         [                                              ]
         [1    1    1    1    0    0    0    0    0    0]
         [                                              ]
         [1    1    1    1    1    0    0    0    0    0]
         [                                              ]
         [1    1    1    1    1    1    0    0    0    0]
     Per([                                              ]) = 407
         [1    1    1    1    1    1    1    0    0    0]
         [                                              ]
         [1    1    1    1    1    1    1    1    0    0]
         [                                              ]
         [1    1    1    1    1    1    1    1    1    0]
         [                                              ]
         [1    1    1    1    1    1    1    1    1    1]
         [                                              ]
         [0    1    1    1    0    1    0    0    1    1]
The difference is that the first 2 columns are interchanged comparing with your series of formulas - but that doesn't change the permanent. The proof that the result is the number that you started from, follows from the Laplace decomposition along the last row.
Joe, as we both know, [seq](...) is slower than [seq(...)]. In particular,
num6 := proc(L)
local i;
    [seq(L[i]=i,i=1..nops(L))]:
end proc:
is faster than num5. I just wanted to mention about that for people learning High Performance technique from this book.
It seems as if sorting with lexorder also does the trick,
sort([x, y, Z,a[1],a[2]],'lexorder'[0]);

                        [Z, a[1], a[2], x, y]
To save the parentheses. Double back quotes create an invisible name that is used in this example as a name of a function, like f(`V&middot;c`) with an invisible f. I did that in Standard Maple 10.04 on Windows, in the worksheet mode. Perhaps, a later Maple version or Maple on another platform saves parentheses without that, but on my computer parentheses disappeared without double back quotes.
To save the parentheses. Double back quotes create an invisible name that is used in this example as a name of a function, like f(`V&middot;c`) with an invisible f. I did that in Standard Maple 10.04 on Windows, in the worksheet mode. Perhaps, a later Maple version or Maple on another platform saves parentheses without that, but on my computer parentheses disappeared without double back quotes.
Compare
a:=plots[display](plottools[line]([5,0],[5,10]),color=red);

  a := PLOT(CURVES([[5., 0.], [5., 10.]]),COLOUR(RGB, 1.00000000, 0., 0.))
with
b:=plot([5,y,y=0..10]);

  b := PLOT(CURVES([[5., 0.], [5., 0.217971541666666658],

        [5., 0.407627414583333348], [5., 0.620915279166666667],

        [5., 0.835616954166666814], [5., 1.04929818958333332],

        [5., 1.24740804791666672], [5., 1.45253933124999990],

        [5., 1.66468639791666684], [5., 1.87615310625000008],

        [5., 2.09367260833333368], [5., 2.28526390416666692],

        [5., 2.50095032500000025], [5., 2.71752237500000016],

        [5., 2.92622967500000008], [5., 3.11575589791666685],

        [5., 3.34112090833333352], [5., 3.53203463333333367],

        [5., 3.75411268125000008], [5., 3.95068938333333320],

        [5., 4.16636518125000066], [5., 4.37173954375000040],

        [5., 4.58602614583333424], [5., 4.78280813958333350],

        [5., 4.99506410416666658], [5., 5.21553839791666718],

        [5., 5.40746191875000015], [5., 5.61474457916666747],

        [5., 5.82888785000000009], [5., 6.03838526250000029],

        [5., 6.24108478125000055], [5., 6.46614803750000000],

        [5., 6.66837738333333262], [5., 6.88430037500000046],

        [5., 7.07995869791666620], [5., 7.29386492500000116],

        [5., 7.49513401458333294], [5., 7.70551820625000072],

        [5., 7.91120720833333291], [5., 8.12654453124999954],

        [5., 8.33393996666666758], [5., 8.54603175416666794],

        [5., 8.75636731458333450], [5., 8.94964385000000106],

        [5., 9.17116057083333480], [5., 9.36928776666666784],

        [5., 9.58053268125000024], [5., 9.78272101875000110],

        [5., 10.]], COLOUR(RGB, 1.0, 0., 0.)), AXESLABELS("", ""),

        VIEW(DEFAULT, DEFAULT))
For one line it doesn't make a big difference, maybe, but it makes a difference for plots with many lines and for animations.
By the way, if a=(2*b+c)^2/3 , Maple integrates it without problems, both symbolically (I'm not sure that the answer is correct though) and numerically,
F := (y^2-1)^(1/2)*(1-(3*y^2)*(1/2))*((2*b+c)^2/3-(b*y+c*(y^2-1)^(1/2))^2)/
(y*(1-(3*y^2)*(1/2)+(y^2-1)^(1/2)*(3*y^2-1)^(1/2))):

int(F,y);

evalf(Int(subs(b = 0.1066590211e-4, c = 0.1e-2,F),y=1..1.4037)); 

                                         -6
                          0.6605774330 10
A workaround is
applyop(inttrans[invlaplace],1,eq1,s,t) assuming T[i]>0;

                  sum((-1)^i*Heaviside(t-T[i]),i = 1 .. n)
The assume command after the restart command in your code is not necessary.
First 160 161 162 163 164 165 166 Last Page 162 of 180