## How do I use ErrorPlots to put error bars on my sc...

How do I use ErrorPlots to put error bars on my scatter plot of data, AT THE LOCATION OF THE SCATTER PLOT DATA POINT? Below I write an example demonstrating how I plot the data and error bars using ErrorPlots.  When I use display to combine plots you clearly see that the errorbars are not on the scatter plot data points.  How do I give ErrorPlots, the x-y locations of the data points, so it knows to print the error bars on the location of the data points?  Is there a better approach to putting horizontal and vertical error bars onto scatter plot data?

## how to eliminate m in the 2 equations...

I try to eliminate m  in                    X := (a*m^2 + 2*m^2*p + 2*p)/(2*m^2)
Y := a/(2*m)

eliminate({X, Y}, m);
allvalues(m);
without results. How can I do ? Thank you.

## why Maple changes the terms when copy/paste vs. ho...

I noticed Maple changes 1/(4*(x-2)) to 1/(4*x-8)  when copying the output and pasting it back to the worksheet.

But in the variable it does remain 1/(4*(x-2))  which is what I wanted, as I am going to look for this form later on and I do not want it expanded.

But I am curious why Maple does this. It is a little annoying when copying something from one worksheet to another and have it change.  Here is a small movie and the code to see it.

Is there a way to prevent this automatic expansion?  Maple 2021.2 on windows 10 code

```r:=(x^4-8*x^3+24*x^2-24*x+12)/((4*x^2*(x-2)^2)):
rf:=convert(r,fullparfrac,x);
```

I use worksheet interface and have my display settings as the following ## "Execution stopped: Stack limit reached." - Possib...

As a Maple user for 10+ years, I've had plenty of stack limit errors, pretty much all of them my fault. But I am currently experiencing a very unusual one after updating my Mac from Maple 2019 to Maple 2021.2.

I am running a long script to fetch json data from a url, parse it, and do a bunch of analysis. In most cases it works fine, but some cases give either an "Execution stopped: Stack limit reached." error, or the error "Error, (in type/polynom) result from type `algfun` must be true or false". Both are being caused by calling the gfun:-ratpolytocoeff command.

I kind of think some internal memory of Maple is being accidentally overwritten because I can cause the error to occur or not occur by adding / commenting out random lines of code that have nothing to do with the part of the code causing the problem. I've managed to find a fairly small script that causes the problem to occur:

```with(PolynomialIdeals):

root_func := F[0, x]:

latex:-Settings(useimaginaryunit=i):

data := URL[Get](url):
json := JSON[ParseString](data):
json := JSON[ParseString](data):

debug_solved := (x^5-3*x^4+5*x^3-7*x^2+4*x-1)/(x^5-5*x^4+10*x^3-10*x^2+5*x-1):

debug_gfun := gfun[ratpolytocoeff](debug_solved, x, n);```

If I remove ANY of these lines of code, there is no longer any problem, which is very strange because, for example, I'm not using the PolynomialIdeals package anywhere in the script. This particular script works fine on a Linux machine running 2021.0, but yet I am having similar problems on that machine with other cases.

Here's a slightly simpler example in which gfun[ratpolytocoeff] induces a "division by zero" error ("Error, (in convert/fullparfrac/normal_only) numeric exception: division by zero"):

```with(PolynomialIdeals):

latex:-Settings(useimaginaryunit=i):

data := URL[Get](url):
json := JSON[ParseString](data):
json := JSON[ParseString](data):

debug_gfun := gfun[ratpolytocoeff](1/(1-x), x, n);```

After the division by zero error, if I press Ctrl+D to close the Maple command line, it prints
"GC Thread signalAbort 0x7000019a5000 Execution stopped: Stack limit reached.".

Is this an internal Maple bug? Is there any workaround? I am pulling my hair out and would be very grateful for any help.

## How can psi(t) be assigned to psi without "recursi...

psi := psi(t)

psi := psi(t);
Error, recursive assignment
How can this assignment be accomplished?

## Datatable / Show Column Header...

There seems to be a bug in Maple 2021, latest release. Not sure if this was in previous versions.

When checking off the "Show Column Header" in Datatables, the cells are becoming invisible, while the column header still remains.

Show Row Header on the other side works fine. ## How to Produce a Specific Solution Form?

Maple 2021

A user wondered how to have Maple produce a desired form of a solution       (1)  We suggested the closest they might be able to get is using simplify like so:       (1)   (2) ## Warning, cannot determine statement number; proced...

Many times when using the debugger, and hitting the NEXT button I get the message

Warning, cannot determine statement number; procedure may have changed in-place

The problem is that after this, hitting NEXT will not go to next statement any more. It will bypass and return from the current procedure. but hitting STEP will make it go to next statement, But STEP will also go into next block which I might not want to do.

Only way to fix this is to terminate the debugging session and start all over again.

it is random and comes up in different places. The code in in .mla file and I step through it.

I am sure anyone who have used the buildin debugger have seen this message before. It shows for me many times.

What causes it and what can one do to not make it show up or clear it up so one does not have to restart the debugging each time it shows up?

Here is a screen shot.  I am also wondering if this happens using the emacs interface to the Maple debugger? I have not used the emacs interface to the debugger before.

Maple 2021.2 on windows 10 ## why "Error, adding lists of different length" when...

I can't understand why this error Error, adding lists of different length show up only when removing a print statement!

Why would a print has anything to do with an error message showing up or not?

some context. I wanted to call map on expression, but wanted to collect the result of operating on each indent in a list as map goes through the expression on term after the other. The expression will be type `+`.

I did not know how to do it inside map. So I create separate proc which map call.

Inside this proc, I use list to append to (this will small list, few terms at most).  To be able to do this, I made the list I want to collect thing into a global variable outside the proc.  Everything was working OK, until I remove a print statement  I had inside the proc for debugging.

I am sure there is a better way to do this all (i.e. collect map output into a list) and I am trying to find better way. But my question is: Why would this error shows up only when I remove a print statement from the last line in the proc?

I also notice when removing the line variable declaration global L now both version work with no error, but get warning Warning, (in f) `L` is implicitly declared local which is why I added declaration global L in first place.

Maple 2021.2 on windows 10

 > interface(version); > restart;
 > r:=2/(x^2+1)+1/(x^2+1)^2; L:=[]; f:=proc(Z)    global L;      #do some processing on Z, then collect it into list L    L:=[ op(L), Z^2];    #print("op(L) = ",op(L)," Z=",Z);    end proc: map(Z->f(Z),r); L;  Error, adding lists of different length > restart;
 > r:=2/(x^2+1)+1/(x^2+1)^2; L:=[]; f:=proc(Z)    global L;      #do some processing on Z, then collect it into list L    L:=[ op(L), Z^2];    print("op(L) = ",op(L)," Z=",Z);    end proc: map(Z->f(Z),r); L;     >

Thanks to everyone for the answers and information I did not know that map does process return value from a proc it calls. Good to know.

## How do I numerically solve for a root, involving a...

I'm asking this because I'm sure I'm just missing something.

If I solve a DE with numerics, i.e., dsolve(...,numeric), I get a procedure, say . I want to answer: if I have a point that I know, what are the root(s) of ? In other words, solve for .

I thought this would just involve something like fsolve or solve/evalf, or perhaps a root finding package, but I can't figure it out. What I want to avoid is having to write a procedure to hone in on the root myself, since my code is already quite slow.

Any help would be greatly appreciated.

EDIT 1: Here is my MWE (or, what should work in my mind but doesn't). The ODE isn't important, it's just an easy example.

```restart;

ode := diff(f(x),x) = f(x);

initial_condition := f(0)=1;

a := 1;

h := dsolve({ode,initial_condition},numeric);

solution := fsolve(h(x) - rhs(h(a)) = 1);```

## Could someone help me with trigonometric functions...

University of Costa Rica

Course: SP-1493

Student: Lic. Marcus Vinicio Mora Salas

Instructor: Dr. Erick Castellón Elizondo

Assigment 7

 Description
 e2.301 Express in terms of i) , and ii) , and iii) ; the latter part is more difficult than the preceding two parts.  Each square root that appears is assumed to include both positive and negative roots; for arbitrary angle , the sign of the root is given by the quadrant of the angle.  Test your results with a numerical value of . In an analogous manner, each circular trigonometric function is expressible in terms of any other circular trigonometric function, but possible ambiguity of signs of square roots exists.    eq := [sin(theta)^2 + cos(theta)^2 - 1, In this question I have to do what I said in the title. Really I don't understand the question very well, or at least I don't understand the objetive, because if I use solve I get an error and if I use isolate I only can get sin in terms of cos and even wen I could get all answer, I needed a starting point, it's say an identity to solve the exercise. Therefore, my question is, Maple have some comand to express trigonometric functions in terms of another without introducing identities?

## Maple command to generate all possible arrangement...

I looked at combinat package but it is too large and could not find what I want.

I'll explain with example to make it easy. Given n=2 I want to generate all possible arrangements of sets of length n where each element can be either +1 or -1. So it will be 2^n=4 possible arrangements And for n=3 then want to generate all possible sets of length 3 where each element can be either +1 or -1 so it will be  2^n=2^3=8 possible sets And for n=4 it will be 2^n=16 possible arrangements And so on. I picked [+1,-1] in the above as an example.

Is there a command to do this in Maple?  I can ofcourse program it using using loops and if's and so on. But thought there might be a command in Maple package which will generate all these possibles sets. Either as list of lists or Matrix or any other format.

## Polynomial Ideals Usage

Maple 2021

Our user wondered about using PolynomialIdeals:

1.  If we have n+1 polynomials,  f, g1,...,gn,  how to determine if  f  is in the ideal generated by  g1,...,gn?

2.  If so, how to write  f  as a polynomial combination of   g1,...,gn?

We suggested that;

The nicest interface to answer the first question is given by the ?PolynomialIdeals,Operators page: you can write

```with(PolynomialIdeals):
with(Operators):
J := <g1, g2, ..., gn>;
f in J; # true or false
```

To answer the second question, you need to use the lower level  package (which underlies the  package). This will also answer the first question for you. In particular the  command. You can write:

(Edit Feb 1, 2022 - use  instead of

```with(Groebner):
G := [g1, g2, ..., gn];
ord := tdeg(x,y,z); # replace x, y, z with the appropriate variables; you can also use other variable orders -- see ?Groebner,MonomialOrders

b := Basis(G, ord);
n := NormalForm(f, b, ord, 'Q');
# if n = 0 then f is in the ideal; Q is the list of coefficients:
f - add(Q[i] * b[i], i = 1 .. numelems(b)); # this will be equal to n.```

## single step debug within a worksheet (or code edi...

Hello,

Can you enter debug in a worksheet vs a proc?

I have a for loop that is crashing in the middle with a bad calculated number to provide to a thermoprops function.   Is there a way to single step through a for loop (1500 iterations) to see which line is getting tripped up?  I can not post the worksheet as it's private development.   The question is generic to any "for loop".

I have also tried "porting" into a code edit region, but still can not enter the debugger mode.   Is proper debugger only available if I turn the "for loop" into a proc?   If yes, what is the availability of packages called right after restart for the worksheet for a proc, or do all the pre-calcs developed in the worksheet and the packages to be variables fed into the proc or packages re-declared insde a new proc ???

Sorry if this is a trival question.

Bill