## Why is map slower than ~?...

For a list containing at least one element,

F~(list0); # element-wise

is (almost) equivalent to

map(F, list0);

However, it seems that in practice, using ~ can be faster than its equivalent map version.
Here is a typical test:

 > restart;
 > w := [$](0 .. 1e4): x := [$](0 .. 2e3): y := [$](0 .. 3e2): z := [$](0 .. 4e1):
 >

# Compute a generalized outer product of  and  without using the inefficient ArrayTools:-GeneralOuterProduct.

 >

memory used=282.53MiB, alloc change=0.59GiB, cpu time=21.67s, real time=7.41s, gc time=17.33s

 >

memory used=230.48MiB, alloc change=-4.00MiB, cpu time=23.26s, real time=8.67s, gc time=17.71s

 > evalb(p2 = p4);

 >

Download ~_and_map.mw

But I cannot find any explanations in Comparison of element-wise operators and map function or Difference between 'map' and '~' (element-wise operation). Does anyone know why?

## problem translating string to latex. Using standar...

The standard way of writing quotes and double quotes in LaTeX is with  and ''

So a string should be translated to Latex using the_string' '  and not the_string"  which is what Maple does.

see for example this

For example, Maple translates  "regular" to

"\text{regular\"}"

It should be

"\text{regular' '}"

i.e. instead of closing it on the RIGHT with string quote  \"  it should close it with two upticks, like this ' '

Hard to see the differene here, so here is screen shot

s:="regular";
latex(s,output=string);
lprint(%)

The difference will show up depending on what font one is using. Here is an example below where when using different font, the effect is now visible.

\documentclass[12pt]{book}
\usepackage{amsmath}

\usepackage[T1]{fontenc}
\usepackage{mlmodern}

\begin{document}

\text{regular"}

\text{regular''}

\end{document}

The first one above is what Maple generates, the second one is what it should have been. Compiling with luatex gives this pdf, You can see clearly the difference now

It is important to note that this behavior shows depending on font used. For example, this code

\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}

\text{regular"}

\text{regular''}

\end{document}


When compiled gives

So to be safe, it is better to always use the standard   ....' '   and not  .... \" because it then works the same for different fonts being used.

So, would it be possible to make Maple generate quoted string using the standard latex by closing it with ' ' instead of \"  ?

## how to make singular use same letter Z for integer...

the command singular can return results with _Z or _N as it says in help

The singular function may return expressions prefixed by _Z or _N, representing the integers and positive integers, respectively.

But it changes these letters by adding different number at the end for each call., Yet they all mean the same thing, which is an integer:

singular(1/sin(x),x)
{x = Pi*_Z1}

singular(x/sin(x),x)
{x = Pi*_Z2}

singular(x^2/sin(x),x)
{x = Pi*_Z3}


This makes it little hard when I try to make union of these results to only keep the unique singular points, since they are different symbols, yet they are really the same: integer times Pi.

Is there an option to tell Maple to use _Z for everything? And not keep adding new numbers each time it is called?

May be clear some internal memory table after each call?  Otherwise, I have to add more code to parse all these results and convert all _Znnn to just _Z  if it is there in each result, after each call is made.

Same issue for _N

Update

expr:=1/(sin(x)*cos(x)*tan(x));
s := singular(expr, x);

expr:=1/((x-1)*sin(x));
s := singular(expr, x);

expr:=1/(sin(x)*cos(x-Pi/3)*tan(x));
s := singular(expr, x);


In all the outputs above, I'd like to have same _Z show up. This will make it easier for postprocessing later on. Best solution will be to tell Maple itself not to change _Z if possible, otherwise one will need to add code to do this afterwords for all possible cases.

## Why can't the commands in these document blocks be...

ODE for electrical circuit (right click on Documentblock, unselect show command does not work. Command still visble)

 (1)

ODE for motor (toggle Documentblock, unselect show command is only effective on equations  3 and 4)

 (2)

Isolate  and taking the derivative

 (3)

 (4)

## strange characters in Maple's code editor on .mpl ...

in Maple 2023 one can do File->Open and select an .mpl file and that will automatically open in new window using code editor.  see Maple2023-CodingTools.pdf

One problem I saw right away on windows 10, is that the diagonstic window has funny character at the end of the messages. Here is screen shot

To see if you reproduce this, here is the code I used. Simply save this in foo.mpl file and then use Maple file->open to open it (must use 2023 only for this to work)

A_class :=module()
option object;

#my variable
export c::integer;

export a::integer;

end module;


That is not all. If I simply shift the code up so the starting line in the file is not empty as above, the funny characters change to something else

Yet, it is the same exact code.  Can any one confirm this problem, and how to fix it so one can read the variable name?

I think I will stick to using notepad++ for my .mpl files for now.

## Task insertion doesn't work anymore....

Hi MaplePrimes,

I've updated to the 2023 version of Maple. After the update I chose to remove older version folders in Windows.

Since then I cant't use my tasks any longer. I've re created the tasks and the are also shown in the Task Palette, but clicking on a task results in nothing. I can though create a new Task and after the creation all my tasks can then be used again.

Its like Maple doesn't recognize the correct Help Database from the beginning. I've reinstalled Maple 2023 two or three times to try to reset the whole installation to something from scratch. Nothing that I do seems to produce the desired result. Does anybody out there have a solution or suggestion to a probable solution?

I don't know of any file that I could attach to exemplify my problem. It's not a math/maple problem relating directly to the maple code language. My tasks themselves work fine once inserted in a document. It's the insertion itself that's the problem.

Thanks.

## is it possible to identify mserver.exe in task man...

I always run with the option "create a new engine for each document". which is a very nice feature in Maple.

The problem is that, when I have say 5 worksheets open and running, and one of them them hangs, I need to kill mserver.,exe from the task manager which is running this worksheet.

most of the times I end up killing the wrong mserver.exe. I can sometimes guess by the CPU it is using. But if I have two running with high CPU it is not possible guess.

There is no ID or anything associated with the name. It will be nice if each process has in its name an ID which is also displayed in the worksheet bottom bar so one knows. This ID could be simply some random number. So the display will show  mserver-13847,exe ,   mserver-82739,exe and so on. And this name will be automtically displayed at the bottom bar of the worksheet where all time used, cpu used and memory used and so on is now displayed.  This will be a nice feature to add to Maple.

If this is not possible, how about just displaying the PID (process ID)  of the mserver.exe connected to the worksheet in the bottom bar? This will also work, as task manager/details lists a processes with the PID there, so it will make it easy to find.

Meanwhile, while waiting for Maple 2033 to hopefully implement this feature, does anyone know of a method to help find which mserver.,exe is connected to which specific worksheet?

Windows 10.

## int displays large output on the screen on same co...

Do others see this problem? I do not understand what is going on. I am seeing this problem on many integrals

restart;
int(integrand)
#Large output displayed
#echo the input
int(...)
#Large output displayed
#echo the input
int(...)
#echo the input only. Large output gone
int(...)
#echo the input only. Large output gone

restart;
int(...)
#Large output displayed
#echo the input
int(...)
#echo the input only. Large output gone
int(...)
#echo the input only. Large output gone



In all the above, it is the same command used.

i.e. first time (sometimes needs two times), Maple displays large out. But looking at the end of this output, the very last line, we see the same integral/command is returned.

But second time and any attempt after that, it no longer gives that large output, but returns back/echos the command on the screen only.

Attached is worksheet showing this. This is new behaviour in Maple 2023 and I am baffled by it. Do others see it? Why does it happen. I will report it if others confirm it. I just wanted to make sure first it is not just me seeing this.

Is it possible the large output is side effect and is being printed by error to the screen by internal Maple code? But why does it stop the second/third time?

 > interface(version);

 > restart;
 > int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 > restart;
 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

Warning, if e is meant to be the exponential e, use command/symbol completion or palettes to enter this special symbol, or use the exp function

 > int((b*g*x+a*g)^2/(A+B*ln(e*(d*x+c)/(b*x+a))),x)

 >
 >

Update

Do you want to see something more bizzar? Try this command on same integral

restart;
res:=int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE)


It prints to the screen results with ~ all over. But this seems to be internal leaked output and not part of the actual output returned.

By issuing the command as follows instead

restart;
res:=int((b*g*x+a*g)^2/(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE):


notice the at the end!  I still see the same output as above printed displayed.

This tells me this is a leaked printout from an internal integration function.

Could others confirm this?

## why Maple 2023 return "undefined" embbeded inside ...

First issue I see in Maple 2023 integrate

Example 1

restart;
int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)


Example 2

restart;
int((1+x)^(3/2)*(x^2-x+1)^(3/2),x);


Example 3

restart;
int((c*x^4+b*x^2)^(3/2)/x^(3/2),x)


Worksheet below for 2023 and also for 2022.2 showing this did not have this problem in 2022.2. Internally for me, this cause other problem when post-processing this, that is why I found it. Any one knows what caused it?  Maple 2022.2 result is much longer, but it does have this "undefined" issue in the result.

 > interface(version);

 > restart;
 > int( (e*x+d)^(3/2)*(c*x^2+a)^(3/2),x)