acer

29909 Reputation

29 Badges

18 years, 207 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@fnavarro This problematic example has been reported on the Maplesoft Beta forum and entered into the bug database.

Preben, if I'm not mistaken then in Maple 2023.2 the following causes the plot command to behave as if adaptive=true were default; ie. avoid adaptive=geometric unless it is explicitly supplied as option.

   _EnvUsePlotThing := false:

I mention it because IIRC you previously had some interest in an override, eg. something that could go in a personal initialization file.

(I found that environment variable set in the source of `plots/animate`, I suppose for construction speed.)

@WD0HHU AFAIK there is no property of a slider (even hidden) which controls the size of the font of the mark values on a Slider.

@dharr I agree it's special (only three distinct roots), but I'm not sure how far the coincidence runs. I was wondering whether any of the special-ness relates to allvalues(u1) going awry.

(Also, it isn't clear to me whether the OP's image is complete or chopped, nor why/how the OP might consider the root in the image to be The One.)

For interest,

restart;

u1 := RootOf(4*_Z^2 + (4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1) - 4)*_Z
             + 4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1)^2
             - 4*RootOf(60*_Z^3 - 60*_Z^2 + 15*_Z - 1) + 1):

 

evalc([solve(evala(Minpoly(u1, x)), x)]);

[(1/3)*cos((1/3)*arctan(3/4))+1/3, -(1/6)*cos((1/3)*arctan(3/4))+1/3-(1/6)*3^(1/2)*sin((1/3)*arctan(3/4)), -(1/6)*cos((1/3)*arctan(3/4))+1/3+(1/6)*3^(1/2)*sin((1/3)*arctan(3/4))]

evalf(%);

[.6590276223, .1090390090, .2319333686]

 

p := evala(Minpoly(u1, x));

x^3-x^2+(1/4)*x-1/60

solve(p, x, explicit=false); # that friend

RootOf(60*_Z^3-60*_Z^2+15*_Z-1)

Download RO_exB.mw

@dharr I don't see that this Answer's results are correct.

@dharr I plan to submit one bug report for that weakness in simplify (of the form with the pesky sqrts), and another for the failure of allvalues on the original RootOf.

So is it the case that you want to find values of the parameters sU and sV such that u(bV)=betaU and v(bV)=betaV?

You have some coding miskakes. eg. you don't provide a mechanism to force shootNL to return just one of u(bV) or v(bV), upon request. Such mistakes can be corrected, but I think perhaps you ought to provide an extra detais:

1) How close to u(bV) and v(bV) have to be to betaU and betaV, for you to accept the parameter values?

2) Why do you think that there is a solution in the narrow ranges you gave?

@C_R For plot3d an alternative to the color option is the colorscheme option. It has some fancy functionality, as well as some simple things such as using just a ColorTools Palette name (Maple 2023),

plot3d(argument(re+I*im), re=-2..2, im=-2..2,
       colorscheme="turbo", grid=[100,100],
       style=surfacecontour, lightmodel=none,
       labels=[Re(z),Im(z),``], orientation = [-90, 0, 0]);

I'm not sure whether your forced orientation is because you want only a 2D effect. If that's so then in Maple 2023 you could also do something like,

with(plots):
display(
  densityplot(argument(re+I*im), re=-2..2, im=-2..2,
              restricttoranges=true, grid=[100,100],
              colorscheme="turbo", style=surface),
  contourplot(argument(re+I*im), re=-2..2, im=-2..2,
              grid=[100,100], thickness=0.5,
              color=black, colorbar=false),
       labels=[Re(z),Im(z)], axes=box, size=[550,500]);

ps. Unfortunately densityplot doesn't accept style=surfacecontour, hence the accompanying call to contourplot.

@Art Kalb I don't know what kinds of expression you might have in general, ie. whether there might be other symbolic powers or functions of xi. But the case discussed so far can have a K*xi^0 term handled as follows.

restart;

 

expr := a*xi^2 - b*xi^4 - c + d/xi^4;

a*xi^2-b*xi^4-c+d/xi^4

map(t->H(degree(t,xi))*t, expr);

H(2)*a*xi^2-H(4)*b*xi^4-H(0)*c+H(-4)*d/xi^4


If you actually wanted to see the inert powers:

F := proc(t) local d:=degree(t,xi);
       H(d)*coeff(t,xi,d)*xi%^d;
     end proc:

 

alt := map(F, expr);

H(2)*a*`%^`(xi, 2)-H(4)*b*`%^`(xi, 4)-H(0)*c*`%^`(xi, 0)+H(-4)*d*`%^`(xi, -4)

value(alt);

H(2)*a*xi^2-H(4)*b*xi^4-H(0)*c+H(-4)*d/xi^4


If expr were not a sum of terms, ie.  type(expr,`+`)=false
then one could apply the transformer to it direrctly.

Download repl_ex4.mw

The dummy mechanism I used for my applyrule approach could be used also for the subsindets approach (instead of freeze/thaw).

As mentioned, I did it two ways on purpose.

expr := xi - xi^2 + 1/xi^3 - 1/xi;

xi-xi^2+1/xi^3-1/xi

eval(subsindets(expr,identical(xi)^integer,
                u->(H*__P)(op(2,u))),
     [xi=H(1)*xi,__P=(u->xi^op(u))])

H(1)*xi-H(2)*xi^2+H(-3)/xi^3-H(-1)/xi

Carl's idea to use temp name for xi is shorter than my use of temp __P calls for storing k the exponent. And such a modification can also shorten my earlier applyrule solution:

expr := xi - xi^2 + 1/xi^3 - 1/xi;

xi-xi^2+1/xi^3-1/xi

eval(applyrule([xi^(k::integer)=H(k)*__P^k],expr),
     __P=xi);

H(1)*xi-H(2)*xi^2+H(-3)/xi^3-H(-1)/xi

The temporary name (whether __P or %xi or what have you) is used to avoid the infinite recursion.

@Carl Love Right, one subsindets call can clearly do both steps. Thanks. (My mind was on whether I could do much better than the freeze/thaw to avoid the infinite recursion, rather than how I delivered it...)

The OP hasn't yet explicitly asked why the endless loop occurred for him. I expect it's just that he was seeing the applyrule or subsindets action being re-applied to the new xi^k instances in the inserted H(k)*xi^k expressions, over and over.

I tried to make it fun by having my subsindets approach bypass the recursion using freeze, while my applyrule approach used the dummy __P.

It's still not entirely clear to me whether the OP wants an original xi=xi^1 and xi^(-1) handled, etc.

@vv You could get by with,

   <seq(`<|>`(seq(M[i])),i=1..2)>

@C_R You may have misunderstood me. I was not suggesting that you use a projected map of the Earth as image, or anything else as large, complicated, or hard to find as that.

I just intended this suggestion as a quick and easy way to get going with testing of a variety of pre-made, low-resolution patterns.

For example one could quickly use the Read and Scale commands of the ImageTools package, combined with the image option of the plot3d command. That Read command works with a URL for the string/name, so pattern images from the web may be tried.

Once you find a simple pattern that's effective for your task you might write the Maple code that produces it (or something akin to it).

@RezaZanjirani I can, but not for a few days.

@nm I don't understand why you chose your initial example, as opposed to your followup example.

First 7 8 9 10 11 12 13 Last Page 9 of 547