## Complex ODE solutions using dsolve and fsolve....

I am currently trying to solve the following ODE using numerical methods:

+ [(z+ I*y)2/k12 -k22 +

Where the complex value (in this case, , has been written as z+Iy). I believe dsolve has capabilities for solving this as an initial value problem with complex values and thus to solve this as a boundary value problem I aim to use fsolve to find a zero other a function which is the (IVP solution) - (the non-initial boundary). This has worked very well for the case where y=0 however does not work for values of y>0, and it seems the problem is with fsolve. Any advice on how to deal with this problem, perhaps alternatives to fsolve?

## Why does Grid:-Map return set(...) in this exampl...

Hello

I have no choice but use Grid:-Map and Grid:-Seq in my calculations due to the size of them.  Here is a very small example that is puzzling me (Perhaps I did something really silly and did not realize).

```ansa:=CodeTools:-Usage(Grid:-Map(w->CondswithOnesolutionTest(w,eqns,vars,newvars,tlim),conds5s)):
```

with the following result:

`ansa:=set([{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}])`

The same thing but now using only map

```ansb:=CodeTools:-Usage(map(w->CondswithOnesolutionTest(w,eqns,vars,newvars,tlim),conds5s)):
```
`ansb:={[{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{}, {}, {}, {}, {}, {alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 2] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}], [{alpha[1, 1] = 0, alpha[1, 2] = 0, alpha[1, 3] = 0, alpha[1, 4] = 0, alpha[1, 5] = 0, alpha[1, 6] = 0, alpha[1, 8] = 0, alpha[1, 9] = 0, alpha[2, 0] = 0, alpha[2, 1] = 0, alpha[2, 2] = 0, alpha[2, 4] = 0, alpha[2, 5] = 0, alpha[2, 7] = 0, alpha[2, 8] = 0, alpha[2, 9] = 0, alpha[3, 0] = 0, alpha[3, 1] = 0, alpha[3, 3] = 0, alpha[3, 4] = 0, alpha[3, 5] = 0, alpha[3, 6] = 0, alpha[3, 7] = 0, alpha[3, 8] = 0, alpha[3, 9] = 0}, {}, {}, {}, {}, {}]}`

(This is what I expected as the result).

Why did Grid:-Map add set to the answer?  What am I missing?

Many thanks

## how to start new instance of Maple 2020 while anot...

Here is the problem. I start Maple 2020 on windows 10. Run a script which takes 1-2 days to complete.

During this time, I can't use that Maple at all, since it is busy.

I could start Maple 2019, and that runs as completely separate process. But I want to use Maple 2020 since some things in my scripts do not work on Maple 2019 that work on Maple 2020.

If I start a new instance of Maple 2020, by doing Start->Maple 2020. it does seem to start it OK, but I noticed it seems to be somehow still connected to the one running somehow.  May be they are sharing the same interface?

I can use the new instance now and open new worksheet and use it. But it seems to become very slow, as if it is sharing something with the other Maple 2020 running the long script which uses lots of resources. It is not RAM issue, I have 64 GB RAM, and there is plenty of free RAM left.

When I close the new Maple 2020 workseet I started, I get a message asking if I want to save the worksheet that I have open from the earlier instance which is still running !

I say no ofcourse, as I do not want to terminate that instance, I want to keep it running until the script is completed.

My question is: Could someone may be explain exactly what happens when one starts new Maple 2020, while one is allready running? Why it seems they are sharing either the interface or something else.  How to start completely separate Maple 2020 instance on same PC while one is allready running?

With Mathematica, this issue does not happen. I can start two instances of same version on same PC, and there is nothing shared between them at all.  This does not seem to be the case with Maple.

Maple 2020.1 on windows 10.

## modp1(('Multiply')(...))...

Hi there.

As we all know if we multiply two polynomials f(x) and g(x) of degrees m and n respectively we get polynomial h(x)= f(x)*g(x) of degree m+n and with m+n+1 coefficients in general. Function modp1(('Multiply')(...)) doing this very well. But sometimes we don't need full resulting h(x) - just subset of monomials and subset of coefficients of h(x) - so we don't need to calculate all m+n+1 coefficients of h(x) and waste time and resources for that.

I would request some additional rework of modp1 package: by adding to modp1(('Multiply')(...)) two optional parameters - degrees of first and last calculating coefficients of h(x).

For example:

h:=modp1(Multiply(f, g,n-1,n+1), p) could calculate only monomials with n-1, n and n+1 degrees and set other monomials to zero.

Or maybe it should be new function:

h:=modp1(Multiply_Truncate(f, g,n-1,n+1), p)

Is it possible?

It would be great and very efficient in many tasks.

Thank you.

I've been studying the  drawing  of graph lately .    One of the themes is  1-planar graph .

A 1-planar graph is a graph that can be drawn in the Euclidean plane in such a way that each edge has at most one crossing point,  where it crosses a single additional edge. If a 1-planar graph, one of the most natural generalizations of planar graphs, is drawn that way, the drawing is called a 1-plane graph or 1-planar embedding of the graph.

I know it is NP hard to determine whether a graph is a 1-planar . My idea is to take advantage of some mathematical software to provide some roughly and  intuitive understanding before determining .

Now,  the layout of vertices or edges becomes important.  The drawing of a plane graph is a good example.

DrawGraph(G1)
DrawGraph(G1,style=planar)

K5 := CompleteGraph(5);
DrawGraph(K5);
vp:=[[-1,0],[1,0],[-0.2,0.5],[0.2,0.5],[0,1]];
SetVertexPositions(K5,vp);  #modified the vertex position

DrawGraph(K5);

My problem is that I see that  Maple2020 has updated a lot of layouts about DrawGraph  graph theory backpack , and I don’t know which ones are working towards the least possible number of crossing of  each edges of graph .

Some links that may be useful:

https://de.maplesoft.com/products/maple/new_features/Maple2020/graphtheory.aspx

https://de.maplesoft.com/support/help/Maple/view.aspx?path=GraphTheory/SetVertexPositions

I think the software can improve some calculations related to topological graph theory, such as crossing number of graph, etc.

## Can I solve one equation in one variable in parall...

Dear All,
I want to solve a highly nonlinear equation in one variable. The equation includes some undetermined parameters. The running time is long in serial programming. Can I help me to execute the following command in parallel? I know that the ‘solve’ command is not thread-safe.

solve(Eq1, beta);

Let me know solve the problem, if the number of equations is larger than one, as below:
solve({eq1,eq2,eq3},{beta1,beta2,beta3});
Best wishes

## Bug in modp1(('Embed')(...))...

Hi all,

There is issue with modp1(('Embed')(...)) function.

bug_embed.mw

As you can see in lines 1, 3, 5 Embed function in combining with Constant cutting several digits from argument.

Thank you.

## How can I solve two equations?...

How I can find the coefficient an, and bn according to the following solution?

the coefficients an and bn can be found by solving the
two linear equations that come from V = V[0] at eta=eta[0] and
V = V[1] at eta=eta[1], and comparing with following Eq in each
case.

Best

2.mw

## Bug in modp1(('Rem')(...))...

Hi there.

It seems like a bug in modp1(('Rem')(...)) with large polynomials with large coefficients.

bug_rem.mw

It needs the file polys.m there:

https://dropmefiles.com/9fATR

File polys.m too big for this forum so I used dropmefiles.

Polys.m contain two polynomials x and f_t with large degrees: degree(f_t) = m = 50021, degree(x) = 2*m - 2 = 100040 and large coefficients up to 2^N, where N = ceil(m / 2)+2 = 25013.

I just compute rem(x,f_t) mod 2^N.

As you can see in the first part of doc bug_rem.mw I decreased coefficients of polynomials by additional mod 2^N (with Embed function), where N = floor(N / 2) = 12506. WIth these decreased polynomials and decreased N modp1(('Rem')(...)) function works well and use maximum about 2.5 Gb of RAM.

But in the second part of doc bug_rem.mw with original polynomials and N = 25013 modp1(('Rem')(...)) use maximum about 3.5 Gb of RAM and crash with error:

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

This is strange and looks like a bug considering that the test server has 48 Gb of RAM.

Is it a bug or modp1(('Rem')(...)) just need more than 48 Gb of RAM?

How many RAM it needs for this computation?

Thank you