Maple 2022 Questions and Posts

These are Posts and Questions associated with the product, Maple 2022

I've been asking a similar question, but recently I used Mathematica to call these gadgets very succinctly, so I revisit the topic, and maybe Maple can do it as well, but I just didn't do it the right way.

  • nauty and Traces are programs for computing automorphism groups of graphs and digraphs. There is a small suite of programs called gtools included in the package. For example, geng can generate non-isomorphic graphs very quickly. 
  • plantri and fullgen are programs for generation of certain types of planar graph.

We note that binary executables of above  two programs for Windows are not officially available. Fortunately, I recently compiled them by cygwin.  Of course, other operating systems can make it easier to use them. See attached two compressed files of compiled nauty and plantri programs for Windows.

The official websites of the two programs are listed below.

So, I found that Mathematica works very well for running these programs by Import. For example, the following two examples, one is to get all non-isomorphic 10-order 2-partite connected graph, the second example is to get all 14-order non-isomorphic  quadrilateral graphs (the planar graphs in which any face is 4-face).

glist10 = Import["!D:/nauty27r3/geng -c -b 10", "Graph6"]; // AbsoluteTiming
Length[glist10]

g14 = Import["!D:/plantri52/plantri 14 -q -g ", "Graph6"] // AbsoluteTiming

 

I tried maple's Import or ImportGraph functions, but both failed.

restart: 
with(GraphTheory):
L:=ImportGraph("!D:/nauty27r3/geng -c -b 10 -g",output=list):
L2:=Import("!D:/nauty27r3/geng -c -b 10 -g"):

Error, invalid input: GraphTheory:-ImportGraph uses a 2nd argument, format (of type {string, symbol}), which is missing
Error, (in Import) must specify format for this input

 

The problem seems to be not recognizing compilations symbols " !".  I don't know if Maple can do this like mathematica.

 

nauty27r3.zip

plantri52.zip

Hi everyone, Could you help me to get a general solution to the following ode? Here rho and z are constants.

ODE := cos(g(t))^2*(diff(T(t), t, t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(g(t), t, t))*rho+2*(cos(g(t))^2)(diff(g(t), t))^2*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

cos(g(t))^2*(diff(diff(T(t), t), t))-3*rho*(diff(g(t), t))*cos(g(t))*sin(g(t))*(diff(T(t), t))+(Omega^2*cos(g(t))^z-8*rho^2*(diff(g(t), t))^2*sin(g(t))^2+2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho+2*(cos(g(t)))(diff(g(t), t))^4*rho+2*rho*(diff(g(t), t))^2*sin(g(t))^2)*T(t) = 0

(1)

dsolve(ODE, T(t))

T(t) = DESol({-(-Omega^2*cos(g(t))^z+8*rho^2*(diff(g(t), t))^2*sin(g(t))^2-2*sin(g(t))*cos(g(t))*(diff(diff(g(t), t), t))*rho-2*(cos(g(t)))(diff(g(t), t))^4*rho-2*rho*(diff(g(t), t))^2*sin(g(t))^2)*_Y(t)/cos(g(t))^2-3*rho*(diff(g(t), t))*sin(g(t))*(diff(_Y(t), t))/cos(g(t))+diff(diff(_Y(t), t), t)}, {_Y(t)})

(2)

NULL


Thanks.

Download ode_rlmt.mw

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. 

Hello,

maybe some of you can help me with this. 

In the equations are variables F_[i][j] and GG_[i][j] (for i=1,2,3 and j=1,2,3). There are 5 Equations that equal 0 and 1 Equation that equals Q(given). 
Is there a better way to try and solve this equations? 

Thank you

A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

restart;
ScientificConstants:-GetValue(Constant(g))

Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

 

 

 

We suggested to either

[Edit May 13 after Acer's improvements]

A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

restart;
with(ScientificConstants):
GetValue(Constant(g));

9.80665

(1)

Download scientificConstantsGetValueShortFormsWithPackage.mw

or

B) use long forms for both command names:

restart;
ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormLongForm.mw

or

C) to test that a long form command and a short form command work together, import the package for the short form command:

restart;
with(ScientificConstants):
ScientificConstants:-GetValue(Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormWithPackage.mw

Further details can be found in the article ?UsingPackages

Have you ever wanted to create practice problems and quizzes that use buttons and other features to support a student making their way to an answer, such as the following?

Let’s take a look at how you can use Maple 2022 to create documents like these that can be deployed in Maple Learn. I know I’ve always wanted to learn, so let’s learn together. All examples have a document that you can use to follow along, found here, in Maple Cloud.  

The most important command you’ll want to take a look at is ShareCanvas. This command generates a Maple Learn document. Make sure to remember that command, instead of ShowCanvas, so that the end result gives you a link to a document instead of showing the results in Maple. You’ll also want to make sure you load the DocumentTools:-Canvas subpackage using with(DocumentTools:- Canvas).

If you take a look at our first example, below, the code may seem intimidating. However, let’s break it down, I promise it makes sense!

with(DocumentTools:-Canvas);
cv := NewCanvas([Text("Volume of Revolution", fontsize = 24), "This solid of revolution is created by rotating", f(x) = cos(x) + 1, Text("about the y=0 axis on the interval %1", 0 <= x and x <= 4*Pi), Plot3D("Student:-Calculus1:-VolumeOfRevolution(cos(x) + 1, x = 0 .. 4*Pi, output = plot, caption=``)")]);
ShareCanvas(cv);

The key command is Plot3D. This plots the desired graph and places it into a Maple Learn document. The code around it places text and a math group containing the equation being graphed. 


Let’s take a look at IntPractice now. The next example allows a student to practice evaluating an integral.

with(Grading):
IntPractice(Int(x*sin(x), x, 'output'='link'));

 This command allows you to enter an integral and the variable of integration, and then evaluates each step a student enters on their way to finding a result. The feedback given on every line is incredibly useful. Not only will it tell you if your steps are right, but will let you know if your last line is correct, i.e if the answer is correct.

Finally, let’s talk about SolvePractice.

with(Grading):
SolvePractice(2*x + 3 = 6*x - 9, 'output' = 'link');

This command takes an equation, and evaluates it for the specified variable. Like the IntPractice command, this command will check your steps and provide feedback. The image below shows how this command looks in Maple 2022.

These commands are the stepping stones for creating practice questions in Maple Learn. We can do so much more in Maple 2022 scripting than I realized, so let’s continue to learn together!

Some other examples of scripted documents in the Maple Learn Document Gallery are our steps documents, this document on the Four Color Visualization Theorem, and a color by numbers. As you can see, there’s a lot that can be done with Maple Scripting.

 Let us know in the comments if you’d like to see more on Maple 2022 scripting and Maple Learn.

To Maple support,

Why when removing symbol a from these equations makes Maple warning go away? This is from a textbook. Attached worksheet. 

 

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

restart;
ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

worksheet attached also

interface(version)

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*a*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*a*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

Warning, it is required that the numerator of the given ODE depends on the highest derivative. Returning NULL.

restart;

ode:={diff(x__1(t),t)*sin(x__2(t))=x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)),diff(x__2(t),t)= x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t)),diff(x__3(t),t)+diff(x__1(t),t)*cos(x__2(t))= 1,diff(x__4(t),t)-(1-B)*x__5(t)= sin(x__2(t))*cos(x__3(t)),diff(x__5(t),t)+(1-B)*a*x__4(t)=sin(x__2(t))*sin(x__3(t))};
dsolve(ode)

{(diff(x__1(t), t))*sin(x__2(t)) = x__4(t)*sin(x__3(t))+x__5(t)*cos(x__3(t)), diff(x__3(t), t)+(diff(x__1(t), t))*cos(x__2(t)) = 1, diff(x__4(t), t)-(1-B)*x__5(t) = sin(x__2(t))*cos(x__3(t)), diff(x__5(t), t)+(1-B)*a*x__4(t) = sin(x__2(t))*sin(x__3(t)), diff(x__2(t), t) = x__4(t)*cos(x__3(t))-x__5(t)*sin(x__3(t))}

 

Download warning_may_10_2022.mw

I tried to graph the function f(x)=x^(1/3) but it only gives me a graph for non-negative x's, when the function f has all real numbers as its domain.

Maybe I'm doing it wrong.

Thank you.

Hi, with Units[Simple] package loaded, I tried to differentiate a few functions using D[n] but it does not work. problem.mw

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; exp(y*x) end proc

(1)

D[1](a)

proc (x, y) options operator, arrow; y*exp(y*x) end proc

(2)

D[2](a)

proc (x, y) options operator, arrow; x*exp(y*x) end proc

(3)

retart

retart

(4)

"with(Units[Simple]):"

a := proc (x, y) options operator, arrow; exp(x*y) end proc

proc (x, y) options operator, arrow; Units:-Simple:-exp(Units:-Simple:-`*`(x, y)) end proc

(5)

D[1](a)

Error, (in tools/gensym) too many levels of recursion

 

D[2](a)

Error, (in tools/gensym) too many levels of recursion

 

NULL

Download problem.mw

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);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 1230 and is the same as the version installed in this computer, created 2022, April 21, 9:8 hours Pacific Time.`

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))
 

(diff(u(r, theta), r)+r*(diff(diff(u(r, theta), r), r))+(diff(diff(u(r, theta), theta), theta))/r)/r

(diff(u(r, theta), r))/r+diff(diff(u(r, theta), r), r)+(diff(diff(u(r, theta), theta), theta))/r^2

u(1, theta) = sin(theta)^4, u(3, theta) = 1

u(r, theta) = (1/52480)*((328*r^6-26568*r^2)*ln(3)*cos(2*theta)+(-r^8+6561)*ln(3)*cos(4*theta)+19680*(ln(3)+(5/3)*ln(r))*r^4)/(ln(3)*r^4)

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

 


 

Download hangs_pde.mw

Here is a Maple 2020 worksheet that ran fine on Maple 2020, but runs slower on Maple 2022, especially when plots[display] is used it seems to take much longer?

with(NumberTheory);
with(plots);
NULL;
NULL;
theta := [14.134725, 21.022039, 25.010858, 30.424876, 32.935062, 37.586178, 40.918719, 43.327073, 48.00515, 49.773832, 52.970321, 56.446248, 59.347044, 60.831779, 65.112544, 67.079811, 69.546402, 72.067158, 75.704691, 77.144840, 79.337375, 82.91038, 84.735493, 87.425273, 88.809111, 92.491899, 94.651344, 95.870634, 98.831194];
theta := [14.134725, 21.022039, 25.010858, 30.424876, 32.935062, 

  37.586178, 40.918719, 43.327073, 48.00515, 49.773832, 

  52.970321, 56.446248, 59.347044, 60.831779, 65.112544, 

  67.079811, 69.546402, 72.067158, 75.704691, 77.144840, 

  79.337375, 82.91038, 84.735493, 87.425273, 88.809111, 

  92.491899, 94.651344, 95.870634, 98.831194]

y[1] := x -> -2*sqrt(x)*cos(theta[1]*ln(x) - argument(0.5 + theta[1]*I))/(abs(0.5 + theta[1]*I)*ln(x));
y[1] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[1\

  ]*ln(x)-argument(.5+I*theta[1]))/(abs(.5+I*theta[1])*ln(x)) 

   end proc

plot(y[1](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 14.134725*i');

y[2] := x -> -2*sqrt(x)*cos(theta[2]*ln(x) - argument(0.5 + theta[2]*I))/(abs(0.5 + theta[2]*I)*ln(x));
y[2] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[2\

  ]*ln(x)-argument(.5+I*theta[2]))/(abs(.5+I*theta[2])*ln(x)) 

   end proc

plot(y[2](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 21.022040*i');

y[3] := x -> -2*sqrt(x)*cos(theta[3]*ln(x) - argument(0.5 + theta[3]*I))/(abs(0.5 + theta[3]*I)*ln(x));
y[3] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[3\

  ]*ln(x)-argument(.5+I*theta[3]))/(abs(.5+I*theta[3])*ln(x)) 

   end proc

plot(y[3](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 25.00858*i');

y[4] := x -> -2*sqrt(x)*cos(theta[4]*ln(x) - argument(0.5 + theta[4]*I))/(abs(0.5 + theta[4]*I)*ln(x));
y[4] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[4\

  ]*ln(x)-argument(.5+I*theta[4]))/(abs(.5+I*theta[4])*ln(x)) 

   end proc

plot(y[4](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 30.424876*i');

y[5] := x -> -2*sqrt(x)*cos(theta[5]*ln(x) - argument(0.5 + theta[5]*I))/(abs(0.5 + theta[5]*I)*ln(x));
y[5] := proc (x) options operator, arrow; -2*sqrt(x)*cos(theta[5\

  ]*ln(x)-argument(.5+I*theta[5]))/(abs(.5+I*theta[5])*ln(x)) 

   end proc

plot(y[5](x), x = 20 .. 100, title = 'Fig1*(S &G theta) = 1/2 + 32.93502*i');

T[1] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[1]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[1] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

  Moebius(n)*Re(Ei((.5+I*theta[1])*ln(x)))/n, n = 1 .. 

   trunc(ln(100)/ln(2))+1)) end proc

plot(T[1](x), x = 20 .. 100, title = 'T[1]');

T[2] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[2]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[2] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

  Moebius(n)*Re(Ei((.5+I*theta[2])*ln(x)))/n, n = 1 .. 

   trunc(ln(100)/ln(2))+1)) end proc

plot(T[2](x), x = 20 .. 100, title = 'T[2]');

T[3] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[3]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[3] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

  Moebius(n)*Re(Ei((.5+I*theta[3])*ln(x)))/n, n = 1 .. 

   trunc(ln(100)/ln(2))+1)) end proc

plot(T[3](x), x = 20 .. 100, title = 'T[3]');

T[4] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[3]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[4] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

  Moebius(n)*Re(Ei((.5+I*theta[3])*ln(x)))/n, n = 1 .. 

   trunc(ln(100)/ln(2))+1)) end proc

plot(T[4](x), x = 20 .. 100, title = 'T[4]');

T[5] := x -> -2*sum(Moebius(n)*Re(Ei((0.5 + theta[5]*I)*ln(x)))/n, n = 1 .. trunc(ln(100)/ln(2)) + 1);
T[5] := proc (x) options operator, arrow; -2*(sum(NumberTheory:-\

  Moebius(n)*Re(Ei((.5+I*theta[5])*ln(x)))/n, n = 1 .. 

   trunc(ln(100)/ln(2))+1)) end proc

plot(T[5](x), x = 20 .. 100, title = 'T[5]');

f10 := x -> Li(x) - 2*sum(Re(Ei((1/2 + theta[n]*I)*ln(x))), n = 1 .. 10) - ln(2) + int(1/(t*(t^2 - 1)*ln(t)), t = x .. infinity);
f10 := proc (x) options operator, arrow; Li(x)-2*(sum(Re(Ei((1/2\

  +I*theta[n])*ln(x))), n = 1 .. 10))-ln(2)+int(1/(t*(t^2-1)*ln(\

  t)), t = x .. infinity) end proc

R10 := x -> sum(Moebius(l)*f10(x^(1/l))/l, l = 1 .. 8);
R10 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

  us(l)*f10(x^(1/l))/l, l = 1 .. 8) end proc

plot1 := plot(R10(x), x = 2 .. 100);

plot2 := plot(pi(x), x = 2 .. 100);

display([plot1, plot2]);

f29 := x -> Li(x) - 2*sum(Re(Ei((1/2 + theta[n]*I)*ln(x))), n = 1 .. 29) - ln(2) + int(1/(t*(t^2 - 1)*ln(t)), t = x .. infinity);
f29 := proc (x) options operator, arrow; Li(x)-2*(sum(Re(Ei((1/2\

  +I*theta[n])*ln(x))), n = 1 .. 29))-ln(2)+int(1/(t*(t^2-1)*ln(\

  t)), t = x .. infinity) end proc

R29 := x -> sum(Moebius(l)*f29(x^(1/l))/l, l = 1 .. 8);
R29 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

  us(l)*f29(x^(1/l))/l, l = 1 .. 8) end proc

plot3 := plot(R29(x), x = 2 .. 100);

NULL;
display([plot1, plot2, plot3]);

R29(100);
R10(100);
pi(100);
                          25.25165721

                          25.28503922

                               25

RR10 := x -> sum(Moebius(l)*f10(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR10 := proc (x) options operator, arrow; sum(NumberTheory:-Moeb\

  ius(l)*f10(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end 

   proc

RR10(1000);
pi(1000);
                          168.1328341

                              168

RR29 := x -> sum(Moebius(l)*f29(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR29 := proc (x) options operator, arrow; sum(NumberTheory:-Moeb\

  ius(l)*f29(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end 

   proc

RR29(1000);
                          167.6113955

P1 := plot(RR29(x), x = 880 .. 930);

P2 := plot(pi(x), x = 880 .. 930);

display([P1, P2]);

f0 := x -> Li(x) - ln(2) + int(1/(t*(t^2 + 1)*ln(t)), t = x .. infinity);
f0 := proc (x) options operator, arrow; Li(x)-ln(2)+int(1/(t*(t^\

  2+1)*ln(t)), t = x .. infinity) end proc

RR0 := x -> sum(Moebius(l)*f0(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2)) + 1);
RR0 := proc (x) options operator, arrow; sum(NumberTheory:-Moebi\

  us(l)*f0(x^(1/l))/l, l = 1 .. trunc(ln(1000)/ln(2))+1) end proc

P3 := plot(RR0(x), x = 880 .. 930);

NULL;
display([P1, P2, P3]);

P4 := plot(RR10(x), x = 880 .. 930);

display([P1, P2, P3, P4], color = [green, blue, purple, yellow]);

evalf(Li(2)), evalf(ln(2));
                   1.045163780, 0.6931471806

evalf(li(2));
                             li(2)

evalf(Ei(2));
                          4.954234356

evalf(Int(1/ln(t), t = 0 .. 2));
                        Float(undefined)

evalf(Ei(ln(2)));
                          1.045163780

Li(1000.);
                          177.6096580

isprime, [$ (1 .. 100)];
isprime, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 

  17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 

  33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 

  49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 

  65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 

  81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 

  97, 98, 99, 100]

nops(select(isprime, [$ (1 .. 100)]));
                               25

theta[1];
                           14.134725

evalf(Ei((1/2 + theta[1]*I)*ln(x)));
             Ei((0.5000000000 + 14.134725 I) ln(x))

evalf(Ei(ln(1/2 + theta[1]*I)));
                  4.386989035 + 6.632175089 I

plot(Li(x), x = 0 .. 5);

To Maple support:

I see 2 problems here. Maple solves the ode using series method.

First problem: Using odetest shows the syntax according to help does not work. Which is

           odetest(sol, ODE, series, point = 0);

The above gives internal error.

When changing to the following syntax

         odetest(sol,ODE,type='series',point=0); 

No internal error.

So help page should be corrected.

The second problem is that Maple odetest does not return 0 on its own solution. I verified manually that the solution is correct actually. So I do not know why maple does not return zero here. Simplfication does not help. 
 

interface(version);

`Standard Worksheet Interface, Maple 2022.0, Windows 10, March 8 2022 Build ID 1599809`

restart;

Order:=6;
ode:=x^2*diff(diff(y(x),x),x)+x^2*diff(y(x),x)+y(x) = 0;
maple_sol:=dsolve(ode,y(x),type='series',x=0):
odetest(maple_sol,ode,series,point=0);
odetest(maple_sol,ode,'series',point=0);

6

x^2*(diff(diff(y(x), x), x))+x^2*(diff(y(x), x))+y(x) = 0

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

Error, (in odetest/series) complex argument to max/min: 13/2-1/2*I*3^(1/2)

odetest(maple_sol,ode,type='series',point=0); #This should return zero, but it does not.

-I*3^(1/2)*x^(3/2-((1/2)*I)*3^(1/2))*(series(-1/2-(I*3^(1/2)/((I*3^(1/2)-1)*(I*3^(1/2)-2)))*x-((1/4)*((5*I)*3^(1/2)+3)/((I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^2-((1/6)*((8*I)*3^(1/2)+9)/((I*3^(1/2)-4)*(I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^3-((7/16)*((3*I)*3^(1/2)+5)/((I*3^(1/2)-5)*(I*3^(1/2)-4)*(I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^4+O(x^5),x,5))*_C1+((1/2)*I)*3^(1/2)*x^(3/2+((1/2)*I)*3^(1/2))*(series(1-(1/2)*x+(((1/2)*I)*3^(1/2)/((1+I*3^(1/2))*(I*3^(1/2)+2)))*x^2-((1/12)*((5*I)*3^(1/2)-3)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)))*x^3+((1/24)*(-9+(8*I)*3^(1/2))/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)))*x^4-((7/80)*((3*I)*3^(1/2)-5)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)*(I*3^(1/2)+5)))*x^5+O(x^6),x,6))*_C2+_C1*x^(5/2-((1/2)*I)*3^(1/2))*(series(-I*3^(1/2)/((I*3^(1/2)-1)*(I*3^(1/2)-2))-((1/2)*((5*I)*3^(1/2)+3)/((I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x-((1/2)*((8*I)*3^(1/2)+9)/((I*3^(1/2)-4)*(I*3^(1/2)-3)*(I*3^(1/2)-2)*(I*3^(1/2)-1)))*x^2-((7/4)*((3*I)*3^(1/2)+5)/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/2)+3)*(I*3^(1/2)+4)))*x^4-((7/80)*((3*I)*3^(1/2)-5)/((1+I*3^(1/2))*(I*3^(1/2)+2)*(I*3^(1/2)+3)*(I*3^(1/2)+4)*(I*3^(1/2)+5)))*x^5+O(x^6),x,6))*_C2

 


 

Download problems_with_series_solution.mw

 

How can I found the area of the region bounded by 

y=e^xcos(x), y=o, x=−π/2, x= π/2 ?

I have an example where I try to calculate an infinite sum (G&R1.641.1)  in Maple 2022 (or 2021).  I get a different numerical result when I evaluate the sum if I express the coefficients c(m) in the sum using Maple's doublefactorial function for m!! (c1(m)) or the equivalent expression involving the factorial function (c2(m)).  Only the latter gives the correct value for the sum.  This happens even though Maple gives the same numerical value for the coefficients c1(m) and c2(m).  What's going on?? Please see the attached spreadsheet.

Download doublefactorial_test.mw

I recently upgraded to Maple 2022 just to use the new latex command. It seems I still can't export DataFrame types, I'm very disappointed. What am I doing wrong?

restart:
test:= DataFrame( [[1]], columns = [1] );
latex(test);

returns:

Error, (in DataFrame:-type) invalid input: subtype expects its 2nd argument, _t, to be of type type, but received And(symbol,satisfies(u -> substring(u,1 .. 9) = ('`\\mapleref`')))

Using File > Export As > LaTeX also doesn't work.
Printing the function call using printlevel := 100000: returns the following:

I've attached the worksheet for reference. Demo.mw
Does anyone know a workaround?

-Thanks for the Help

1 2 3 Page 1 of 3