acer

32343 Reputation

29 Badges

19 years, 326 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@janhardo Your call,

   FSimp(e3, 15,2, 0 <= u)

does not make sense, given the parameter specification of that section's version of FSimp.

That problematic call is passing 0<=u for the sort_by_complexity parameter of FSimp, which is likely not what you intended. You likely intended it for the assumption parameter, but you omitted arguments for some earlier positional parameters and so it was misplaced.

That parameter specification of FSimp using positional parameters is poor, ie. it's confusing and awkward enough that it even confused its own author. Why not use keyword parameters for options?

Does the GUI lock up for this large output with typesetting=standard, and without any timelimit call?

@Andiguys I you run solve without assumptions you get a parametric result showing conditions under which the simpler forms of the inequality (with isolated target name) attain.

You might figure out whether the conditions for those agree with your assumptions. If not then a single sign/direction of the the simpler isolated inequality might not hold for your given assumptions. I don't know what you'd want in such a case.

Please attach your actual code to reproduce in full.

Your example works smoothly for me using Maple 2022.2 (no initialization file, no extra libraries...).

@mmcdara By the time it gets the `minimize/solve` the problem's been reformulated in exact rationals. However some RootOf's with float-range specifiers can still be generated.

The code-flow is slightly different, but in M2022 it's running into this (fwiw):

allvalues({x = 1/3*RootOf(7*_Z^3-279*_Z^2+2943*_Z-5049,14.92337354 .. 14.92337355), y = 1/3*RootOf(7*_Z^3-279*_Z^2+2943*_Z-5049,14.92337354 .. 14.92337355)},implicit)
Error, (in RootOf/RootOf:-algnum_in_range) invalid input: RootOf/RootOf:-rootof_in_range expects its 1st argument, rt, to be of type 'RootOf'(polynom(rational,_Z),identical(index) = posint), but received RootOf(7*_Z^3-93*_Z^2+327*_Z-187)

The _EnvExplicit=true makes it take a different code-path.

@mmcdara The Question was marked as Maple 2022.

fwiw, one may also use "" the empty string, i.e., a pair of double-quotes.

(I consider it a very slight advantage to use here something which might not be assigned a value.)

@Ronan That's right. I did not suggest placing the "\n" inside capitalized Typeset call.

As I mentioned, the lowercase typeset serves to allow math and text together (without a new comma visibly appearing to separate them). It doesn't even do anything by itself, but plotting commands turns its unevaluated function calls into a slightly differently named plotting substructure that the plot renderers (without added commas or text quote marks).

The "\n" is simply an example of such a string. It just happens to only contain a newline character in this example. Some other example might be, say,

  typeset("The integral is,\n", int(f(x),x=a..b))

In contrast a call Typesetting:-Typeset is one way to turn a name or math expression into a form that renders the same but won't later evaluate to some value. There are other ways to do that, eg. using the documented InertForm:-Display, or the undocumented `tools/gensym` to produce a new local instance of a name.

The lowercase word `typeset` was not a great design choice. It bothers me more that (by itself) it offers no evaluation prevention, and that it's Help page doesn't explain all this.

@Ronan Could you perhaps get some extra vertical spacing using newline characters, ie. with something simple like,

  typeset("\n", gamma2)

or,

  typeset(gamma2, "\n")

(or both above and below), though I'm away from a machine and forget whether the quote marks might show.

@Andiguys Sorry, I don't have time to fix so many worksheets.

I notice that several of your mistakes keep cropping up, despite previous corrections.

I suggest that you strive to properly understand what's been shown so far, so that you can correct most of these problems yourself.

You have,

exact_solution := (t, x_i) -> 2*Pi*p*sum(etan(n)*exp(-n^2*Pi^2*p*t)*n*sin(n*Pi*x), n = 1 .. infinity)/(eta0 + sum(etan(n)*exp(-n^2*Pi^2*p*t)*cos(n*Pi*x), n = 1 .. infinity))

What does the `x` mean in that, inside sin(n*Pi*x) and cos(n*Pi*x) ?

Did you instead intend, say,
   sin(n*Pi*x_i) and cos(n*Pi*x_i)
?

@janhardo 

expr := 2*sin(beta)^2+4*cos(alpha+beta)*sin(alpha)*sin(beta)+cos(2*(alpha+beta));

2*sin(beta)^2+4*cos(alpha+beta)*sin(alpha)*sin(beta)+cos(2*alpha+2*beta)

combine(expr);

cos(2*alpha)

@Scot Gould There is special code inside plots:-display to merge an "array" of 2D plots into a single PLOT construct. It serves this special case of wanting to export a collection like this in a single image file. Having the plot device set to an external image driver flips this on.

In order to do this the individual 2D plots are all shifted, and their tickmarks faked as textplots at mapped locations.

However, that shifting manipulation also turns the float tickmark values into names, eg, `-1.0` etc. And that makes them render in italics. That is likely why there is confusion about which fonts are being used.

Here's one workaround, using the previous code, to get usual upright Roman tickmark values instead. You also use the usual font option, see attached.

Note that I use .png image format for the export (which I find often like more).

I've used String@parse here, to turn those names-of-floats back into string text, but there are also Typesetting (or more careful) alternatives to re-manipulate those tickmark values (in TEXT substructures...).

restart;

with(plots):

P := seq(plot(x^n, x=-1..1, color=ColorTools:-Color([1/n, 1-1/n, 0]),
              size=[800, 400]), n=1..4):

Q1 := display(P[1], P[3]):
Q2 := display(P[2], P[4]):

here := cat(kernelopts(homedir), "/mapleprimes/example.png"):

plotsetup(png, plotoutput = here):
   G := display(< Q1 | Q2 >):
   #G := display(< Q1 | Q2 >, font=[Times,16]):
   subsindets(G,And(name,satisfies(u->parse(u)::numeric)),String@parse);
plotsetup(default);

restart;

here := cat(kernelopts(homedir), "/mapleprimes/example.png"):

img := ImageTools:-Read(here):
ImageTools:-Embed(img);

 

 

Download disp_ac.mw

ps. If you execute,
   display(G,axes=box);
after resetting the device with plotsetup(default) then you can see how the single PLOT is faked.

The server indicates that your first attachment is not accessible for download. I suspect that it's the filename. Could you reattach the first file, but using a different filename with no special characters like "+"?

First 33 34 35 36 37 38 39 Last Page 35 of 592