acer

32343 Reputation

29 Badges

19 years, 327 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

I thought that Maximize/Minimize passed options through (here, to NLPSolve).

acer

The value x=0.68 returned from Optimization:-Maximize(y,x=0..1) is a local optimum. The graph of y, plot(y, x=0..1), shows that.

y := 3*cos(4*Pi*x-1.3)+5*cos(2*Pi*x+0.5);
plot(y, x=0..1);
Optimization:-Maximize(y,x=0..1,method=branchandbound);
plot(y, x=0..0.1);

acer

These two examples below work for me in Maple 8,

plot(surd(x,3),x=-2..2,thickness=3);
with(plots):
a:=1:
implicitplot(surd(x^2,3)+surd(y^2,3)=a^(2/3),x=-a..a,y=-a..a);

acer

These two examples below work for me in Maple 8,

plot(surd(x,3),x=-2..2,thickness=3);
with(plots):
a:=1:
implicitplot(surd(x^2,3)+surd(y^2,3)=a^(2/3),x=-a..a,y=-a..a);

acer

If you read the help-page root, you'll see that it  returns the "principal root", defined by the formula root(x,n) = exp(1/n * ln(x)). The help-page ?^ also summarizes this. In your example, x^(1/3) acts like root(x,3). For example,

> (-1.0)^(1/3);
                         0.5000000001 + 0.8660254037 I
 
> root(-1.0,3);
                         0.5000000001 + 0.8660254037 I

The complex values don't show up on your graph, as they are not numeric (real).

On the other hand, surd returns -(-x)^(1/n) for x<0 when n is an odd integer. See its help-page. So for your plot, try,

plot(surd(x,3),x=-2..2,thickness=3);

Reading the help-pages is generally a good idea.

acer

If you read the help-page root, you'll see that it  returns the "principal root", defined by the formula root(x,n) = exp(1/n * ln(x)). The help-page ?^ also summarizes this. In your example, x^(1/3) acts like root(x,3). For example,

> (-1.0)^(1/3);
                         0.5000000001 + 0.8660254037 I
 
> root(-1.0,3);
                         0.5000000001 + 0.8660254037 I

The complex values don't show up on your graph, as they are not numeric (real).

On the other hand, surd returns -(-x)^(1/n) for x<0 when n is an odd integer. See its help-page. So for your plot, try,

plot(surd(x,3),x=-2..2,thickness=3);

Reading the help-pages is generally a good idea.

acer

They say that imitation is the sincerest form of flattery. This, from 2 months later, is close.

acer

It might not be at all related to this problem reported above (with a busy CPU while Maple's GUI is sitting idle) but a pair of news items recently reminded me of this thread.

One is mention of apparent special use of some OSX API by applications. The slashdot commentary is more balanced.

The other is mention down at the end of a blog entry by Wolfram's Director of Software Technology about work with Apple. Who knows what it means.

acer

Could you apply the freeze by hand, instead of letting frontend do it?

> z := a*f(x)+b*g(y)+c*x+d*y:
> thaw( value( subs( f(x)=freeze(f(x)), Diff(z,f(x)) ) ) );
                                       a

> thaw( value( subs( theta(t)=freeze(theta(t)),
>                    Diff(cos(theta(t)),theta(t)) ) ) );
                                -sin(theta(t))

acer

Could you apply the freeze by hand, instead of letting frontend do it?

> z := a*f(x)+b*g(y)+c*x+d*y:
> thaw( value( subs( f(x)=freeze(f(x)), Diff(z,f(x)) ) ) );
                                       a

> thaw( value( subs( theta(t)=freeze(theta(t)),
>                    Diff(cos(theta(t)),theta(t)) ) ) );
                                -sin(theta(t))

acer

I realized that an obvious improvement would be to generate each try's initial point inside a complex hyperbox specified by the user.

As originally written, each initial point is taken from the hyperbox [-1.0-1.0*I..1.0+1.0*I]'^n or [-1.0..1.0]^n. That's going to be weak in general, as the set of points in the box might be distinct from the set which converge to some roots.

In a related way, it would be an improvement to allow the user to supply the bound of those boxes, in order to also be able to search only for roots lying inside it.

So an additonal optional parameter, a list of Maple ranges, could specify the box used for both those purposes. For each dimension, the ends of the range could specify the lower-left and upper-right (possibly complex) corners.

Picking a finite box well, when not specified in the arguments, will be tricky.

acer

The question of how the Array will eventually get used it important here.

Do you want to shift the costs to element assignment time, or access time? Do you want to pay efficiency costs in access/assignment time or in storage? Do you expect most or few entries to get accessed/assigned at some point?

I believe that rtable indexing-functions are flexible enough (sometimes with ingenuity required) to control those aspects and to choose where to put the cost.

acer

I posted a routine for this here.

acer

I posted a routine for this here.

acer

Hi Axel,

I was interested in this method for a few reasons. But none of those is a really sharp focus, so the blog entry serves as a rough reminder to me too! Here are some of those points of interest for me:

It's supposedly the method that the Matlab `roots` function uses, I think. It can give an idea of the conditioning of roots, which isn't something that one sees often. It uses a technique very similar to that used by RootFinding:-BivariatePolynomial, which is functionality that I like (it can find all the roots!) but who's source code might be made much more efficient, I suspect. I think that the technique and theory is neat, even if it'll never be the fastest in Maple or the most robust method around.

I just like polynomial rootfinders.

acer

First 547 548 549 550 551 552 553 Last Page 549 of 592