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

The Hankel transform used in inttrans can be easily modified to the standard form as follows,

hankel:=(f,r,k,nu)->inttrans[hankel](f*r^(1/2),r,k,nu)/k^(1/2):

For example,

hankel(1/r,r,k,0);

                                 1/k

Note, however, that the tables used by Maple, are (very) incomplete and sometimes wrong. One can use addtable command to add few transforms to the tables, but the incorrect entries are not that easy to fix.

Alec

Yes, by default, TCP/IP is not enabled. It can be enabled using SQL Sever Configuration Manager, and the server has to be restarted after that.

I thought that you mentioned that TCP/IP was enabled.

About slashes - one other possibility that I can think of is that the slash between Marcus-PC and SQLExpress should be a backslash (entered in Maple as a pair of backslashes), because it is the name of the SQL Server, but all the following slashes should be regular, not backslashes, and entered as /, as it is usual for URLs. 

Alec

Don't use square brackets in solve, use { and }. For example,

V:=allvalues(solve({A,B}));

evalf(eval(r*t-s^2,V[1]));
                             322.1195431

evalf(eval(r*t-s^2,V[2]));

                             -322.1195431

Your solution is correct. The second equation is linear, giving x = 4y. Substituting that in the first equation, we get a quadratic equation for y, which has 2 solutions. That gives only 2 points.

Alec

The direct approach doesn't work,

diff(1/sqrt(1-x^2),x$n);

                           n
                          d   /     1     \
                          --- |-----------|
                            n |      2 1/2|
                          dx  \(1 - x )   /

diff(1/sqrt(1+x^2),x$n);

                           n
                          d   /     1     \
                          --- |-----------|
                            n |  2     1/2|
                          dx  \(x  + 1)   /

Some answers can be obtained by integrating the function first and then taking the (n+1)-th derivative,

diff(int(1/sqrt(1-x^2),x),x$(n+1));

   n  (-n)                                                         2
  2  x     MeijerG([[0, 1/2, 1/2], []], [[0], [n/2 + 1/2, n/2]], -x )

           /   1/2
          /  Pi
         /

diff(int(1/sqrt(1+x^2),x),x$(n+1));

   n                                                        2   (-n)
  2  MeijerG([[0, 1/2, 1/2], []], [[0], [n/2 + 1/2, n/2]], x ) x

           /   1/2
          /  Pi
         /

Alec

Try to change backslashes \ in the url to the regular slashes /.

Alec

Changing the thickness of axes and tickmarks is not implemented in Maple plots.

The 2 usual solutions are either changing the thickness of lines in the eps files (if you have some Postscript knowledge), or draw axes and tickmarks manually in Maple, as lines (or arrows for axes) with desirable thickness, then draw a plot without axes (i.e. with option axes=none), and combine them using plots:-display command. Also, axes=none can be added in the display command instead of the plot command.

Alec

Without using a procedure, it can be done just by executing the body of a procedure.

For example, if you need to find a root of x^4+3*x^3-x-10=0 correct to 8 decimal places, with initial approximation x0=-3.2, that can be done as

f:=x->x^4+3*x^3-x-10:
x:=-3.2:
n:=8:
while f(x-0.5*0.1^n)*f(x+0.5*0.1^n)>0 do 
    x:=x-f(x)/D(f)(x) od;

                          x := -3.206173582

                          x := -3.206142669

However, if you need to do that more than once, it is more conveniet to use it in the form of a procedure,

Newt:=proc (f,x0,n) 
    local x; 
    x:=x0; 
    while f(x-0.5*0.1^n)*f(x+0.5*0.1^n)>0 do 
        x:=x-f(x)/D(f)(x) 
    od 
end:

In this case, if you need to find another root, with the initial approximation x0=1.4, correct to 8 decimal places, that can be done as

Newt(f, 1.4 ,8); 
                             1.375064696

Alec

The Groebner package in Maple is not designed for such things. Why use Maple? It would be much faster in Singular or Magma.

Alec

The solution is

S:=LinearAlgebra:-MatrixExponential(F,t);

                          [%1    %2    %2    %2]
                          [                    ]
                          [%2    %1    %2    %2]
                     S := [                    ]
                          [%2    %2    %1    %2]
                          [                    ]
                          [%2    %2    %2    %1]

                       %1 := 3/4 exp(-4 u t) + 1/4

                       %2 := -1/4 exp(-4 u t) + 1/4

Check the given conditions,

S.<1,1,1,1>;
                                 [1]
                                 [ ]
                                 [1]
                                 [ ]
                                 [1]
                                 [ ]
                                 [1]
eval(S,t=0);
                          [1    0    0    0]
                          [                ]
                          [0    1    0    0]
                          [                ]
                          [0    0    1    0]
                          [                ]
                          [0    0    0    1]

simplify(map(diff,S,t)-S.F);

                          [0    0    0    0]
                          [                ]
                          [0    0    0    0]
                          [                ]
                          [0    0    0    0]
                          [                ]
                          [0    0    0    0]

Alec

That can be plotted as plot(v1, v2) where v1 is a list or a Vector of x-coordinates and v2 is a list or a Vector of y-coordinates.

Also, DynamicSystems:-DiscretePlot with various options, such as style=stair, for example, can be used.

arrays are rather old data structures. A few packages using them got deprecated. Normally, one would use an Array instead (with a capital A), or a Vector (with a capital V).

In plot, if plot(f(x), x=1..10) doesn't work, then either plot(f, 1..10) can be used, or with adding single quotes, plot('f(x)', x=1..10).

Alec

with(Statistics):
X := RandomVariable(Normal(7, 2)):
S := Sample(X, 5000):
H1 := applyop('NULL', {seq([1, i], i = 11 .. 24)}, 
    Histogram(S, binwidth = .5, range = 1 .. 13, 
        color = "DarkGoldenrod")):
H2 := applyop('NULL', {seq([1, i], i = 1 .. 10)}, 
    Histogram(S, binwidth = .5, range = 1 .. 13, 
        color = "LightGoldenrod")):
p := plot(t -> PDF(X, t), 1 .. 13, 
    thickness = 3):
B := plottools:-rectangle([1, -0.03], [13, .21], 
    color = "LightBlue"):
T := plottools:-rectangle([1.2, .16], [5, .2], 
    color = white):
c := plots:-textplot([[3.1, .18, 
    "The shaded bars\nrepresent scores\n<6.0"], 
    [1.5, .17, "_"]], 
    font = [Helvetica, Oblique, 10]):
L := plottools:-line([3.1, .16], [4.5, .1], 
    color = brown):
plots:-display(H1, H2, p, T, c, L, B, 
    labels = ["Grade-equivalent vocabulary score", ""], 
    labelfont = [times, bold, 12], 
    axis[2] = [color = white]);

135_histogram.gif

Alec

The answers given by Maple in these examples are correct, just not simplified. One can use the simplify command to simplify them,

diff(cot(x),x);
                                        2
                             -1 - cot(x)

simplify(%);

                                   1
                              - -------
                                      2
                                sin(x)

diff((z-1)/(z+1),z);

                             1      z - 1
                           ----- - --------
                           z + 1          2
                                   (z + 1)

simplify(%);

                                  2
                               --------
                                      2
                               (z + 1)

Alec

In the last expression, exp(2*I*Pi*n*beta) = exp(2*I*Pi*n*(2*m+1)/2/n) =
exp(I*Pi*(2*m+1)) = -1.

So (1 - that) = 2.

Now, dividing both numerator and denominator by -exp(I*Pi*beta), we get

-2/(exp(I*Pi*beta)-exp(-I*Pi*beta)) = I/sin(Pi*beta)

which has a different sign than St1, and this is correct. Check, for example, the case n=2, m=1.

value(eval(S,[n=2,m=1]));
                                 1/2
                                2    I

eval(I/sin((2*m+1)*Pi/2/n),[n=2,m=1]);

                                 1/2
                                2    I

Alec

See ?Database and ?examples,DatabaseGrades .

Alec

Generally, no - except, maybe, if your school has MapleNet installed. Then it could be accessed through it.

There is also mapletviewer.exe in Windows, but it works as a part of the Maple installation, not standalone.

Alec

First 35 36 37 38 39 40 41 Last Page 37 of 76