Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Hi!

I'm having problems with my maple not saving. I get no error message and no windows pop up.
The error occurred after the summer holidays in Maple 2022. I use Windows 11, everything is up to date. Have no Anti-virus programs.

  I have tried the following after I discovered the error:
- To install Maple 2023
- Uninstall and delete all maple folders, then reinstall Maple 2023
- Pressed Ctrl + s
- Press "Save as..."
- Pressed on the floppy disk/save icon
- Restarted computer and updated windows
- Run Maple as administrator

The only thing I can be allowed to do is:
- Ctrl + p
- Print to PDF/printer

Really hope you can help!

Dear power users, I am making the switch from Mathcad towards Maple and would like to know what is the most efficient alternative in Maple for a solve block. I have attached a work document to illustrate better my question.SolveBlockQuestion.mw Any help is highly appreciated.

I don't know where my last exchange with @mz6687  has been moved (not to the initial question  https://www.mapleprimes.com/questions/237066-Determinant-The-System-Hangs for what I see).
Nevertheless here is the reply I was sending to @mz6687  which ended with the message "Page not found".
Are_you_ok_with_that.mw

Could the one who moved the question meanwhile be so kind as to attach this reply?
TIA

Hi,

I want the T2 code to run like T1, but it doesn't, what's the reason?

T1.mw

T2.mw

For some of the users with eye problems like me, the white canvas is burning eyes out of sockets as the monitor needs to be close up. Even turning down the intensity do not work especially since all other applications on Linux can be configured to have a dark-theme, but NOT Maple it seems.

What is the reason for this resistance from Maple Developers to just ram this white canvas down our throats verion after version.

Users have been asking since about Maple 11 to change  this.

I mean, Maple is not exactly cheap, which would have been an excuse, and is formidable intellectual software, so "ability" should not be a problem

However am I to believe that just changing the canvas color, turns out to be  a serious intellectual challenge for developers ?

Google yields such custom canvas request spanning more than a decade, but users arrive at crickets and a dead end.

Please be kind and give us a customizable canvas or any DARK theme of your choice for users with visual challenges and the lots of normal users who also want a custom canvas color or dark theme. It is overdue.

At the moment I use the cumbersome table-solution with a gray background, which helps some, but it is clunky and no alternative for long term use as the window and bars itself are still white and distracts and defeats the objective somewhat.

`c₁₁`, `c₁₂`, `c₁₃`, `e₃₁`, `c₆₆`, `c₄₄`, `e₁₅`, rho, `ϵ₁₁`, `ϵ₃₃` = constants;
`U₁` := unapply(`U₁`(t, x, y, z), x, y, z, t);
`U₂` := unapply(`U₂`(t, x, y, z), x, y, x, t);
`U₃` := unapply(`U₃`(t, x, y, z), x, y, z, t);
phi := unapply(phi(t, x, y, z), x, y, z, t);

PDE1 := `c₁₁`*Diff(`U₁`, y, y) + `c₁₂`*Diff(`U₂`, x, y) + `c₁₃`*Diff(`U₃`, x, z) + `e₃₁`*Diff(phi, x, z) + `c₆₆`*Diff(`U₂`, x, y) + `c₆₆`*Diff(`U₁`, y, y) + `c₄₄`*Diff(`U₃`, x, z) + `c₄₄`*Diff(`U₁`, z, z) + `e₁₅`*Diff(phi, x, y) = rho*Diff(`U₁`, t, t);

PDE2 := `c₆₆`*Diff(`U₂`, x, y) + `c₆₆`*Diff(`U₁`, y, x) + `c₁₂`*Diff(`U₁`, x, y) + `c₁₁`*Diff(`U₂`, y, y) + `c₁₃`*Diff(`U₃`, y, z) + `e₃₁`*Diff(phi, z, y) + `c₄₄`*Diff(`U₃`, y, z) + `c₄₄`*Diff(`U₂`, y, z) + `e₁₅`*Diff(phi, y, z) = rho*Diff(`U₂`, t, t);


PDE3 := `c₄₄`*Diff(`U₃`, x, x) + `c₄₄`*Diff(`U₁`, z, x) + `e₁₅`*Diff(phi, y, x) + `c₄₄`*Diff(`U₃`, y, y) + `c₄₄`*Diff(`U₂`, z, y) + `e₁₅`*Diff(phi, y, y) + `c₁₃`*Diff(`U₁`, x, z) + `c₁₃`*Diff(`U₂`, y, z) + `c₃₃`*Diff(`U₃`, z, z) + `e₃₃`*Diff(phi, z, z) = rho*Diff(`U₃`, t, t);

PDE4 := `e₁₅`*Diff(`U₃`, x, x) + `e₁₅`*Diff(`U₁`, y, x) - `ϵ₁₁`*Diff(phi, x, x) + `e₁₅`*Diff(`U₃`, yx y) + `e₁₅`*Diff(`U₂`, z, y) - `ϵ₁₁`*Diff(phi, y, y) + `e₃₁`*Diff(`U₁`, y, z) + `e₃₁`*Diff(`U₂`, y, z) + `e₃₃`*Diff(`U₃`, x, z) - `ϵ₃₃`*Diff(phi, z, z) = 0;

pds := [PDE1, PDE2, PDE3, PDE4];
sol := pdsolve(pds);

i was solving the above set of pde. but it was showing the following errors,

Error, (in U₁) too many levels of recursion
Error, (in unapply) variables must be unique and of type name
Error, (in U₃) too many levels of recursion
Error, (in phi) too many levels of recursion
Error, (in pdsolve/sys/info) required an indication of the solving variables for the given system

can anyone help me?

In help(EllipticF): Why is the parameter k not called “the modulus of the elliptic function” as in the definition of the inverse Jacobi functions in help(InverseJacobiPQ)?

Instead, it is called “the parameter” which can be confused with the parameter m=k^2 used in other notations (which is refered to "a parameter m" in the EllipticF help page).

Is there a reason for this, or should the parameter definitions of the first, second and thrid elliptic integrals not be aligned with the parameter definitions of the Jacobi functions and their inverses?

DLMF for example defines k as modulus for both, the Elliptic Integrals and the Jacobian Elliptic Functions.

A user who wants to transfer an expression from a different notation to Maple might misinterpret parameters.

The interrupt button is great for stopping long calculations. But if there is an accidental calculation of a long list that has a mistype for example and the computer is busy calculating behind the scenes getting ready to output to the screen (evaluating icon has a heartbeat) there is no interrupt for that.  You either wait for the output or kill maple and start again (you may be able to save the worksheet before you close it - that might be an option).

I am reading (and enjoying) this:

"On the computation of the nth decimal digit of various transcendental numbers" by

Simon Plouffe, 1996 (2009)

On the third page Simon calculates this:


a := 1/binomial(100, 50);
                                 1               
              a := ------------------------------
                   100891344545564193334812497256

ifactor(denom(a));
                                                           
(8)  (81)  (11) (13) (17) (19) (29) (31) (53) (59) (61) (67) (71) (73) (79) (83) (89) (97)

and builds a sum of fractions where the above primefactors are the denominators in this sum.

5/8 + 20/81 + 10/11 + 2/13 + 13/17 + 10/19 + 4/29 + 5/31 + 23/53 + 41/59 + 29/61 + 37/67 + 33/71 +19/73 + 36/79 + 7/83 + 13/89 + 88/97

Solving a diophantine equation and using continued fractions are the steps to get that fractions (see link above).

May someone explain these steps to me ?

Thanks

The following code effectively converts the image to the JPG format.
with(GraphTheory):
s:=DrawGraph(CompleteGraph(5),size=[250,250])
Export("D:\\s1.jpg",s)

But I would like to export it using PDF format. However, the modified code below seems to be quite unsuccessful. I am aware that Maple has export options in the front end, but I still prefer to use code for this purpose.

Export("D:\\s1.pdf",s)

Error, (in Export) invalid input: member received _ImportExport:-InfoTable["PDF"][4], which is not valid for its 2nd argument, s

There are two reasons for this.

with(GraphTheory):
Graphs:=[NonIsomorphicGraphs(6,8,output=graphs,outputform = graph)]:
num_g:=nops(Graphs):
num:=ceil((num_g)/5.):
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):

Since strings are not mutable objects in Maple, the package provides two procedures, StringTools:-OldStringBuffer and StringTools:-StringBuffer, which appear heavily correlated with Java's  and . 

The help page of StringBuffer claims that use of a is much more efficient than the naive approach: 

(*
`G` and `F` are taken from the link above.
*)
G := proc()
   description "extremely inefficient string concatenator";
   local   r;
   r := proc()
       if nargs = 0 then
           ""
       elif nargs = 1 then
           args[ 1 ]
       else
           cat( args[ 1 ], procname( args[ 2 .. -1 ] ) )
       end if
   end proc;
   r( args )
end proc:
# # This can be transformed into an O(1) algorithm by passing a string buffer to the recursive calls.
F := proc()
   description "efficient version of G";
   local    b, r;
   b := StringTools:-StringBuffer();
   r := proc()
       if nargs = 1 then
           b:-append( args[ 1 ] )
       else
           b:-append( args[ 1 ] );
           procname( args[ 2 .. -1 ] )
       end if
   end proc;
   r( args ):-value()
end proc:
s := 'StringTools:-Random(10, print)' $ 1e4:
NULL;
time(G(s));
                             5.375

time(F(s));
                             1.125

But why not use the built-in cat directly? 

time(cat(s));
                               0.

time(StringTools:-Join([s], ""));
                               0.

Clearly, this is even more efficient

Here is the last example in that link. 

FilterFile := proc( fname::string, filter )
   local   b, line;
   b := StringTools:-StringBuffer();
   do
       line := readline( fname );
       if line = 0 then break end if;
       b:-append( filter( line ) )
   end do;
   b:-value()
end proc: # verbatim 
filename__0 := FileTools:-JoinPath(["example", "odyssey.txt"], 'base' = 'datadir'):
filename__1 := URL:-Download("https://gutenberg.org/ebooks\
/2600.txt.utf-8", "War-and-Peace.txt"):

fclose(filename__0):
    time[real]((rawRes0 := FilterFile(filename__0, StringTools:-Unique)));
                             0.223

fclose(filename__1):
    time[real]((rawRes1 := FilterFile(filename__1, StringTools:-Unique)));
                             1.097

Nevertheless, 

close(filename__0):
use StringTools, FileTools:-Text in
	time[real]((newRes0 := String(Support~(fscanf(filename__0, Repeat("%[^\n]%*c", CountLines(filename__0))))[])))
end;
                             0.118

close(filename__1):
use StringTools, FileTools:-Text in
	time[real]((newRes1 := String(Support~(fscanf(filename__1, Repeat("%[^\n]%*c", CountLines(filename__1))))[])))
end;
                             0.580

evalb(newRes0 = rawRes0 and newRes1 = rawRes1);
                              true

As you can see, these experiments just tell an opposite story. Isn't the so-called "StringBuffer" obsolete today

restart:
Digits:=30;

h0:=0.156;
d:=0.32*h0;
l:=1;
h1:=h0-d;
h2:=h0+d;
h3:=0.5*h0;
g:=9.8;
d1:=1;
Term:=5;
Num:=150:
n:=1:
l1:=l/n;
p:=2;

for N from 1 to Num do
lambda:=2*n*Pi/l:## N1 wei sha ba tiao shu 
k0:=evalf(0.5*Pi+2*(N-1)*Pi/(Num-1)):
tau0:=evalf(k0*h0):
omega:=evalf((g*k0*tanh(k0*h0))^(1/2)):
E:=g/(omega)^2:
k1:=abs(fsolve(omega^2=g*k*tanh(k*h1),k)):
tau1:=evalf(k1*h1):
k2:=abs(fsolve(omega^2=g*k*tanh(k*h2),k)):
tau2:=evalf(k2*h2):
k3:=abs(fsolve(omega^2=g*k*tanh(k*h3),k)):
tau3:=evalf(k3*h3):

F:=tau->tanh(tau1)+tau*add((eval(diff(tanh(tau),tau$s),tau=tau1))/s!*(tau-tau1)^(s-1),s=1..10);##F1(K)
T:=tau->tanh(tau2)+tau*add((eval(diff(tanh(tau),tau$s),tau=tau2))/s!*(tau-tau2)^(s-1),s=1..10);##F2(K)

P:=tau->(sinh(2*tau)-2*tau*cosh(2*tau))/(2*tau+sinh(2*tau))^2;##P
Q:=tau->(16*tau^4+32*tau^3*sinh(2*tau)-9*sinh(2*tau)*sinh(4*tau)+12*tau*(tau+sinh(2*tau))*((cosh(2*tau))^2-2*cosh(2*tau)+3))/3/(2*tau+sinh(2*tau))^4; ##Q
A:=unapply(taylor(2*(tau-tau1)/sinh(2*tau)-tanh(tau)*(h0-E*tau*tanh(tau))*(2*tau+sinh(2*tau))/((E*tau*tanh(tau)-h2)*F(tau)*sinh(2*tau)),tau=tau1,Term+1),tau);##A(K)
B:=unapply(taylor((1+2*tau/sinh(2*tau))^2*(-(tau-tau1)/lambda^2/E/(E*tau*tanh(tau)-h2)/F(tau)-(h0-E*tau*tanh(tau))*(tau-tau1)*tanh(tau)/(E*tau*tanh(tau)-h2)/F(tau)*P(tau)+(tau-tau1)^2*Q(tau)),tau=tau1,Term+1),tau);##B(K)


for j from 0 to Term do
a[j]:=coeff(A(tau),tau-tau1,j):
b[j]:=coeff(B(tau),tau-tau1,j):
end do;

for m from 1 to Term do
f1[0]:=1;
f2[0]:=1;
f1[m]:=-(add(f1[m-i]*((m-i)*a[i]+b[i]),i=1..m))/(m*(m-1+1/2));##pm(z1)
f2[m]:=-(add(f2[m-i]*((m-i+1/2)*a[i]+b[i]),i=1..m))/((m+1/2)*(m+1/2-1+1/2));##qm(Z2)
end do;


CC:=unapply(taylor(2*(tau-tau2)/sinh(2*tau)-tanh(tau)*(h0-E*tau*tanh(tau))*(2*tau+sinh(2*tau))/(E*tau*tanh(tau)-h1)/T(tau)/sinh(2*tau),tau=tau2,Term+1),tau);
DD:=unapply(taylor((1+2*tau/sinh(2*tau))^2*(-(tau-tau2)/lambda^2/E/(E*tau*tanh(tau)-h1)/T(tau)-(h0-E*tau*tanh(tau))*(tau-tau2)*tanh(tau)/(E*tau*tanh(tau)-h1)/T(tau)*P(tau)+(tau-tau2)^2*Q(tau)),tau=tau2,Term+1),tau);

j:='j':
for j from 0 to Term do
cc[j]:=coeff(CC(tau),tau-tau2,j):
dd[j]:=coeff(DD(tau),tau-tau2,j):
end do;

i:='i':
f3[0]:=1;
f4[0]:=1;
m:='m':
for m from 1 to Term do
f3[m]:=-(add(f3[m-i]*((m-i)*cc[i]+dd[i]),i=1..m))/(m*(m-1+1/2));
f4[m]:=-(add(f4[m-i]*((m-i+1/2)*cc[i]+dd[i]),i=1..m))/((m+1/2)*(m+1/2-1+1/2));
end do:

xi11:=unapply(add(f1[j1]*(tau-tau1)^(j1),j1=0..m-1),tau);
xi12:=unapply(add(f2[j2]*(tau-tau1)^(j2+1/2),j2=0..m-1),tau);
xi21:=unapply(add(f3[j3]*(tau-tau2)^(j3),j3=0..m-1),tau);
xi22:=unapply(add(f4[j4]*(tau-tau2)^(j4+1/2),j4=0..m-1),tau);


u0:=evalf(g*tanh(tau0)*(1+2*tau0/(sinh(2*tau0)))/(2*k0));
u01:=evalf(g*tanh(tau3)*(1+2*tau3/(sinh(2*tau3)))/(2*k3));
u1:=evalf(g*(1-(tanh(tau0))^2)*(sinh(2*tau0)-2*tau0*cosh(2*tau0))/(4*(2*tau0+sinh(2*tau0))));
H:=evalf((1+2*tau0/sinh(2*tau0))/(-lambda*k0*d));
delta00:=evalf((lambda*d*u1/u0+I*k0)*H);
delta01:=evalf((lambda*d*u1/u0-I*k0)*H);
delta11:=evalf((lambda*d*u1/u0+I*k0)*H*exp(I*k0*l));
delta12:=evalf((lambda*d*u1/u0-I*k0)*H*exp(-I*k0*l));
delta21:=evalf(exp(I*k0*(l1)));
delta22:=evalf(u0*k0*exp(I*k0*(l1)));
delta31:=evalf(exp(-I*k0*(l1)));
delta32:=evalf(-u0*k0*exp(-I*k0*(l1)));
delta41:=evalf(exp(I*k3*(l1)));
delta42:=evalf(u01*k3*exp(I*k3*(l1)));
delta51:=evalf(exp(-I*k3*(l1)));
delta52:=evalf(-u01*k3*exp(-I*k3*(l1)));
delta61:=evalf(exp(I*k3*(l1+d1)));
delta62:=evalf(u01*k3*exp(I*k3*(l1+d1)));
delta71:=evalf(exp(-I*k3*(l1+d1)));
delta72:=evalf(-u01*k3*exp(-I*k3*(l1+d1)));
Y11 := evalf(exp(k0*(l1 + d1)*I));
Y12 := evalf(-exp(-k0*(l1 + d1)*I));
Y21 := evalf(u0*k0*exp(k0*(l1 + d1)*I));
Y22 := evalf(-u0*k0*exp(-k0*(l1 + d1)*I));

G11 := evalf(exp(k0*(2*l1 + d1)*I));
G12 := evalf(-exp(-k0*(2*l1 + d1)*I));
G21 := evalf(u0*k0*exp(k0*(2*l1 + d1)*I));
G22 := evalf(-u0*k0*exp(-k0*(2*l1 + d1)*I));

W11 := evalf(exp(k3*(2*l1 + d1)*I));
W12 := evalf(-exp(-k3*(2*l1 + d1)*I));
W21 := evalf(u01*k3*exp(k3*(2*l1 + d1)*I));
W22 := evalf(-u01*k3*exp(-k3*(2*l1 + d1)*I));

Z11 := evalf(exp(k3*(2*l1 + 2*d1)*I));
Z12 := evalf(-exp(-k3*(2*l1 + 2*d1)*I));
Z21 := evalf(u01*k3*exp(k3*(2*l1 + 2*d1)*I));
Z22 := evalf(-u01*k3*exp(-k3*(2*l1 + 2*d1)*I));


V11:=evalf(exp(I*k0*2*(l1+d1)));
V21:=evalf(u0*k0*exp(I*k0*2*(l1+d1)));

delta91:=evalf(exp(I*k0*l));
delta92:=evalf(exp(-I*k0*l));


Hi:=(Matrix([[1,1],[delta00,delta01]]))^(-1);
H0:=Matrix([[1,1],[delta00,delta01]]);
H1:=(Matrix([[delta21,delta31],[delta22,delta32]]))^(-1);
H2:=Matrix([[delta41,delta51],[delta42,delta52]]);
H3:=(Matrix([[delta61,delta71],[delta62,delta72]]))^(-1);
H4 := Matrix([[Y11, Y12], [Y21, Y22]]);
H5 :=( Matrix([[G11, G12], [G21, G22]]))^(-1);
H6 := Matrix([[W11, W12], [W21, W22]]);
H7 := (Matrix([[Z11, Z12], [Z21, Z22]]))^(-1);
H8 := Matrix([[V11], [V21]]);

Ht:=Matrix([[1],[delta11]]);

e1:=Matrix([[evalf(xi11(tau0)),evalf(-xi12(tau0))],[evalf(eval(diff(xi11(tau),tau),tau=tau0)),evalf(eval(diff(-xi12(tau),tau),tau=tau0))]]);

e2:=(Matrix([[evalf(xi11(tau0)),evalf(xi12(tau0))],[evalf(eval(diff(xi11(tau),tau),tau=tau0)),evalf(eval(diff(xi12(tau),tau),tau=tau0))]]))^(-1);

EE:=evalm(e1.e2);

ee1:=Matrix([[evalf(xi21(tau0)),evalf(xi22(tau0))],[evalf(eval(diff(xi21(tau),tau),tau=tau0)),evalf(eval(diff(xi22(tau),tau),tau=tau0))]]);

ee2:=(Matrix([[evalf(xi21(tau0)),evalf(-xi22(tau0))],[evalf(eval(diff(xi21(tau),tau),tau=tau0)),evalf(eval(diff(-xi22(tau),tau),tau=tau0))]]))^(-1);
EEE:=evalm(ee1.ee2);

MM:=evalm(Hi.EE.EEE.H0.H1.H2.H3.H4.H5):
R:=evalf(MM[2,1]/MM[1,1]):
Kr:=abs(evalf(R)):
KR[N]:=abs(Kr);

end do:


N:='N':
seq(KR[N],N=1..Num);
with(plots):
listplot([seq([0.5+2*(N2-1)/(Num-1),KR[N2]],N2=1..Num)]);
 

Dear all
I have a boundary value problem, 
How can I solve the problem using maple or maybe we can introduce serie expansion to solve it or something else.

BVP_frac.mw

Thank you for your help 

I have data that I've binned in list. I'd like to plot in as a histogram. 

dataplot sort of does it but doesn't give the x-axis that I used but just the bins.

Yes, I know about Histogram from Statistics. To plot 1000000 values I have to enter them all into a list which seems crazy when all I want is a 100 bin histogram. Doing the binning is trivial, but I can't figure out how to plot it with a sensible x-axis (show range used to define the 'histogram')

Hello,

I am experiencing difficulties using my old Maple programs with the newer version. I tried changing the types of inputs and the typesetting level, but it just doesn't work. I would appreciate it if someone could help me overcome my ignorance.

Some simple input is attached with the output.

1 2 3 4 5 6 7 Last Page 1 of 323