Alec Mihailovs

Dr. Aleksandrs Mihailovs

4495 Reputation

21 Badges

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

Yes, with my experience with Global Optimization package (for Maple 10), it gave good results up to about 25-30 variables, close to good for 25-50 variables, and was useless for more than 50 variables. Your case, with 50 variables, still might work - giving not the best possible results, but still good enough.

Why does it cost that much - I also don't understand, because many free packages work much better - say for up to 300 variables.

I would certainly try Matlab - it is not free, but if you already have it, why not to use it?

Alec

Yes, with my experience with Global Optimization package (for Maple 10), it gave good results up to about 25-30 variables, close to good for 25-50 variables, and was useless for more than 50 variables. Your case, with 50 variables, still might work - giving not the best possible results, but still good enough.

Why does it cost that much - I also don't understand, because many free packages work much better - say for up to 300 variables.

I would certainly try Matlab - it is not free, but if you already have it, why not to use it?

Alec

Well, what is the usual purpose of plotting and zooming - to visualize the function behavior. Maple does that well (especially Standard) for intervals up to -10^(-15)..10^(-15). Why should it be changed starting from 10^(-16)?

If one needs the y-range from 0 to 2 for some reason, that can be easily specified in the plot command, as y=0..2. Otherwise, without doing that, the plot should work the same as for any other cases, with y-values covering all the interval in which they change on the given x-interval, no more and no less.

Alec

Well, what is the usual purpose of plotting and zooming - to visualize the function behavior. Maple does that well (especially Standard) for intervals up to -10^(-15)..10^(-15). Why should it be changed starting from 10^(-16)?

If one needs the y-range from 0 to 2 for some reason, that can be easily specified in the plot command, as y=0..2. Otherwise, without doing that, the plot should work the same as for any other cases, with y-values covering all the interval in which they change on the given x-interval, no more and no less.

Alec

That can't be done in Maple. With Global Optimization package, maybe - I don't have it to check. There are tons of free libraries (say C++) on the web that can do that though.

Alec

That can't be done in Maple. With Global Optimization package, maybe - I don't have it to check. There are tons of free libraries (say C++) on the web that can do that though.

Alec

For example, one can do

X:=[seq(-1..1,0.1)]:
Y:=[seq(-60..60,6)]:
Statistics:-Fit(A*x^3+B*x,X,Y,x);

                                        -13  3
                -0.142882025058405905 10    x  + 60. x

fnormal(%);
                                60. x

If you want to output the parameter values, that can be done as

fnormal(
    Statistics:-Fit(A*x^3+B*x,X,Y,x,output=parametervalues));

                          [A = -0., B = 60.]

Alec

For example, one can do

X:=[seq(-1..1,0.1)]:
Y:=[seq(-60..60,6)]:
Statistics:-Fit(A*x^3+B*x,X,Y,x);

                                        -13  3
                -0.142882025058405905 10    x  + 60. x

fnormal(%);
                                60. x

If you want to output the parameter values, that can be done as

fnormal(
    Statistics:-Fit(A*x^3+B*x,X,Y,x,output=parametervalues));

                          [A = -0., B = 60.]

Alec

It is an interesting solution because it clearly shows that there is a problem. While drawing a horizontal line is misleading - in particular, in a Calculus class showing students that on small intervals a function graph becomes closer and closer to the tangent line, which has slope -1 in this case.

All recent Mupad versions, I think, included in Matlab.

Alec

It is an interesting solution because it clearly shows that there is a problem. While drawing a horizontal line is misleading - in particular, in a Calculus class showing students that on small intervals a function graph becomes closer and closer to the tangent line, which has slope -1 in this case.

All recent Mupad versions, I think, included in Matlab.

Alec

That happens because scilab does calculations with machine precision, and

cos(x)-x

is constant 1 with that precision on given interval. Same in Matlab and other similar software.

Mupad provides an interesting solution for that, displaying only 1 point instead,

plot(cos(x)-x,x=-10^(-16)..10^(-16));

135_point.png

Alec

That happens because scilab does calculations with machine precision, and

cos(x)-x

is constant 1 with that precision on given interval. Same in Matlab and other similar software.

Mupad provides an interesting solution for that, displaying only 1 point instead,

plot(cos(x)-x,x=-10^(-16)..10^(-16));

135_point.png

Alec

I like the way it looks on the front page:

The Maple 13.01 update is now available. It includes:

Tim Vrablik's blog ...

Alec

If you meant equally spaced intervals, Maple is using seq or $ command for them. In particular, you can do

X:=[seq(-1..1,0.1)];

  X := [-1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.,

        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]

Y:=[seq(-60..60,10)];

    Y := [-60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60]

However, these particular values are not suitable for fitting because the number of elements of X is not the same as in Y.

nops(X);

                                  21

nops(Y);

                                  13

From other point of view, if you want both X and Y be equally spaced, and have more than 3 values, the solution should be linear, i.e. A=0, B=60, Y=60*x.

Alec

If you meant equally spaced intervals, Maple is using seq or $ command for them. In particular, you can do

X:=[seq(-1..1,0.1)];

  X := [-1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.,

        0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]

Y:=[seq(-60..60,10)];

    Y := [-60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60]

However, these particular values are not suitable for fitting because the number of elements of X is not the same as in Y.

nops(X);

                                  21

nops(Y);

                                  13

From other point of view, if you want both X and Y be equally spaced, and have more than 3 values, the solution should be linear, i.e. A=0, B=60, Y=60*x.

Alec

First 55 56 57 58 59 60 61 Last Page 57 of 180