acer

33485 Reputation

29 Badges

21 years, 53 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

Even if there weren't already another command named freeze it's likely frontend still wouldn't be called that, because that's not its effect.

It's purpose and effect is not to freeze some expression and return that. Rather it performs or applies an action (the first argument), in a sort of surface-only way, where the amount that it sees (unveiled/unfrozen/unhidden/unreplaced) is controllable.

The action it performs is front-end'd, which a way of saying that the action is performed is a front/surface manner. And that's how I've quite often heard developers talk of it, as front-end'ing an action over some expression/arguments., or front-end'ing an operation.

The frontend command can temporarily veil certains terms or types (or temporarily freeze them, or temporarily replace them) while it performs some action.

But the particular mechanism that it just happens to use for the temporary replacement is not the key thing, and so is not relevant to the command's name.

If I create a 3-D animation in my Maple 2026.2, eg,

   plots:-animate(plot3d,[A*sin(x)],A=1.0..2.0);

and then I place focus on it my the left button on my mouse, then my ribbon's top bar shows the "Plot 3-D" tab beside the "Animation" tab.

The Plot 3-D tab lets me fine-tune the orientation, and if I subsequently switch to the Animation tab and hit the Play icon then that chosen orientation is used.

Your first equation doesn't have l^2 stored within it, structuirally. It has l^(-2) in the first term (a product).

So, one way to go about it is to substitute for l^(-2) instead.

subs_err_ac.mw

Do you mean the following kind of thing (which are application of an anonymous operator and anonymous procedure, respectively)?

( (x,y)->x+y^3 )(2,3);
                               29

proc(x,y) x+y^3 end proc(2,3);
                               29

You could use a default value of the second parameter of 10^(-10), to try and conform to what the Wolfram Documentation writes of its Chop command.

In practice I find it more useful to have the tolerance depend on the current working precision, ie. Digits, in Maple. I mean, something like 10.0^(-Digits), or some such.

So, a terser variant than MmaTranslator:-Mma:-Chop might be something like, say:

Chop:=proc(a, b::float:=Float(1,-Digits))
   simplify(fnormal(a,b),':-zero');
end proc:

Chop_ac.mw

ps. I allowed a second parameter b merely so that it might be some float more general than a power of 10. If I only ever needed it as 10^(-Digits) then I might more simply use
     simplify(fnormal(a),':-zero')
I actually use that incantation quite often.

Here are two ways.

The first acts symbolically and gets a closed form for each of f and g (uncoupled). The formulas are simplified before construction of the operators.

The second produces a pair of recursive procedures. They each utilize memoization to avoid duplication of previously computed values, and they each return unevaluated for non-numeric arguments (to avoid an infinite recursion). It's not as fast as is using the simplified explicit formulas.

I also include a commented out code for using Tabulate and getting a shaded header line (but without using a DataTable).

Download test_table_ac2.mw

[edit] For fun, we could do a timing comparison. For computing the values f(n),g(n) for n=1..200, say, the recursive procedures take about 1sec, the unsimplified explicit formulas take about 0.43sec, and the simplified explicit formulas take about 0.22sec. test_table_acc.mw

You could try and throw everything and the kitchen sink at it.

I mean, various forget(...) calls, and even a mild attempt at clearing %,%%,%%% and forcing gc(). The effectiveness of some of those may vary, by major Maple version.

There is a small overhead to invoking all that. But you might get more consistency.

Download Timing_ac1.mw

There are other variants, along similar lines. ie. where you put the forget, options on the Usage call, etc. It's unlikely to get exactly the same timing for repeats of a single small symbolic operation.

If your "operation" to be performed is thread-safe then you could use the Threads package.

If not, you could use the Grid package.

You might be able to use simply the Map or Seq command from those packages, to perform your action in parallel across the outer list, say.

In the absence of details, we cannot distinguish your situation.

It was deleted as a duplicate a central issue of this recent Question thread.

That earlier and recent thread also contains a Reply by the same poster of the deleted item. Indeed the same details are relevent to both threads.

Having an unlinked duplicate Question/Post is unproductive and unhelpful, as it unnecessarily splits the total details and information.

It is a bug that this forum's backend incorrectly sends a note about deletion-as-spam when the item gets deleted-as-duplicate. (Those two distinct actions are separate choices in a moderator menu; but the backend flubs it and sends the wrong message. Other members have also been irritated/offended by this bug.)

Here is one way.

> 

restart;

> 

kernelopts(version);

`Maple 2015.2, X86 64 LINUX, Dec 20 2015, Build ID 1097895`

(1)
> 

vec:=Vector(3, {(1) = 0, (2) = x*z/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))-z*ell__1/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))-x*z/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))-z*ell__2/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2)), (3) = -s*x/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))+s*ell__1/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))+s*x/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))+s*ell__2/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))});

vec := Vector(3, {(1) = 0, (2) = x*z/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))-z*ell__1/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))-x*z/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))-z*ell__2/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2)), (3) = -s*x/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))+s*ell__1/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))+s*x/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))+s*ell__2/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))})

(2)
> 

G:=proc(u, T::anything:=simplify) local P,Q;
           Q:=remove(type,[ifelse(denom(u)::`*`,op(denom(u)),denom(u))],constant);
           P:=( s->s=freeze(s) )~(Q);
           thaw(collect(eval(numer(u),P)/eval(denom(u),P),rhs~(P),T));
end proc:

 

> 

G~(vec);

Vector(3, {(1) = 0, (2) = -z*(ell__2+x)/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))-z*(ell__1-x)/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2)), (3) = s*(ell__2+x)/((s^2+z^2)*sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2))+s*(ell__1-x)/(sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)*(s^2+z^2))})

(3)
> 

simplify(vec-%);

Vector(3, {(1) = 0, (2) = 0, (3) = 0})

(4)
> 

G~(vec, expand);

Vector(3, {(1) = 0, (2) = (-ell__2*z-x*z)/(sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2)*(s^2+z^2))+(-ell__1*z+x*z)/((s^2+z^2)*sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2)), (3) = (ell__2*s+s*x)/(sqrt(ell__2^2+2*ell__2*x+s^2+x^2+z^2)*(s^2+z^2))+(ell__1*s-s*x)/((s^2+z^2)*sqrt(ell__1^2-2*ell__1*x+s^2+x^2+z^2))})

(5)
> 

simplify(vec-%);

Vector(3, {(1) = 0, (2) = 0, (3) = 0})

(6)
> 

 

Download Maple_example_ac.mw

I suggest that, with a simple correction to your choice of location, the with(...) package loading should work without having to append to libname either in your session or in an .ini initialization file.

The "toolbox" location can work like that, but the files should go into a "lib" folder that resides under the package-folder. For example,
   "Cliffordlib/lib"
instead just "Cliffordlib", for the bottom-most location of the library archive files.

The first portion you can get/check using the Maple command,
    cat(kernelopts(homedir),"/maple/toolbox")

Then completely close Maple and all its GUI instances. Then relaunch, and tell us whether you can load your package using the with(...) command, but without having to adjust libname at all (either manually in the sesssion, or within an .ini file).

 

ps. Library archives used to come in a pair of files, eg. "foo.lib" and "foo.ind", but in modern Maple that is done using a single file named "foo.mla". If you don't have the original source files, and if it works ok, then you could just leave it.

There's always room for improvement in the algorithm that selects methods and results. (A real-valued result that's continuous for real x has quite a bit of appeal...)

> 

restart;

> 

interface(version);

`Standard Worksheet Interface, Maple 2026.1, Linux, April 28 2026 Build ID 2011354`

> 

int(D(tanh)(x),x,method=derivativedivides);

tanh(x)

> 

int(D(tanh)(x),x,method=parallelrisch);

tanh(x)

> 

int(D(%tanh)(x),x);

%tanh(x)

> 

simplify(combine( int(D(tanh)(x),x) )) assuming real;

((1/2)*I)*Pi+tanh(x)

Download some_integral.mw

The running-icon for my Maple 2026.1 was just a generic gear icon in my Ubuntu 24.04 LTS. I've now solved that issue.

I edited the already existing file from an earlier version's installation,
    /usr/share/applications/maple2024.desktop

I added to that file the line,
    StartupWMClass=com-maplesoft-application-Launcher

Strangely, editing that particular file doesn't make the running-icon be the blue-maple-leaf, for my Maple 2024.2. But it does, if I launch my Maple 2025.2 or Maple 2026.1.

I didn't know what to set the StartupWMClass item to, originally. But then I looked here.

I usually don't bother checking the box to add it to the Desktop, when I install Maple. I'd expect that doing so would get me the basic maple2026.desktop file. And to that I could add the StartupWMClass item (as above) if it were missing.

So now it works properly for my Maple 2026.1 (and Maple2025.2) as well. I simply copied that .desktop file from an older install, and then edited its version numbers, and added the StartupWMClass item which I described above.

How about plotting the absolute difference?

> 

restart;

> 

Digits:=15:

> 

forget(evalf); forget(`evalf/int`);

CodeTools:-Usage(
  plot(a->(u->log[10](abs(u)))(Int(unapply(sinh((Pi-a)*x)/(cosh(Pi*x)*sinh(a*x)), x),
                                    -100 .. 100, epsilon = 0.1e-8, method = _Dexp)
                                -Int(unapply(sinh((Pi-a)*x)/(cosh(Pi*x)*sinh(a*x)), x),
                                    -10 .. 10, epsilon = 0.1e-7, method = _Dexp)),
       0 .. 2*Pi, adaptive = false, numpoints = 200,
       axis[2] = [tickmarks = [seq(i = sprintf("%1.0e", 10.0^i), i = -16 .. 3)]],
       thickness = 2, view = -16 .. 3, size = [600, 400])
);

memory used=189.61MiB, alloc change=68.00MiB, cpu time=2.07s, real time=2.09s, gc time=93.51ms

Download testint3_acc.mw

Another way,

sort(sigma+i*t,sigma):

plots:-textplot([2,3,Zeta(sigma+i*t)=Sum(1/n^(sigma+i*t),
                                         n=1..infinity)]);
1 2 3 4 5 6 7 Last Page 1 of 348