## Find the equation of the circle...

Let.Find the equation of the circle touching the graph  at three points?

## why dfieldplot and phaseportrait and DEplot not ac...

dsolve accept system of first order ode's in the form x'=A x, where x' is vector, A is matrix of coefficients and x are the dependent variables. This is convenient since one does not have to convert things to a list.

But  dfieldplot and phaseportrait and DEplot do not accept this form. One must convert things to list first.

Here is an example

restart;
sys:=Vector([diff(x(t),t),diff(y(t),t)]) = Matrix([[1,2],[0,3]]).Vector([x(t),y(t)]);
dsolve(sys)


But

DEtools:-dfieldplot(sys,[x(t),y(t)],t=0..4,x=-4..4, y=-4..4);


Error, (in DEtools/dfieldplot) system must have same number of dependent variables as DE's.

workaround is to write the system as list

new_sys:=[diff(x(t), t)=x(t) + 2*y(t),diff(y(t), t)=3*y(t)];
DEtools:-dfieldplot(new_sys,[x(t),y(t)],t=0..4,x=-4..4, y=-4..4);


I know one can automate the conversion. But still, it would be better if dfieldplot would accept sys as dsolve did.

Same for

DEtools:-phaseportrait(sys,[x(t),y(t)],t=0..4,[[x(0)=1,y(0)=0]],x=-4..4, y=-4..4);
#
DEtools:-DEplot(sys,[x(t),y(t)],t=0..4,[[x(0)=1,y(0)=0]],x=-4..4, y=-4..4);


They gives same error.

Since dsolve can do it, may be these other functions can also support taking a system of ode's in vector/matrix form? Any reason why not?

Maple 2021.1

## Possible bug in seq(), add(), mul()...

There seems to be an "issue" when using a indexed name (say x[4]) as the loop index in a seq() mul() or add() command - the indexed name is assigned once the command exits!!

This never(?) happens if the loop index is not an indexed name. A bug??

See the attached which illustrates the issue for the add() command, where x[4] is assigned on exit from add(). The same thing happens if add() is replaced with seq() or mul()

 > restart;
 > # # x[4] should not be assigned on exit from add() !! #   add( u(x[4]), x[4]=1..10);   x[4]; # # x__4 is not assigned on exit from add() #   add( u(x__4), x__4=1..10);   x__4; # # j is not assigned on exit from add() #   add( u(j), j=1..10);   j;
 (1)
 >

## Sum every fifth term in an expression...

Hi... I have a long-expression, which I have abbreviated here. I want every 5th term summed. Included is my code, but I need the unassign command (after point 12) for it to work. The problem is when I unhash and insert this unassign('s','X[4]') command into my actual Table of Records procedure, Maple protests. it gives a cryptic: " Error, ( unexpected " .
How can I modify the original code to sum every 5th term as efficiently as possible as the thing is a 4000 term expression which I later need to numerically integrate?

sum_every_5th.mw

## Error, (in Utils:-TransformAndApply) numeric excep...

I do not remember if there was a post on this before or not
Maple 2021.1

int(arcsin(x)/(1+(-x^2+1)^(1/2)),x)


gives

Error, (in Utils:-TransformAndApply) numeric exception: division by zero

The correct answer should be

((-1 + Sqrt[1 - x^2]) ArcSin[x])/x + ArcSin[x]^2/2 -  Log[1 + Sqrt[1 - x^2]]

I had to go back to Maple 2018, to get no exception:

May be this could be looked at for next Maple version?

## Probe Info tooltips not visible on Linux...

My PC is dual-booted (Win10 and Ubuntu 20.04+KDE). After creating a plot (even the simplest one) and enabling Probe Info as described in  https://www.maplesoft.com/support/help/maple/view.aspx?path=worksheet%2Fplotinterface%2Fpointprobei I do not see tooltip with cursor position. All other tooltips (Palettes, Toolbar etc.) work fine, it is only the probe Info tooltip that does not work. The same plot done while running Maple on Win10 works as expected - tooltip is visible.

Can someone confirm whether it works for them using Linux? I wonder whether this could be Java-related problem when running on Linux KDE with compositing and using Nvidia driver (e.g. color of tooltip is white on white, or rendering does not work as expected).

I do not remember whether it ever worked on Linux. At this moment I am using Maple2021 but for testing purposes I reinstalled Maple2020 and the problem is the same.

Thanks,

Alex

## Want to define piecewise function using some alrea...

Hi friends! Hope everything is fine here

I want to generate a piecewise function using some already computed functions. Like I compute B[0], B[1], B[2] and B[3] using some formula which are given as,

B[0] := (1/6)*x^3/h^3;
B[1] := (1/6)*(4*h^3-12*h^2*x+12*h*x^2-3*x^3)/h^3;
B[2] := -(1/6)*(44*h^3-60*h^2*x+24*h*x^2-3*x^3)/h^3;
B[3] := (1/6)*(64*h^3-48*h^2*x+12*h*x^2-x^3)/h^3;

Now, I want to define the corresponding piecewise function as

piecewise(x <= 0, 0, 0 < x and x <= h, B[0], and(h < x, x <= 2*h), B[1], and(2*h < x, x <= 3*h), B[2], and(3*h < x, x <= 4*h), (B[3], 0)

similarly for already computed functions B[0], B[1], B[2], B[3] and B[4] which are given as

B[0] := (1/24)*x^4/h^4;
B[1] := -(1/24)*(5*h^4-20*h^3*x+30*h^2*x^2-20*h*x^3+4*x^4)/h^4;
B[2] := (1/24)*(155*h^4-300*h^3*x+210*h^2*x^2-60*h*x^3+6*x^4)/h^4;
B[3] := -(1/24)*(655*h^4-780*h^3*x+330*h^2*x^2-60*h*x^3+4*x^4)/h^4;
B[4] := (1/24)*(625*h^4-500*h^3*x+150*h^2*x^2-20*h*x^3+x^4)/h^4;

I want to define the corresponding piecewise function as

piecewise(x <= 0, 0, 0 < x and x <= h, B[0], and(h < x, x <= 2*h), B[1], and(2*h < x, x <= 3*h), B[2], and(3*h < x, x <= 4*h), B[3], and(4*h < x, x <= 5*h), B[4], 0)

Can someone please let me know a general procedure (using seq command, loop etc.) to define piecewise function if B[0], B[1], B[2],...,B[M] are known? I shall be very thankful for your answer.

## how to prevent ExportMatrix from adding an extra \...

I have plain text file generated, where each line has mixed numbers and strings. Some of the strings are latex. So they have "\" in them. The data is rectangle. same number of fields on each line, separated by commas.  I use CSV format to read the data to Maple.

I simply want to read this file using Import , which reads it into a matrix (using CSV format), and export it back right away using either ExportMatrix or Export and end up with the same exact file.

But Maple always adds extra "\" each time I export the matrix back to the file. So if I have initially "\sin x" in the file, after reading/writing the file 5 times without touching the data inside Maple, I end up with something like "\\\\\\\\\\\sin x" in the file at the end.

I could ofcourse not use ExportMatrix nor Export and write the data back to the file manually using fprintf using correct format for each field. But it is easier if I can get ExportMatrix to work since there are many fields some are integers, some are real and some are strings.

Here is a simple MWE which shows the problem. Originally I have this file on disk. Called test.txt and has 2 lines in it

1,"\sin x"
2,"this is second line"

Now after doing the following

data:=Import("test.txt",format="CSV",output=Matrix):
ExportMatrix("test.txt",data,target=csv);


The file on disk now becomes

1,"\\sin x"
2,"this is second line"

And repeating the above one more time, the file becomes

1,"\\\\sin x"
2,"this is second line"

This ofcourse breaks all the latex strings in there.

Is there a way to prevent Maple from doing this? I looked at all the options in help, but do not see on so far.  I also tried Export but that did not work at all. So I'd like to see if ExportMatrix can do it, without adding an extra "\", otherwise, will have to use fprintf directly to export the data back to file.

edit

fyi, I ended up using fprintf to write the data back to disk. May be if there is a solution using ExportMatrix, will change back. This is what I ended up doing

File before

1,"\sin x"
2,"this is second line"

Now run this code

data:=Import("test.txt",format="CSV",output=Matrix):
file_id := fopen("test.txt",WRITE):
nRows:=LinearAlgebra:-RowDimension(data);
for n to nRows do
if n<nRows then
fprintf(file_id,"%d,\"%s\"\n",data[n,1],data[n,2]);
else
fprintf(file_id,"%d,\"%s\"",data[n,1],data[n,2]);
fi;
od;
fclose(file_id);



File after

1,"\sin x"
2,"this is second line"


Now the file is exactly the same as before reading it.

My actual data is more than the above two fields, but that makes the format string longer, that is all.

## Maple 2021.1 update

by: Maple 2021

We have just released an update to Maple, Maple 2021.1.

Maple 2021.1 includes improvements to plotting, export to PDF and LaTeX, the user interface, the mathematics engine, and more. We strongly recommend that all Maple 2021 users install these updates.

This update is available through Tools>Check for Updates in Maple, and is also available from our website on the Maple 2021.1 download page, where you can also find more details.

In particular, please note that this update includes fixes to the sometimes missing plotting toolbar, the misplaced plot annotations on export, and a workbook saving problem, all reported on MaplePrimes.

Thanks for the feedback!

## Round decimal up or down...

Hey

Does Maple have the equivalent of the MROUND Excel command?

Or can someone kindly make a procedure.

eg

MROUND(1986,10)=1990

MROUND(492,5)=490

thanks!

## ImplicitPlot 3D for Solid Hemisphere...

I am not getting the hemisphere which I thought was my expression (equation) represents.

Can anyone help me find my mistake.

with(plots);
implicitplot3d(z <= sqrt(-x^2 - y^2 + 9), x = -3 .. 3, y = -3 .. 3, z = 0 .. 3, coords = spherical);

Doubt_ImplicitPlot.mw

## Maple Conference 2021: Deadline Extended in Call...

by: Maple

The deadline to submit a presentation proposal for the Maple Conference 2021, to be held Nov. 2-5, 2021, has been extended to June 13, 2021.

We invite submissions of proposals for presentations on a range of topics related to Maple, including Maple in education, algorithms and software, and applications. All presenters will be given the option of submitting a full paper, which will undergo peer review, and if accepted, be included in the conference proceedings.

More about the themes of the conference, how to submit a presentation proposal, and the program committee can be found here: Call for Presentations.

We hope to see you at Maple Conference 2021!

## Strange Optimization Output...

Hello everyone

I observe the following "strange" case and I am wondering if I am missing something. So, any insights are more than appreciated. The case is the followin:

When I use

with(Optimization):
Interactive(x + y, {x = 0 .. 1, y = 0 .. 1, 1 <= x + y})

I get: objective =1, x=y=.5

However, If I run

with(Optimization):
Minimize(x + y, {x >=0,x<=1, y>=0,y<=1, 1 <= x + y})

then I get: objective =1, x=1, y=0

Why there is such a difference? Because of there are multiple solutions?