## Galerkin method...

I am dealing with a system of differential equations and this method is galerkin method i just cant understand why it is not working for positive Rn parameter value.

 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 > for i from 1 by 1 to n do;
 > for j from 1 by 1 to n do;
 > M1[i,j]:=F1(i,j);M2[i,j]:=F2(i,j);M3[i,j]:=F3(i,j);;M1;M2;M3;
 > M4[i,j]:=F4(i,j);M5[i,j]:=F5(i,j);M6[i,j]:=F6(i,j);;M4;M5;M6;
 > M7[i,j]:=F7(i,j);M8[i,j]:=F8(i,j);M9[i,j]:=F9(i,j);;M7;M8;M9;
 > end do;
 > end do;
 >
 >
 > M[1 .. n, 1 .. n] := M1 : M[1 .. n, n+1 .. 2*n] := M2 :  M[1 .. n, 2*n+1 .. 3*n] := M3:
 > M[n+1 .. 2*n, 1 .. n] := M4  :  M[n+1 .. 2*n, n+1 .. 2*n] := M5 : M[n+1 .. 2*n, 2*n+1 .. 3*n] := M6 :
 > M[2*n+1 .. 3*n, 1 .. n] := M7 : M[2*n+1 .. 3*n, n+1 .. 2*n] := M8  :  M[2*n+1 .. 3*n, 2*n+1 .. 3*n] := M9:
 >
 >

 >
 >
 >

 > T1:=[];T2:=[];
 > for Q from 0 by 20 to 100 do;
 > eq := LinearAlgebra:-Determinant(M)= 0;
 > m:=solve(eq, R):
 > mi:=Optimization[Minimize](m, k = 0 .. 7);
 > T1:=[op(T1),[Q,rhs(mi[2][1])]];
 > T2:=[op(T2),[Q,mi[1]]];
 > end do:
 > p1:=evalm(T1);
 > p2:=evalm(T2);
 > writedata("p1-Peinf-x00001.txt", p1, float);
 > writedata("p2-Peinf-x00001.txt", p2, float);
 >
 (5)
 >
 >
 >
 >
 >
 >
 >

I just want to plot when Rn value is non-zero.

## Tubeplot colors...

When displaying two tubeplots together, we may specify their colors at will, as long as they are different colors!  For instance, specifying red and green works correctly, but specifying red and red results in red and black!

See the attached worksheet.  Interestingly, when displaying the contents of the worksheet on this website, the colors are rendered correctly!  So don't go with what you see on this web page; look inside the worksheet instead.

 > restart;
 > kernelopts(version);

 > with(plots):

Two intersecting tori colored red and green -- works as expected:

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2), style=surface, color=[red,green]);

When we set both colors to red, one of the surfaces is painted black!  Why?

Please note: This website displays the colors corectly as red and red.  But

within the worksheet the colors are read and black.

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2), style=surface, color=[red,red]);

Specifying colors as red/red within the tubeplots still produces red/black!

 > display(         tubeplot([cos(t), 0, sin(t)], t=-Pi..Pi, radius=0.2, color=red),         tubeplot([cos(t), sin(t), 0], t=-Pi..Pi, radius=0.2, color=red), style=surface);

PS: As a workaround, we may replace the red & red specification with
COLOR(RGB, 1, 0, 0) and
COLOR(RGB, 1, 0, 0.01)
which are different enough to make Maple happy, but produce essentially the same red color.

## Big problems with parabolic groups in the "LieAlge...

Hi,

I use Maple version 2022.1 on macOS 10.14.6.

I have big problems with the parabolic groups in the "LieAlgebra" package.

First of all in the help for "Query > Parabolic", the link refers to the help page for the commands "CylinderU, CylinderV, CylinderD" which have nothing to do with it. Also, the command "Query(Alg, "Parabolic")" does not work.

Below is a list of commands that give an error for "Query".

```restart:with(LinearAlgebra):with(DifferentialGeometry):with(LieAlgebras):

L:=[
Matrix(5, 5, [[0, 0, 1, 1, 1], [0, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 1, 0, 1, 1], [-1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 1, 1, 0, 1], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [-1, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 1, 1, 1, 0], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [-1, 0, 0, 0, 0], [0, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 0, 0], [0, -1, 0, 0, 0], [0, -1, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 1, 0, 1], [0, -1, 0, 0, 0], [0, 0, 0, 0, 0], [0, -1, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 1, 1, 0], [0, -1, 0, 0, 0], [0, -1, 0, 0, 0], [0, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, -1, 0, 0], [0, 1, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, -1, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, -1, 0, 0], [0, 1, 0, 1, 0], [0, 0, -1, 0, 0], [0, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, -1, 0], [0, 0, 0, -1, 0], [0, 1, 1, 0, 0], [0, 0, 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 1], [0, 0, -1, 0, 0], [0, 0, -1, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, -1, 0], [0, 0, 1, 0, 1], [0, 0, 0, -1, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, -1], [0, 0, 0, 0, -1], [0, 0, 1, 1, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, -1, 0], [0, 0, 0, 0, 0], [0, 1, 0, 0, 1], [0, 0, 0, -1, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, -1], [0, 0, 0, 0, 0], [0, 0, 0, 0, -1], [0, 1, 0, 1, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, -1], [0, 0, 0, 0, -1], [0, 0, 0, 0, 0], [0, 1, 1, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, -1/2*sqrt(2), -1/2*sqrt(2), -1/2*sqrt(2)], [0, 1/2*sqrt(2), 0, 0, 0], [0, 1/2*sqrt(2), 0, 0, 0], [0, 1/2*sqrt(2), 0, 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 1/2*sqrt(6), 1/6*sqrt(6), 1/6*sqrt(6)], [0, -1/2*sqrt(6), 0, -1/3*sqrt(6), -1/3*sqrt(6)], [0, -1/6*sqrt(6), 1/3*sqrt(6), 0, 0], [0, -1/6*sqrt(6), 1/3*sqrt(6), 0, 0]]),
Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 2/3*sqrt(3), 1/6*sqrt(3)], [0, 0, 0, 2/3*sqrt(3), 1/6*sqrt(3)], [0, -2/3*sqrt(3), -2/3*sqrt(3), 0, -1/2*sqrt(3)], [0, -1/6*sqrt(3), -1/6*sqrt(3), 1/2*sqrt(3), 0]]), Matrix(5, 5, [[0, 0, 0, 0, 0], [0, 0, 0, 0, 1/2*sqrt(5)], [0, 0, 0, 0, 1/2*sqrt(5)], [0, 0, 0, 0, 1/2*sqrt(5)], [0, -1/2*sqrt(5), -1/2*sqrt(5), -1/2*sqrt(5), 0]])];

DGsetup(LieP);
Query(Alg,"Parabolic");```

## How to remove the mosaic of vertices?...

I  generated some graphs via maple and would like to put them in my paper. So I am going to convert the following worksheet to pdf.

```with(GraphTheory):
Graphs:=[NonIsomorphicGraphs(6,8,output=graphs,outputform = graph)]:
num_g:=nops(Graphs):
num:=ceil((num_g)/5.):
M1:=Matrix (num,5,(i,j)->`if`((i-1)*5+j<=num_g, DrawGraph(Graphs[(i-1)*5+j],size=[250,250] ,overrideoptions ,showlabels=false,style=planar, stylesheet =  [
vertexcolor     = orange
,vertexfontcolor = black
,vertexborder    = false
,edgethickness   = 0.6
,edgecolor       = MidnightBlue
,vertexshape     =  "circle"
,vertexfont      = [Arial, 4],
vertexthickness=5], caption = cat(H__,5*(i-1)+j),captionfont=["ROMAN",7]),plot(x = 0 .. 1, axes = none))):
DocumentTools:-Tabulate (M1[1..5,.. ],widthmode=percentage ,width=80 , exterior =all) :
```

But there was a problem with the exported pdf. There was some mosaic stuff at the vertices of all those graphs. It was strange. (I want to reduce the size of vertices of the graphs in order not to look crowded.)

Only when I insert the option vertexpadding and set a large enough size  of vertex (for this example, we set vertexpadding=7),  it won't go wrong. However, in fact, we often need make vertice‘s size smaller , especially when there are more vertices.

## how to give variable a type and also make it stat...

I need to make my base class local variable static, so that when extending the class, the subclass will share these variable and use their current values as set by the base class. If I do not make them static, then the base class when extended, will get fresh instance of these variable, losing their original values, which is not what I want.

To do this, one must make the base class variables static

This works, but now I do not know the syntax where to put the type on the variable.

I can't write   local m::integer::static; nor local m::static::integer;

I could only write local m::static; but this means I lost the ability to have a type on the variable and lost some of the type checking which is nice to have in Maple. From Maple help:

Here is example

```restart;

base_class:=module()
option object;
local n::static;  #I want this type to ::integer also. But do not know how

export set_n::static:=proc(_self,n::integer,\$)
_self:-n := n;
end proc;

export process::static:=proc(_self,\$)
local o;
o:=Object(sub_class);
o:-process();
end proc;
end module;

sub_class:=module()
option object(base_class);
process:=proc(_self,\$)
print("in sub class. _self:-n = ",_self:-n);
end proc;
end module;

o:=Object(base_class);
o:-set_n(10);
o:-process()

"in sub class. _self:-n = ", 10```

The above is all working OK. I just would like to make n in the base class of type ::integer as well as ::static

Is there a syntax for doing this?

## How to make Exported equations readable in excel?...

I have a set of formulas I saved in a matrix and the exported the matrix to Excel. However when I open the file in Excel the equations are in prefix notation (I think).  That's not exactly human readable friendly.  If I copy and paste straight into excel they are readable.

It there a way to make the Maple export similar?

EDIT:-  I exported as a.csv file because if export as .xlsx    all the equation change into "#NUM!" in the spreadsheed.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

 (10)

 (11)

 (12)

 (13)

 (14)

 (15)

 (16)

 (17)

 (18)

 (19)

## Color Error in plot ...

Hi.

What wrong could be there with the color line?

 > restart:
 > with(plots):
 > equ1 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4):
 > equ2 := BesselJ(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t)*sqrt(2))/t^(1/4):
 > equ3 := BesselJ(sqrt(17)/2, 10*sqrt(t))/t^(1/4) + 5*BesselY(sqrt(17)/2, 10*sqrt(t))/t^(1/4):
 > tmax   := 30: colors := ["Red", "Violet", "Blue"]: p1 := plot([equ1, equ2, equ3], t = 0 .. tmax, labels = [t, T[2](t)], tickmarks = [0, 0], labelfont = [TIMES, ITALIC, 12], axes = boxed, color = colors): ymin := min(op~(1, op~(2, op~(2, [plottools:-getdata(p1)])))): ymax := max(op~(2, op~(2, op~(2, [plottools:-getdata(p1)])))): dy   := 2*ymax:
 > legend1 := typeset(C[3] = 1, ` , `, C[4] = 1, ` , `, Omega^2 = 50): legend2 := typeset(C[3] = 1, ` , `, C[4] = 5, ` , `, Omega^2 = 50): legend3 := typeset(C[3] = 1, ` , `, C[4] = 5, ` , `, Omega^2 = 25): p2 := seq(textplot([tmax-2, ymax-k*dy/20, legend||k], align=left), k=1..3):
 > p3 := seq(plot([[tmax-2, ymax-k*dy/20], [tmax-1, ymax-k*dy/20]], color=colors[k]), k=1..3): display(p1, p2, p3, view=[default, -ymax..ymax], size=[800, 500])
 (1)
 >

## Maple and Matlab2022a...

1. I use both Maple and Matlab
2. I also install (a stripped down version of) Maple as the "symbolic toolbox" for Matlab using the executable MapleToolbox2022.0WindowsX64Installer.exe, which lives in C:\Program Files\Maple 2022. This gives me acces to (some) symbolic computation capability from within Matlab.
3. This installation process has been working for as long as I remember, certainly more than 10 years
4. With Maple 2022 and Matlab R2022a, this installation process ran with no problems and I can perform symbolic computation within Matlab
5. However, although the Matlab help lists the Maple toolbox as supplemental software (as in all previous releases), I can no longer acces help for Maple from within Matlab - I just get a "Page not found" message
6. The relevant Maple "help" is at the same place within the Matlab folder structure which is C:\Program Files\MATLAB\R2022a\toolbox\maple\html
7. I have just spoken to support at Matlab and they claim tha this must be a Maple (or Maple toolbox installer issue) - so nothing to do with them!
8. Has anyone else had a similar problem andd found a workaround?

## How does fsolve work?...

When using the built-in fsolve function to find the roots of a polynomial, how does exponentiation occur? For example, x3 is found​​​​​​first, and then to find x4, will he start again from the beginning, that is, x*x*x*x, or will he take the value of x3​​​​​​ and multiply by x? The teacher is interested in finding out this, but I don't know how to find out myself.

## why expanding PDE makes Maple hangs?...

To Maple support:

I was investigating this pde from a different forum.

I noticed that when using an expanded version of the pde, Maple hangs. Without expanding the PDE, Maple gives an answer in 2 seconds.

Why does expanding the PDE makes a difference? I do not have an earlier version of Maple on my new PC to check if this is a new issue or not.

 > interface(version);

 > Physics:-Version()

 > restart; pde1:=VectorCalculus:-Laplacian(u(r,theta),'polar'[r,theta]); pde1_expanded:=expand(pde1); bc  := u(1,theta)=sin(theta)^4,u(3,theta)=1; pdsolve([pde1=0,bc],u(r,theta))

 > pdsolve([pde1_expanded=0,bc],u(r,theta)); #HANGS, Waited more than 40 minutes.
 >

## Help! Symbolic optimization...

Hi everyone! I'd really appreciate if I could get pointed in the right direction as I am a brand new maple user.

So im trying to solve this constrainted optimization problem (See picture) using Maple symbollically. I believe I should have a closed form solution given I can substitute the one constraint into the objective function. Specifically closed form solutions for the three phi variables.

Can someone point me in the right direction as to how I should go about this? I've already taken first order conditions and tried to using the solve() function to no avail, realizing my sytem of equations weren't linear );.

Hi there.

There is some floating bug in Thread-Seq.

Maple is crashing sometimes (not always, 50/50) after running the script below:

What's going on?

## Error:-'IsTrigProc'[resolved]...

Hi,all

I am new in Maple,when I execute the "InversePlot" command ,all functions were correct except for exp(x), error occurs as follows, can anyone tell me what mistake I took?

restart;
with(Student[Calculus1]);

InversePlot(exp(x), -1 .. 1);
Error, (in Student:-Calculus1:-InversePlot) module does not export `IsTrigProc`

Tks for all you guys.

I have uninstall Maple and deleted the installed directory ,clear the register,reinstall Maple 2022, now all works well.

I think the problem is I installed Maple 2022 in the old directory of 2021for keeping my configuration,this caused much unexpected problem

## Fatal Maple Error in simple linear algebra on Ubun...

> with(LinearAlgebra) :
> a:=<<.1,.2>|<.3,.4>>:
> ScalarMultiply(a,.1);

INTEL MKL ERROR: /home/jet08013/maple2022/bin.X86_64_LINUX/libmkl_gf_lp64.so: undefined symbol: mkl_blas_cdgmm_batch_strided.
Intel MKL FATAL ERROR: Cannot load libmkl_gf_lp64.so.
maple: fatal error, lost connection to kernel

This is EXTREMELY inconvenient.

## Is this a bug with DEQueue?...

Maple 2022:

It appears that one can use push_back() with an empty DEQueue(), but not push_front().

Since the queue is double-ended and empty, this doesn't make much sense to me. So should this be considered a "bug"?

See the attached

 > restart:
 > # # This works #   A:=DEQueue();   empty(A);     push_back(A,2);
 (1)
 > # # But this results in an error! #   B:=DEQueue();   empty(B);   push_front(B,2);
 >