## Expanding a derivative onto an expression using Ma...

Hello I am trying to compute the following expression;

(x^2r+y^2+z^2) gamma^{0} partial_{x} (-xy(1-r)) gamma^{2} partial_{y} \Psi

in which r = sqrt(1-K(x^2+y^2+z^2)), K is a constant, the gamma's are the Dirac gamma matrices and \Psi is the wave function. Essentially I would like to have partial_{x} operate on the expression to the right of it and apply product rule where there will be three terms with the last one being partia_{x} partial_{y} \Psi where it evaluates on everything expect the partial and the wavefunction, combining into the term partial_{x} partial_{y} \Psi, and if the partials are the same they combine into a single second order derivative with respect to the given variable. I have done this calculation by hand but seeing that there is an extensive amount of terms I would like to automate it using Maple. I have tried using the D() calling sequence but it doesn't quite give me what I am looking for. Is there anything documentation which will give me what I am looking for?

## How do I extract terms from multivariate polynomia...

Hello everyone. I want to know how I can extract terms with the lowest sum of the degree of x and of y in a multivariate polynomial (in x and y)?

For instance, if I've f(x) = 100x^2y^2 + 35x^2y + 45y, I want an output of 45y.

On the other hand, if I've g(x) = 13x^2y^2 + xy^2 + 2yx^2, I want an output of xy^2 + yx^2.

## Limit does not give correct answer...

Hello,friends!

I try to calculate the limit of the function,

sin(x*sin(1/x))/(x*sin(1/x))  at point x=0,maple gives answer:1

However,actually it does not have a limit at x=0,because for the limit to exist at a point,there needs to exist a neighbourhood at the point so that all x in the neighbour have definition.

It means f(x) should have have definition at point x=0's negihbourhood,however small the neighbourhood is.If I choose x=1/(n*Pi), n belongs to integers,the function doesn't have definition.As n increase,there doesn't exist such a neighbourhood.So is it something maple should correct?

## Why is there seemingly inconsistent behavior with ...

Hello,

All too often I encounter an annoying issue, and when it happens it makes Maple slower than just scribbling on paper.  Unfortunately I don't understand why it happens or when it is going to happen so it creates a huge waste of time.

While most of the time expressions behave as expected, other times the exact same expression behaves as if it is something other than what is shown on screen.  I just ran into such an issue as an example:

What am I missing here? Why would phi not be interpreted as phi?

The only thing I could think of not being a Maple expert is assumptions.  I found I have an assumption earlier on phi (assume(phi>0,phi<45) so I removed it, but inexplicably(to me) that only fixes the first 2 lines, the last 2 lines still have the same issue, why I can't understand.  Why would having an assumption on phi, prevent me from evaluating the expression at some value of phi? The provided value is even within the assumed range.  And in either case, why can't I declare a value for phi and have that be understood?

Sorry for what I suspect is a dumb question, and thanks in advance.

EDITED to correct = -> :=

## Why did I get an unterminated loop error again?...

` `
 >
 >
 (1)
 >

Hello everyone. I was trying to code the recurrence relation given in the image below (without taking the mth power):

But, as I run the program, I am getting an "unterminated loop" error. Can someone please point out the mistake(s)?

## Why this unterminated loop error?...

```rfin := proc(m::integer)
local c, i, flg := 0;
for i from 0 to m do
local b := i;
do
c := b mod 3;
if (c <> 2) then next else flg := 1;
end if;
b := 1/3*b - 1/3*c;
until b = 0;
if evalb(flg = 0) then print(i);
end if;
end do;
end proc;```

Hello everyone. I've written a procedure that outputs all numbers <= a given user I/P whose ternary representation has no 2.

However, I get an "Error, unterminated loop" message. Can someone please out the mistake(s)?

## New Bug of Maple 2020？...

Update:This bug ONLY occurs when the file title containing Chinese Characters.

The .mw files have already been associated with Maple 2020, but when clicking on any of them, Maple 2020 won't launch as expected and nothing actually will happen.
I have tried to reinstall Maple 2020, but the problem just keep existing.

The Windows version where the bug occurs is Windows 10 version 1909.

## Maple is not executing most commands at all? Advic...

I'm using the 15 day trial as a Computer Science student. For my first project, Maple worked very well. I've been using the ApproximateInt() command. This command worked in the first assignment, and so I created a new document to start on my second assignment, and suddenly:

Entering the same ApproximateInt() command in a prompt line will not execute the command. Where it should display a plot of Riemann sums, it only displays the text I had entered. If I open the first document in which it was working properly, it also breaks upon re-iterating the command lines.

Image of expected behaviour:

Image taken right after pressing enter:

Is anyone familiar with this Maple behaviour? Thank you for any help. Meanwhile, I will attempt a reinstallation. The maple file is attached, as well.

P.S: Interestingly, the plot() command does work, as well as simple commands such as 1+2 (Displays "3")

## geometry:-area() function issue...

Hello!

Using a geometry package, I ran into a problem: the area() function returns the wrong value for square elements.

What am I doing wrong?

 (1)

 (2)

 (3)

 (4)

## Does maple have a word-cloud or tag-cloud functio...

Word-cloud is popular function which many languages have as add-on. Sometime called tag-cloud. https://en.wikipedia.org/wiki/Tag_cloud

"A tag cloud (word cloud or wordle or weighted list in visual design) is a novelty visual representation of text data"

I did help and did some google search, but can not find function in Maple. May be I did not search correctly.

In Mathematica is it called WordCloud. Here is an example of its use

`WordCloud[Import["http://maplesoft.com"]]`

And it returns this image back to the screen

Can one do the above in Maple? And what is the function name? Is it in special package?

## Why Maple pdsolve still unable to solve 1D convect...

Can one hope that next version of Maple will be able to solve the standard convection-diffusion pde in 1D?

`pde:=diff(u(x,t),t)=d*diff(u(x,t),x\$2)+c*diff(u(x,t),x);`

in 1D. Even the most simple form with zero boundary conditions can't be solved.

```pde:=diff(u(x,t),t)=d*diff(u(x,t),x\$2)+c*diff(u(x,t),x);
bc:=u(0,t)=0,u(L,t)=0;
ic:=u(x,0)=f(x);
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming d>0,c>0,L>0

sol := NULL```

I tried some HINT's also but not all of them.

FYI, Mathematica 12.1 is now able to solve the above PDE

```ClearAll["Global`*"];
pde=D[u[x,t],t]==d*D[u[x,t],{x,2}]+c*D[u[x,t],x];
bc={u[0,t]==0,u[L,t]==0};
ic=u[x,0]==f[x];
DSolve[{pde,bc,ic},u[x,t],{x,t},Assumptions->{d>0,c>0,L>0}]```

Gives

Is it possible I am overlooking some other option or a trick to obtain solution for the above using pdsolve? Only reason I am asking is that Maple can solve much more complicated PDE's and the above is one of the basic diffusion based PDE's. So I am surprised why Maple still can't solve this as it is just a seperation of variables method.

Maple 2020 on windows 10. Physics version 631

## How to import CSV (comma delimited) text file with...

I am exploring the idea of porting some of my functions to Maple from Mathematica. But I just found a big problem in importing comma delimited data that contains a string within a string. This is not a problem being imported in Mathematica, but I need help to do same thing in Maple.

I tried ImportMatrix (as suggested in https://www.mapleprimes.com/questions/221509-How-To-Read-Lines-From-File-With-Quoted-Strings and also tried Import then convert and in both cases Maple does not read the full string in the field. I will show simple example

This file, called data.txt

`1,2,3,"x+y, algorithm=["123"]","OK",5`

It has 6 fields (since comma seperated.

But when importing it, Maple reads the 4th field above as "x+y, algorithm=[" and drops the rest 123"]"

Here is the code

```#currentdir("C:\\bug"); #change as needed
data:=ImportMatrix("data.txt", source=csv);
print(data(4));
print(data(5));
```

This is the output

I also tried

```data := Import("data.txt",format="CSV");
data := convert(data,Matrix):
print(data(4));
print(data(5));
```

Same output as above.

Compare the output in Mathematica. Using the same file as input. It automatically escapes the embedded strings and reads the full field OK

```SetDirectory[NotebookDirectory[]];
data = First@Import["data.txt", "Table", "FieldSeparators" -> {","}, "Numeric" -> True]

{1, 2, 3, "x+y, algorithm=[\"123\"]", "OK", 5}

data[[4]]

"x+y, algorithm=[\"123\"]"

```

What would be the right way in Maple to import such files without losing part of the field?

The file has mixed strings and non strings, just like this example shows, and each file fields are seperated by comma, but I need to be able to read fields that can contain embedded strings in them automatically.

I am using Maple 2020. I think I might have to forget about import and try to do it using lower level code using scanf, or may be there is better method using Filetools package? but thought to check first if I am overlooking some option.

## very annoying problem in user interface. Losses br...

I depend alot on bracket matching to help me during writing code.

Maple suddenly losses bracket matching at some lines. I think it related to using strings with "\\" in them.

I make sure I have bracket matching on

I use worksheet mode (corrected), Maple 2020 under windows 10.

I made small video. Notice how the brackets do not match on the second line there.

Do you see how the brackets do not match on that second line there? This movie below shows what happens when I remove "\\string" from the line. Now bracket match starts to work again.

This is a serious problem for me. Any suggestions what to try to fix it and what can cause it?. Once bracket matching is lost, it is lost all the way to the rest of the code below the location where it started to lose first time.

```restart;
if length(data_last(k,8))>300 then
fprintf(file_id,"%s\n","\\footnotesize");
fi;
```

I think I have to find different editor to use and write the code to .mpl file since I have lots of such code and I need to have bracket matching working.

## Why Maple pdsolve in 2020 hangs on some PDE when t...

I noticed some problems with pdsolve in 2020. Using Maple 2020 on windows 10 with latest Physics 626.

This PDE now hangs when the timeout is increased. This does not happen in Maple 2019.2.1/

```restart;
pde := diff(w(x,y),x)+(a*sin(lambda*x + mu)^k * (y-b*x^n -c)^2 + y - b*x^n + b*n*x^(n-1) - c)*diff(w(x,y),y) = 0;
cpu_time := timelimit(60*5,CodeTools[Usage](assign('sol',pdsolve(pde,w(x,y))),output='realtime'));
```

In Maple 2019.2 it gives

Error, (in trig/reduce/reduce) time expired

Which is good. Since I can now go on to the next PDE.

The hang goes away in Maple 2020 when small timeout is used.  For example I just tried 30 seconds timeout instead of 300 or more seconds and it did expire ok.

This tells me that it depends where it was in the kernel at the time. But as a user, I have no way to control this and so I use the same timeout for all the problems.

Do others using Maple 2020 see the same issue? I know that the timeout does not happen at exactly the same amout given, but for this one, I waited for almost 40 minutes and it still did not time out.

Is this a new bug and is there a better way to handle this other than using timelimit()?

Thank you

## First equilibrium condition with Maple

Maple 2020

With this application our students of science and engineering in the areas of physics will check the first condition of balance using Maple technology. Only with entering mass and angles we obtain graphs and data for a better interpretation.

First_equilibrium_condition.zip

Lenin AC