## Reduce vertex size as much as possible....

I got some planar graphs and I 'd like show their planar drawing. But the graph layout displayed by maple may not so balanced.

In the example below, we can see that the area of ​​the triangle 678 is too small, vertices 9, 10, 11 are crowded inside. I need to reduce the vertex size to better show it. Three vertices, say 9,10,11, in following planar drawing are not the right size.

with(GraphTheory):
d:=ConvertGraph("J|tZHkD@gF_"):
DrawPlanar (d, stylesheet=[ ],font=["Courier",10])

Vertexpadding doesn’t seem to help with vertex size reduction.

Ps：The algorithm used is Tutte's spring (or rubber) method.

Maybe there is a better solution.

If we don’t adjust the vertex size, I don’t know if there is any other solution to improve the overall layout. It is best not to appear crowded.

## problem generating latex for hbar....

Maple generates latex for hbar as  \mathit{hbar}  instead of just \hbar which makes it not render in PDF.  Here is an example

expr:= hbar*x;
latex(expr)


The screen display is correct. But not the latex. When compiling the above in Latex this is the output

\documentclass[12pt]{article}
\usepackage{amssymb}

\begin{document}

%Maple generated
$\mathit{hbar} x$

%default
$\hbar x$

%need amssymb for this
$\hslash x$
\end{document}

Compiling the above gives

So to use the standard hbar,  \mathit should not be used around it.

ps. I like \hslash more myself than \hbar , so if there is a choice, will vote for \hslash for latex.

Maple 2021, windows 10.

Physics:-Version()
The "Physics Updates" version in the MapleCloud is 973 and is

the same as the version installed in this computer, created

2021, May 3, 18:54 hours Pacific Time.

## Table output question....

I was taking notes from a video and fromatting them in a table so I could pring them.

I an using the commands in the context panel to keep things neat.

I can't get this to work for the last row of the table. when I select the equation, the right context panel changes to information about the table and the commands for manipulating the equations are not available. This occurs on the tenth row or later.

I have since tried interface(rtablesize = [12,12]) but that didnt help.

If I run the document I can get the 10th row to solve by displaying the output first and then using the commands from the context panel

2*a[0]*a[9]*c[2] + 2*a[1]*a[8]*c[2] + 2*a[2]*a[7]*c[2] + 2*a[3]*a[6]*c[2] + 2*a[4]*a[5]*c[2] + a[9]*c[1];

8
1430 c[2]
---------- + a[9] c[1]
16
c[1]

"(->)"

solve( 1430*c[2]^8/c[1]^16 + a[9]*c[1]=0, a[9] );
8
1430 c[2]
- ----------
17
c[1]

"(->)"

a[9] := -1430*c[2]^8/c[1]^17: 'a[9]';
a[9]



## Maple generates different latex using Typesetting ...

I only use latex() to convert Maple solution to Latex. I do not export whole document to Latex.

When I ask Maple to convert this solution of a PDE to latex, it generated strange Latex which is different, from the Latex it generates for same solution, when doing File->Export As->Latex.

The Latex it generated in the export case, is the one I want. The latex it generates from the latex() command, I am not able to use and is completely different. It has things like \mathit{Typesetting} and other different latex.

Why is that? And how to make it generates the same Latex for this expression as in the export case?

First I show screen shot, then the worksheet to reproduce it

But Now when I save this worksheet (with only the expression I want)

Using File->Export As->Latex, and then look at the latex for the "sol" in the latex file generated, this is what it shows (I am only showing the latex part of the above, not the whole file)

\begin{maplelatex}
\mapleinline{inert}{2d}{}
{$\mathit{sol} \coloneqq u \left(r ,t \right)=\mathcal{L}^{-1} \left(\frac{\mathrm{BesselJ}\left(0,10 \sqrt{-s}\, r \right) s} {\mathrm{BesselJ}\left(0,20 \sqrt{-s}\right) \left(s^{2}+1\right)},s ,t \right) -\mathcal{L}^{-1}\left(\frac{\mathrm{BesselJ}\left(0,10 \sqrt{-s}\, r \right)} {\mathrm{BesselJ}\left(0,20 \sqrt{-s}\right) s},s ,t \right) -\cos \left(t \right)+1$}
\end{maplelatex}

The above latex I can compile standalone, and it does not have the problematic constructs found when using latex(sol)

One can see it is very different from the top one given earlier.

Why are the two latex different? Is there an extra setting one needs to adjust?  How make latex(sol) generate the same latex for the expression as found in the file generated by export as latex?

may_2.mw

update 1

Did some debugging. The problem happens when using :-executeprintroutines.  Tracing the latex() command in the debugger. At lines 42, it has the call

texlist := [latex:-Print(e,_rest,':-executeprintroutines',':- handleimaginaryunit',':-performonlyoncetasks',opt)];

Where above is the expression to convert to Latex. When I removed ':-executeprintroutines' the problems in latex went away. Here is an example

restart;
sol:=u(r,t) = invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))*s/(s^2+1),s, t) - invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))/s,s, t)- cos(t) + 1;
latex:-Print(sol)


Gives

"u ! left(r , t\right)",  = , \\mathit{invlaplace}
\\! \\left(\\frac{\\mathit{BesselJ}\\! \\left(0, 10 \\sqrt{-s}\\, r \\right) s}
{\\mathit{BesselJ}\\! \\left(0, 20 \\sqrt{-s}\\right) \\left(s^{2}+1\\right)}, s , t\\right)
-\\mathit{invlaplace} \\! \\left(\\frac{\\mathit{BesselJ}\\!
\\left(0, 10 \\sqrt{-s}\\, r \\right)}{\\mathit{BesselJ}\\! \\left(0, 20 \\sqrt{-s}\\right) s}, s , t\\right)
-\\cos \\! \\left(t \\right)+1

Now notice what happens when adding ':-executeprintroutines'

restart;
sol:=u(r,t) = invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))*s/(s^2+1),s, t) - invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))/s,s, t)- cos(t) + 1;
latex:-Print(sol,':-executeprintroutines')


it gives the problematic latex

"u ! left(r , t\right)",  = , \\mathit{Typesetting}\\mcoloneq \\mathit{msup}\\!
\\left(\\mathit{Typesetting}\\mcoloneq \\mathit{mi}\\!
\\left(\\text{\\$\\mathcal\\{L\\}$"}\\right), \\mathit{Typesetting}\\mcoloneq
\\mathit{mrow}\\! \\left(\\mathit{Typesetting}\\mcoloneq \\mathit{mo}\\!
\\left(\\text{\\$-$"}\\right), \\mathit{Typesetting}\\mcoloneq \\mathit{mn}\\!
\\left(\\1"\\right)\\right), \\mathit{Typesetting}\\mcoloneq \\mathit{msemantics}=\\text{\\atomic"}\\right)\\! \\left(\\frac{J_{0}\\! \\left(10
\\sqrt{-s}\\, r \\right) s}{J_{0}\\! \\left(20 \\sqrt{-s}\\right) \\left(s^{2}+1\\right)}, s , t\\right)-
\\mathit{Typesetting}\\mcoloneq \\mathit{msup}\\! \\left(\\mathit{Typesetting}\\mcoloneq
\\mathit{mi}\\! \\left(\\text{\\$\\mathcal\\{L\\}$"}\\right), \\mathit{Typesetting}\\mcoloneq
\\mathit{mrow}\\! \\left(\\mathit{Typesetting}\\mcoloneq \\mathit{mo}\\! \\left(\\text{\\$-$"}\\right),
\\mathit{Typesetting}\\mcoloneq \\mathit{mn}\\! \\left(\\1"\\right)\\right),
\\mathit{Typesetting}\\mcoloneq \\mathit{msemantics}=
\\text{\\atomic"}\\right)\\! \\left(\\frac{J_{0}\\! \\left(10 \\sqrt{-s}\\, r \\right)}
{J_{0}\\! \\left(20 \\sqrt{-s}\\right) s}, s , t\\right)-\\cos \\! \\left(t \\right)+1

I do not know what :-executeprintroutines does and how one can tell latex() not to call it at the user level. I asked about :-executeprintroutines before here

And I could not find any documenation on it.

I tried to define my own executeprintroutines proc() which does nothing. But it did not help

restart;
sol:=u(r,t) = invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))*s/(s^2+1),s, t) - invlaplace(BesselJ(0,10*(-s)^(1/2)*r)/BesselJ(0,20*(-s)^(1/2))/s,s, t)- cos(t) + 1;
executeprintroutines:=proc()
NULL;
end proc;
latex(sol)


The Latex was not fixed. It is same.

May be the above will help find the issue.

## Integral of Dirichlet with LineInt...

Hello,

I am trying to calculate the Dirichlet integral with the residue theorem and the LineInt command. I use the classic lace (Cf below) and the function exp(iz)/z. I don't understand why the LineInt function returns zero on the top semicircle. The result should depend on r and only be zero for limit(%, R = infinity).

## Why Does Use of Superscripted Name in Assignment C...

Attached is a worksheet containing a simple assignment that gives an "illegal use of an object as a name" error. I created the superscripted name in the following way.

1)  type b.

2) click on the Insert|Typesetting|Superscript  item in the insert menu.

3) enter 1 at the cursor in the superscript position.

4)  the result is a name b with superscript 1, but this symbol does not constitute a valid name for an assignment.

 >
 >

## Factorial display question...

I trying to display factorials in a matrix as e.g 6!4!/5! not 144.

 (1)

 (2)

## Float(undefined) Result of GlobalOptimisation...

n := 3;
Digits := 10;
R_const := 8.314;
currentdir();
const := [1, 1, 1];
b := 20;
W := [seq([W[i, 2], W[i, 1]], i = 1 .. nops(W))];
Tempset := seq(W[i, 1], i = 1 .. nops(W));
Rateset := seq(W[i, 2], i = 1 .. nops(W));
Temp := [seq(W[i, 1], i = 1 .. nops(W))];
pdata := plots[pointplot](W, color = red);
pdata;

h[5] := 1;
h[4] := 8.5733287401;
h[3] := 18.059016973;
h[2] := 8.6347608925;
h[1] := 0.2677737343;
p[5] := 1;
p[4] := 9.5733223454;
p[3] := 25.6329561486;
p[2] := 21.0996530827;
p[1] := 3.9584969228;
r := x -> local m; exp(-x)*add(h[m]*x^(m - 1), m = 1 .. 5)/(x*add(p[m]*x^(m - 1), m = 1 .. 5));

q := (i, x) -> -Temp[1]*exp(-E_sim[i]/(R_const*Temp[1])) + E_sim[i]*r(E_sim[i]/(R_const*Temp[1]))/R_const + x*exp(-E_sim[i]/(R_const*x)) - E_sim[i]*r(E_sim[i]/(R_const*x))/R_const;

for i to n do
R[i] := [seq(1 - exp(-A_sim[i]*const[i]*q(i, Temp[j])/b), j = 2 .. nops(Temp))];
end do;
for i to n do
Der[i] := [seq(c_sim[i]*A_sim[i]*const[i]*exp(-E_sim[i]/(R_const*Temp[j]))*(1 - R[i][j]), j = 1 .. nops(Temp) - 1)];
end do;
Deriv := add(Der[i], i = 1 .. n);
model := [seq([Temp[i], Deriv[i]], i = 1 .. nops(R[1]))];
objective := add((W[i, 2] - model[i, 2])^2, i = 1 .. nops(Temp) - 1);
with(GlobalOptimization);
infolevel[GlobalOptimization] := 3;
Results := GlobalOptimization[GlobalSolve](objective, {add(c_sim[i], i = 1 .. 3) <= 1}, c_sim[1] = 0.05 .. 0.06, c_sim[2] = 0.85 .. 0.88, c_sim[3] = 0.05 .. 0.6, E_sim[1] = 33880 .. 33890, E_sim[2] = 40220 .. 41230, E_sim[3] = 23230 .. 23235, A_sim[1] = 2453 .. 2455, A_sim[2] = 190 .. 192, A_sim[3] = 1830 .. 1832, timelimit = 7200);
[GetLastSolution, GlobalSolve, Interactive]

Results := [Float(undefined), [A_sim[1] = 2454.85789978944,

A_sim[2] = 190.143107633747, A_sim[3] = 1831.19959951461,

E_sim[1] = 33883.8826959700, E_sim[2] = 40796.6139830241,

E_sim[3] = 23230.4022199775, c_sim[1] = 0.0558944062681716,

c_sim[2] = 0.851532317382881, c_sim[3] = 0.0845465106500359]]

DEV_perc := 100*sqrt(Results[1]/(nops(Temp) - 3*n))/max(Rateset);
DEV_perc := Float(undefined) + Float(undefined)

Unsolved for Maple?

## Help Menu choices only work ounce. 2021 bug ?...

I am just evaluating Maple 2021 under Windows 10 and I have something strange happening when I press F1 for Help or I select Maple Help in Help Menu. The first time the help window will appear but if I close it then impossible to view it again by pressing F1 or by selecting it in the Help menu. Also the same for other choices in the help menu like

Maple Help F1
Maple Portal
Study Guides
What's New

But any choices inside On the web will always work.

I am using Windows 10 latest release in french and the keyboard layout in ENG I don't think it is related but just in case someone ask me.

Have you notice the same problem ?

## How do I perform quick variable replacements in Ma...

I have used the open source maxima quite a bit, and variable replacement was easy. For example:

3x+2y,x=20,y=5

3x+2y,x=3m-4p,y=(a+b)^2

I could combine very easily, like:

a=3x+2y             (%1)

4a-2b,%1

%1,x=5,y=7

and so on...I use variable replacement in equations VERY regularly, and so far, all I have found is having to use a mouse and select "Evaluate at a point". I'm not even sure I could put other equations in there if I wanted to. Even if it does work, the more complicated scenarios that I did routinely in maxima would still be virtually impossible this way.

Thus, the question is, is there doc somewhere on how to make various variable replacements, and equation combining like this easy?

## How do I solve the heat equation in spherical coor...

I'm trying to understand what I need to do to get Maple to solve the heat equation in spherical coordinates. I'm considering a test problem: a spherical shell with inner radius 1 and outer radius 2. Boundary conditions require the temperature of the inner and outer surfaces are to always equal zero. The initial condition requires the temperature inside the shell to be -sin(pi*r).

The attached worksheet provides my attempt to solve this problem. Executing this worksheet will quickly give a general solution but this does not include the initial condition. If this is included then Maple fails to give a solution even after a 20 min wait.

Could someone offer me guidance on how to proceed?

shell.mw

## Is it possible to Add/sum by mapping multiple valu...

I want to sum a series by getting multiple values from a list.  Based on the list L I was trying

add(A, [m2, m3] in L)   This seem to have dissapeared from the document but the error message remains.

 (1)

 (2)

I found this code by Kitonum 16740  https://www.mapleprimes.com/questions/138955-How-Do-I-Create-A-Variable-Number-Of-Nested-Loops-

 (3)

 (4)

 (5)

Instead of using I would like to map m2 and m3 to the values in list L and sum them. This should give a method for having a variable number of loops

I tried variants off without success

for the next higher order would need to map m2,m3, m4 to the generated list.

 (6)

 (7)

 (8)

## Sums as hypergeometric. Why?...

I have two summations that Maple converts to hypergeometric outputs. Is there a way to stop that?

I dont know how to get Maple to expand the Hyper geometric output for a given walue of N

if the value of N is defined first the output is as I would expect.

The real problem, the sumations are nested and when I get to four nested sums Maple sits there for hours trying to evaluate the general case.

I have only included the first 2 summations.

Any insights on this would be appreciated.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

## Warning, no iterations performed as initial point ...

What is the reason for the warning?

restart;
f := (x, y, z) -> 1 - x^4 + ln(x^4) + z^4 - y^4 - y^4*(ln(z^4) - ln(y^4));

with(Optimization);
Minimize(f(x, y, z), {x^2 + y^2 - z^2 - 1 = 0, 0 <= x - 1, 0 <= y - x, 0 <= z - y});
Warning, no iterations performed as initial point satisfies first-order conditions
[0., [x = 1., y = 1., z = 1.]]

## Invalid Minus Error...

I'm trying to lad a comma separated data set and I get an "Invalid minus error".  Neither the filename nor the data set has a minus anywhere in them.  See attached file:  SST Gm Stats.mw