acer

33104 Reputation

29 Badges

20 years, 181 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

It is unclear (to me) what your full requirements are.

The explanation seems incomplete. You could provide a comprehensive set of different input and their desired outputs (just as data, not with calls to the procedure). The guess work is awkward.

Here's one guess:

restart

Test:=overload([
proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
     l2::And({`+`,`*`,`=`, `symbol`,procedure,not(list)},
             satisfies(u->not type(u,identical(:-point)=list))) )
  option overload;
  print("1st proc ",l1," ",l2);
  return NULL;
end proc,

proc(l1::{`+`,`*`,`=`, `symbol`,procedure,not(list)},
     {point::list:=NULL})
  print("2nd proc",l1,"point",point);
end proc
]):

 

l:=3*x+4*y-5;
h:=4*x-8*y = 5;
P:=[3,5]

3*x+4*y-5

4*x-8*y = 5

[3, 5]

Test(l,h)

"1st proc ", 3*x+4*y-5, " ", 4*x-8*y = 5

Test(l,point=P)

"2nd proc", 3*x+4*y-5, "point", [3, 5]

 

Test(h,point=[2,7])

"2nd proc", 4*x-8*y = 5, "point", [2, 7]

Test(l,P)

"2nd proc", 3*x+4*y-5, "point"

Download 2026-02-28_Q_Test_proc_Line_point_inputs_ac.mw

Even though your equations might not have an explicit solution for x in terms of r (except say x=4 when r=0 or something trivial), you could still get a black-box thing like an unevaluated procedure call -- that evaluates to a float upon substitution.

For example, (and this can be tweaked in a few ways, but first let's see if it'd serve...)

restart;

f := x -> (9/10*log10(x-4))*r;

proc (x) options operator, arrow; (9/10)*log10(x-4)*r end proc

g := x -> (1-exp(x-4*r/(3/2)))*r/(3/2);

proc (x) options operator, arrow; (2/3)*(1-exp(x-(8/3)*r))*r end proc

#plots:-implicitplot(f(x)/r=g(x)/r, x=4..10, r=0..10);

# compute x from a given numeric r value
T:=unapply('fsolve(eval(f(x)/:-r=g(x)/:-r, :-r=R),x=4..10)',R,numeric):

T(3);

6.978587592

evalf[20](T(8.2));

9.5047496372174023605

evalf[30](T(40));

9.50478980785497098814747169324

#plot([T(r),r,r=1..10],smartview=false);

# compute r from a given numeric x value
Q := unapply('fsolve(f(x)/:-r=g(x)/:-r, r=1..infinity)',x,numeric):

Q(6.978587592);

3.000000000

evalf[20](Q( T(8.2) ))

8.1999999999999996005

evalf[50]( Q( evalf[50]( T(40) ) ) );

39.999999994124002183861923002652983811493695639841

evalf[100]( Q( evalf[100]( T(40) ) ) );

39.99999999999999999999999999999999999999999999999999999999989026667140350885315187449238910215763468

evalf[20]( T( evalf[100]( Q(5.7) ) ) );

5.7000000000000000000

Q(x);

Q(x)

T(r);

T(r)

expr := Q(x) + sin(x);

Q(x)+sin(x)

eval(expr, x=5);

1.875000000+sin(5)

eval(expr, x=5.0);

.9160757253

Download bbox_ex1.mw

If you think that kind of thing won't suffice then you should explain clearly and in full what it is that you'd hope to do with an explicit formula.

ps. I changed the floats in your originals to exact rationals, so that there wouldn't be up-front loss of precision. It's nicer to be able to see these procedures scale up with Digits.

In Maple 2025.2 (but not Maple 2026.0, for some reason) the following attains from solve with its allsolutions option passed,

restart;

kernelopts(version);

`Maple 2025.2, X86 64 LINUX, Nov 11 2025, Build ID 1971053`

S:=solve(x^Pi=Pi^x, x, allsolutions);

exp(-LambertW(_Z3, -(ln(Pi)+(2*I)*Pi*_Z4)*exp(-(2*I)*_Z1)/Pi)-(2*I)*_Z1)

S2:=simplify(S);

-Pi*LambertW(_Z3, -(ln(Pi)+(2*I)*Pi*_Z4)*exp(-(2*I)*_Z1)/Pi)/(ln(Pi)+(2*I)*Pi*_Z4)

V := indets(S,suffixed(_Z)):

map(getassumptions,V);

{{_Z1::integer}, {_Z3::integer}, {_Z4::integer}}

G := [seq(seq(seq([[a,b,c],evalf(eval(S,[V[1]=a,V[2]=b,V[3]=c]))],
                  a=-1..1),b=-1..1),c=-1..1)]:

H := sort(G,key=(u->u[2])):

map(print,H):

[[0, 0, 0], 2.382179085]

[[0, -1, 0], 3.141592654]

[[1, 1, 1], -3.309169741-1.233783823*I]

[[-1, -1, -1], -3.309169741+1.233783823*I]

[[-1, 1, 1], -2.236894072-.8433058782*I]

[[1, -1, -1], -2.236894072+.8433058782*I]

[[0, 1, 1], -1.344981162-.4160801868*I]

[[0, -1, -1], -1.344981162+.4160801868*I]

[[-1, 0, -1], -.6541516770-0.8849459564e-1*I]

[[1, 0, 1], -.6541516770+0.8849459564e-1*I]

[[1, 0, 0], -.5129851761-.6518680141*I]

[[-1, 0, 0], -.5129851761+.6518680141*I]

[[1, 0, -1], -.1312239018-.4040885036*I]

[[-1, 0, 1], -.1312239018+.4040885036*I]

[[0, 0, -1], .3488068895-.3884928435*I]

[[0, 0, 1], .3488068895+.3884928435*I]

[[-1, 1, -1], 1.047180350-.1618339307*I]

[[1, -1, 1], 1.047180350+.1618339307*I]

[[1, 1, -1], 2.142072723-0.9371241989e-2*I]

[[-1, -1, 1], 2.142072723+0.9371241989e-2*I]

[[0, -1, 1], 3.141592654-0.5641875567e-9*I]

[[0, 1, -1], 3.141592654+0.5641875567e-9*I]

[[-1, 1, 0], 6.368931094-7.945243820*I]

[[1, -1, 0], 6.368931094+7.945243820*I]

[[1, 1, 0], 7.716675056-14.74223466*I]

[[-1, -1, 0], 7.716675056+14.74223466*I]

[[0, 1, 0], 8.504164459-20.47402463*I]

Download s_ex.mw

restart;

kernelopts(version);

`Maple 2026.0, X86 64 LINUX, Mar 05 2026, Build ID 2001916`

TM := module()
  export Cartline,Parmline;
  local Parmvars:=[:-alpha,:-beta,:-rho],Cartvars:=[:-x,:-y,:-z];

  Cartline := proc(p1::list,p2::list,{vars::list:=TM:-Cartvars})
    local l;
    l := (p2[2]-p1[2])*vars[1]+(p1[1]-p2[1])*vars[2]
         -p2[2]*p1[1]+p1[2]*p2[1];
    return l;
  end proc;

  Parmline := proc(p1::list,p2::list,{varp:=TM:-Parmvars})
    local l;
    l := p1+~varp[1]*<p2-p1>;
    return l;
  end proc;
end module:

 

TM:-Cartline([4,3],[-8,4]);

x+12*y-40

TM:-Cartline([4,3],[-8,4],vars=[s,t]);

s+12*t-40

TM:-Parmline([4,3],[-8,4]);

Vector(2, {(1) = 4-12*alpha, (2) = 3+alpha})

TM:-Parmline([4,3],[-8,4],varp=[Lambda]);

Vector(2, {(1) = 4-12*Lambda, (2) = 3+Lambda})


2026-03-26_Q_Module_Generic_Variables_ac.mw

 

nb. I don't know what kinds of indexable structure you might want to use to pass the "variables". So, in the procedure's parameter specification, you could utilize varp::list:=TM:-Parmvars or varp::list(name):=TM:-Parmvars (or several of variants) rather than just varp:=TM:-Parmvars.  I don't know how restrictive you might want to make it.

The discont=true option can work if the fallback value for the piecewise is undefined instead of [] the empty list.

Using Maple 2026.0,

plot_piecewise_march_25_2026_ac.mw

 

Maple 2025.2 and Maple 2026.0 return true (and 0) for these, without any conversion.

You're not doing something wrong; it's a bug, that has since been improved.

restart

kernelopts(version)

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

is(convert(exp(u)/(1+exp(u))^2 = 1/(4*cosh((1/2)*u)^2), exp))

true

simplify(convert(exp(u)/(1+exp(u))^2-1/(4*cosh((1/2)*u)^2), exp))

0

NULL

Download test1_ac.mw

In Maple 2024.2 you could also convert to trigh (ie. change the lhs rather than the rhs).

I've submitted a report on this in the past. But it couldn't hurt (and might help) if you'd like to submit your own bug report against it.

The font used (and possibly also that Component's spacing) is not the same on all of the Windows/Linux/Mac OS's. On my Maple 2024.2 for Linux I can fit 16 numerals into a TextArea with "Visible Character Width" set to 10.

On Linux (at least) the font used for TextArea components is not a fixed-width font, so it matters which characters are used. It's unclear what is meant by "Visible Character Width" in such a context. See lowercase "i" vs uppercase "W".

[edit]
Best solution: fixed-width font that has same size and appearance on all three OS (and if that can't be done in Java, then... oof).
Worst solution: same fonts as now, but a component that adjusts visible width according to its running content.

The SupportTools version shipped in Maple 2026.0 has a flaw that interferes with its Update command.

But it's possible to update the original SupportTools in Maple 2026, from the the MapleCloud via GUI login, or with the Maple command

    PackageTools:-Install(4797495082876928);

And that contains not just the first set of its Library fixes for 2026 but also a fix for SupportTools itself.

ps. I copied this from a response in the Beta users forum.

In 2D Input mode you can get that combination is a few different ways.

You can get it by using command-completion. For example, in 2D Input mode (the default for new users), simply type the keystrokes   Delta   and then hit the Escape key. And then once you have the Greek letter shown you can type Q, etc.

You can also get it in 2D Input mode by selecting the typeset Greek Delta from the palettes. It's available from the Greek palette. And if you'd like you can produce it alone as an output and then select&drag that to your Favorites palette.

Either of those two approaches could be used to produce the following,

Q+`&Delta;Q`

Q+`&Delta;Q`

Download Q.mw

In 1D Input mode (not the default for new users) you could enter that combination as the plaintext code,

    `&Delta;Q`

and you'd see the typeset Greek letter in the output.

ps. I'm not sure what you intend on the left-hand side of your assignment statement. Be careful about using Q followed by an apostrophe unless you right-click on it in the input and turn it into an Atomic Identifier (a mere name). Otherwise you might get it interpreted as a call to diff, ie. diff(Q(x),x), from the prime notation in calculus; and you wouldn't want to assign to that.

Here is a workaround that allows you to use your original call to plots:-display, without having to supply additionally a view option with a manually combined x-range.

I believe you can do this in Maple 2026.0 as well as your Maple 2024.

pic1 := plot(1-cos(t), t=0..2*Pi, coords=polar, redraw=false):
pic2 := plot(1+cos(t), t=0..2*Pi, coords=polar, redraw=false):

plots:-display(pic1, pic2, scaling=constrained);

I suspect that the coords=polar detail in the redrawing information (now stored in the plotting structures pic1,pic2) is being misused under plots:-display. Possibly it expected a polar axiscoordinates to go along with the polar coords, and which you are not using...

nb. The redrawing info was added in part as a means for plot fidelity to improve in situations where the user manually zooms into a plot. But it also gets used under plots:-display, though I'm not sure why that part had to come about. It's documented on the ?plot,options Help-page.

ps. I realize that your example was written to illustrate the issue with display. I expect that you already know that you could form the result directly in a single plot call, eg.
  plot([1-cos(t),1+cos(t)], t=0..2*Pi, coords=polar, scaling=constrained);

I would like to see plots:-setoptions allow redraw=false.

Depending on the order in which the steps are taken, it's possible to get an evaluation like tan(Pi/2) and get held up by a numeric exception. Or sec(Pi/2).

There are also some related aspects, for eval versus limit. (It might not be directly related to this example, but didn't you show some weaknesses in that regard, under dsolve, a few months ago? I mean, they can exist...)

restart;

kernelopts(version);

`Maple 2026.0, X86 64 LINUX, Mar 05 2026, Build ID 2001916`

ode:=diff(y(x),x)*sin(2*x) = 2*y(x)+2*cos(x);

(diff(y(x), x))*sin(2*x) = 2*y(x)+2*cos(x)

ic := y(1/2*Pi) = 0;

y((1/2)*Pi) = 0

K := dsolve(ode);

y(x) = c__1*tan(x)-sec(x)

CV := isolate(K,c__1);

c__1 = -(-y(x)-sec(x))/tan(x)

GV := limit(CV,x=Pi/2);

c__1 = 1

limit(K, GV);

y(x) = tan(x)-sec(x)

Download nm_ode_43.mw

So, there seems to be a limit of 10001 for either dimension, for the browser choice to appear in the context-panel.

The browser itself does not show more than about 1000 pixels wide. So numeric data is being scaled down anyway, by the browser itself.

(My monitor is not 10000 pixels wide, so I'd never be able to see such a browsed huge Matrix unless it did auto-scale behind the scenes, unless I were prepared to use the scroll-bar a great deal. Unscaled, I could never see it all at once.)

But if your Matrix contains numeric data then you yourself could apply ImageTools:-Scale to it beforehand (giving datatype=float to a copy of it, if it doesn't already have it). In such a case you could easily scale it down a max of 1000 or so in the largest dimension. And then you could browse that.

I'm not sure whether you are trying to browse it to see structure, or an "image" of it, etc.

If you scale it down to size 1000 then you could also ImageTools:-Embed that (if float[8]).

restart;

G:=proc(ee,k::posint:=2)
    subsindets(ee,`*`,
               u->`if`(irem(denom(content(u)),k)=0 and
                       member(sqrt(k),[(uu->`if`(uu::`*`,op(uu),uu))(numer(content(u)))]),
                       u*sqrt(k)/%sqrt(k),u));
end proc:

 

1/sqrt(2)*(x+a);
G( % );
value(% - %%);

(1/2)*2^(1/2)*(x+a)

(x+a)/%sqrt(2)

0

-15/sqrt(2)*(x+a) + sqrt(2) + sin(sqrt(2)/2*x);
G( % );
value(% - %%);

-(15/2)*2^(1/2)*(x+a)+2^(1/2)+sin((1/2)*2^(1/2)*x)

-15*(x+a)/%sqrt(2)+2^(1/2)+sin(x/%sqrt(2))

0

-15/7/sqrt(2)*(x+a) + sqrt(2) + sin(sqrt(2)/2*x);
G( % );
value(% - %%);

-(15/14)*2^(1/2)*(x+a)+2^(1/2)+sin((1/2)*2^(1/2)*x)

-(15/7)*(x+a)/%sqrt(2)+2^(1/2)+sin(x/%sqrt(2))

0

1/sqrt(3)*(x+a);
G( %, 3 );
value(% - %%);

(1/3)*3^(1/2)*(x+a)

(x+a)/%sqrt(3)

0

-13/7/sqrt(5)*(x+a) + sqrt(5) + sin(sqrt(5)/20*x) - P(1/sqrt(5));
G( %, 5 );
simplify(% - %%);

-(13/35)*5^(1/2)*(x+a)+5^(1/2)+sin((1/20)*5^(1/2)*x)-P((1/5)*5^(1/2))

-(13/7)*(x+a)/%sqrt(5)+5^(1/2)+sin((1/4)*x/%sqrt(5))-P(1/%sqrt(5))

0

Download unrat01.mw

The word stylesheet is an option of the GraphTheory:-DrawGraph command.

The term Style Set relates to customized character/paragraph attributes, and files to manage them.

In Maple 2026, see the Edit tab in the ribbon, which contains two items:
    Styles
    Manage Style Sets

You can get to the documentation for Style Sets with a query on styleset .

 

ps. If you query just style in the Help-system then the item for this appears a little too far down for my taste.

The What's New pages show for that latest version that the Online Help has been updated.

But the older What's New pages are also there, with a somewhat standarized naming scheme, reflecting that of Topic names in the Help system of Maple proper. 

So it seems like one could query and see which is the highest such that's present.

restart;

for i from 2022 to 2026 do
  if not HTTP:-Get(cat("https://www.maplesoft.com/support/help/Maple/view.aspx?path=updates/v",i))[1]=200 then
    V := i-1; break;
  end if;
end do;
V;

2025

Download online_ver.mw

I don't know when they'll be updated next, or the answers for your two queries 1), 2).

1 2 3 4 5 6 7 Last Page 1 of 344