## mint message little not clear. Local variable not ...

Do you think the following messages  by mint should have been the same? this is just some made up example with no purpose other than to show the messages.

```foo:=proc(x)
local z,a:=1,la;
patmatch(x,a*x,'la');
map(z->assign(z),la);
end proc;

boo:=proc(y,x)
local Z,RHS;
RHS:=y(x);
subs(y(x)=Z,RHS);
end proc;```

Looking at the above, foo() has z used but never assigned a value, right?  And in boo(), Z is used but never assigned a value.

but mint gives slighlty different message

```"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2  A.mpl

Procedure foo( x ) on lines 2 to 6
These local variables were never used:  z

Procedure boo( y, x ) on lines 8 to 12
These local variables were used but never assigned a value:  Z
```

Should not these two messages have been the same?

## Any way to increase the number in the list of Rece...

Recent documents shows the last 10 files you've opened.  Any way to increase that to something like 20 or 50?

## 3 unknowns, 1 matrix, and 1 variable ...

Dear everyone,

Ive been looking at this problem ive got, but i cant find out what would make it work. I can put numbers in a matrix, i can solve 3 unknowns with 3 equations. But now there is a variable, and the variable causes the solution to give either: 1 solution, no solution, or more than one solution.

I can "brush the matrix" as they say it in Dutch, but im learning Maple so it can go a lot faster than manual labor. So is there a way to do it with Maple?

Figure 4.1 gives from left to right: 1 solution, no solution, and an indefinite amount of solutions.

Questions: For what value of p, a. gives 1 solution? b. gives no solution? c. gives more than 1 solution?

Now i got Maple to tell me how much p x1, x2, and x3 was, but its not bringing me anywhere to where i can get to a solution.

A manual method is given in this example. Manual is way way to slow for what i need to achieve, ive got some large big books with mechanics, dynamics, statics, fluid mechanics, concrete calcutions, chemistry etc. waiting for me. I can never achieve that manually in the same time as i could do it with maple. :S

 > #example of how to do a solve of a matrix with 3 variables:
 >
 (1)
 >
 (2)
 > #now the example number 15
 >
 (3)
 >
 (4)
 >

Thank you!

Greetings,

The Function

## The floor brackets are not displayed on plots -- w...

Hello.

If I input 'floor(5.5)' in Maple 2018 I get the expected \lfloor 5.5 \rfloor thing.  I mean, with the special brackets typical for the floor notation.

However, if I try to place the floor notation onto a plot I get literally the string "floor(5.5)".  As in

textplot([2, 2, 'floor(5.5)'])

The ' ' quotation marks ensure the delayed evaluation but I do not get the floor parentheses!

Interestingly,

textplot([2, 2, 'sqrt(5.5)'])

outputs the radical notation as expected.

How come I cannot produce a plot with the floor brackets notation in it?

Thanks

Minko

## These names were used as global names but were not...

When running mint on a single .mpl file, I often get this warning

`These names were used as global names but were not declared:  main_module`

When having this code in the mpl file

`o:=Object(main_module:-person_type);`

The problem is that main_module is a module that lives in separate mpl file.

It is a differerent module in its own ,mpl file which inside it contains the person_type definition. (another module of type object)

I know I can ignore this. And have been. But my question is: how does one "declare" main_module inside this mpl file to avoid getting this warning message? Since main_module is its own module in separate file. I do not understand what does it mean to  "declare" it.

Here is the full code

```A:=module()
export boo:=proc()
local o;
o:=Object(main_module:-person_type);
o:-foo();
end proc;
end module;```

And here is the command I used

`"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2 A.mpl`

Gives

Nested Procedure boo() on lines 2 to 6
These names were used as global names but were not declared:  main_module

Later on, when I build my .mla library, all these modules are put inside the library. So it is not an issue when running the code, but I'd like to see if it is possible to add something to A.mpl to tell Maple that main_module is separate module and not to worry about it.

## display log function...

Hi,

How to keep the log function displayed in base b in my table, not its converted form in ln  ( f3 and f4 in my file) ?

Thanks.

DisplayLogQCM.mw

## CodeGeneration: How to force double?...

I have started to use CodeGeneration[C] instead of codegen[C] (depreciated). In the attached example not all variables and parameters of a C function are declared as double, although the default value is double.

If this is by design:

How can I force double without going back to codegen[C] or manual declaration of each item?

C_code_generation_with_CodeGeneration.mw

## Calling Procedure from Procedure...

Pls see below worksheet. I want to compute the maximum number that appears in the Collatz series when starting with several starting numbers.

I calculate the maximum number appearing when starting with a specific number in procedure collatz. Then I want to calculate the maximum number appearing when calling different starting numbers in procedure collatz_max by calling collatz several times - collatz_max does not yet contain the handing of the results from collatz as the below error appears. If I only call collatz in collatz_max it return the right value, but in the loop or if I assign collatz to a variable within procedure collatz_max, calling collatz returns () as a result.

What do I do wrong?

Thanks for helping,

Oliver

Collatz.mws

## Is it possible to write this polynomial in x as a...

Is it possible to write

as a polynomial in

? This is a math question first of all. If it is possible, how do we do it in Maple.

## how to use listplot on matrix?...

again, I wish Maple help can be better. A simple example of how to use listplot on matrix is all what is needed.

I have a matrix, 3 rows and 5 columns. I need to use listplot to generate 3 listplots on same graph. I can do this one row at a time. But when calling listplot(m) where m is the matrix, it gives error

Error, (in plots:-pointplot) incorrect number of coordinates in points data

Clicking on the above link, as usual sends me to page that says There is no help page available for this error

Help says

The listplot command also accepts a list or Matrix containing points data. great. But how?? I click on the link next to the above line, it sends me to page about pointplot. There is says that pointplot also accepts a matrix of size n by 2. Does this mean listplot matrix must also be two columns? It does not say this on the listplot help page.

For a workaround, I now generate plot of each row on its own, then use display to put them all on same graph. But the problem with this is that all have same color. I was hoping that if Maple did it all at once, it will automatically pick different color for each line as is the case with Mathematica (example below)

Is there a better way to do this? For reference, I'd like to generate similar plot like this

You see, the colors are automatically selected. With manual plotting of each row myself, I have to select the color myself and to make sure they are different and so on. It will be better if the system did all of this.

Please see attached worksheet

 > restart;
 > m:=Matrix([[1,2,5,6,9],[3,4,5,13,14],[1,3,4,10,11]])

 > plots:-listplot(m); #why this fail?

Error, (in plots:-pointplot) incorrect number of coordinates in points data

 > plots:-listplot(m[1,..])

 > #for a workaround, I can do this. But now all lines have same color which is not good. map(n->plots:-listplot(m[n,..]),[\$1..3]): plots:-display(%)

 >

What is the correct way to use listplot with matrix?

## How to find coordinates (or shapes) of Polygons in...

I have created some plots of inverse primes  like this example1.pdf .

The filled color-shape in the middle is what I want do do with all areas in this picture or in other pictures.

In other words the goal is to fill the differnt areas in the print with different colors.

So I need to find the points of the Polygons, as I have done by hand with that yellow Polygon.

A procdure that is ready will give give the crosspoints of the lines.

These are the line-coordinates (the 1st number ist the number of iterations)

2*L[1]=number of lines in L

L:=[14, [[1, 1], [1, 26]], [[1, 26], [26, 26]], [[26, 26], [26, 37]], [[26, 37], [37, 37]], [[37, 37], [37, 39]], [[37, 39], [39, 39]], [[39, 39], [39, 20]], [[39, 20], [20, 20]], [[20, 20], [20, 23]], [[20, 23], [23, 23]], [[23, 23], [23, 30]], [[23, 30], [30, 30]], [[30, 30], [30, 70]], [[30, 70], [70, 70]], [[70, 70], [70, 45]], [[70, 45], [45, 45]], [[45, 45], [45, 34]], [[45, 34], [34, 34]], [[34, 34], [34, 32]], [[34, 32], [32, 32]], [[32, 32], [32, 51]], [[32, 51], [51, 51]], [[51, 51], [51, 48]], [[51, 48], [48, 48]], [[48, 48], [48, 41]], [[48, 41], [41, 41]], [[41, 41], [41, 1]], [[41, 1], [1, 1]]]

These are the crosspoints:

cp := [[23, 26], [30, 37], [32, 37], [26, 30], [48, 45], [39, 34], [41, 34], [45, 41]]

To plot the pdf I used this code:

poly2 := [[32, 32], [34, 32], [34, 34], [39, 34], [39, 39], [37, 39], [37, 37], [32, 37]]

poly 2 is just an axample, how it looks like when its ready.

display(seq(line(op(L[i])), i = 2 .. 2*L[1] + 1), polygonplot([poly2], color = "Resene GoldenTainoi", axes = none, style = polygon), color = blue, thickness = 0.8);

So I hope, you can help me :)

This is a beautyfull way to paint a prime  by just printing the remainders of the recursive dividing of the inverse prime in lines.

Thanks a lot,

Arno

## int gives wrong answer for improper integral...

int(sin(x)/x*exp(-2*I*pi*f*x), x = -infinity .. infinity) gives the incorrect answer pi. The correct answer is pi for abs(f)

## RootOf problem (explicit and allvalues APIs not fu...

Dear Maple community,

I'm trying to solve a complex expression by taking its first-order derivative and finding the optimal solution. As a result, I'm getting a rootOf expression, which is further not solved by using explicit or allvalues APIs provided in the maple. Can you guys help me where I'm going wrong?

I'm attaching my code file as well for

 (1)

 (2)

 (3)

 (4)

 (5)

reference.

## how to trap this internal Maple error? too many le...

I am not able to even trap this Maple exception.

Any suggestions what to do? It is not a problem if it can't solve it, but I need to at least be able to  trap the exception in order to go to the next one, else the whole program now stops when it hits this.

I used try..catch but this exception just ignores this and escapes to top level. This is not the first time I've seen Maple exception escape the try/catch. I do not understand why some do that and some not. I

Is this another bug?

 > interface(version);

 > restart;
 > eq:=1 = -X*(-1/4*(-40*(X + x0)^(5/3) - 20/3*(X + x0)^(2/3)*Y - 20/3*(X + x0)^(2/3)*y0 - 32*A*(X + x0)^(1/3))/((X + x0)^(5/3)*(Y + y0)) + 5/12*(-15*(X + x0)^(8/3) - 4*(X + x0)^(5/3)*Y - 4*(X + x0)^(5/3)*y0 - 24*A*(X + x0)^(4/3) + 12*A^2)/((X + x0)^(8/3)*(Y + y0)))/(Y*(1/(Y + y0) + 1/4*(-15*(X + x0)^(8/3) - 4*(X + x0)^(5/3)*Y - 4*(X + x0)^(5/3)*y0 - 24*A*(X + x0)^(4/3) + 12*A^2)/((X + x0)^(5/3)*(Y + y0)^2)));

 > try    sol:=solve(identity(eq,X),[x0,y0]); catch:    print("trapped the error"); end try;

Error, (in anonymous procedure called from type/realcons) too many levels of recursion

 >