MaplePrimes Questions

Is it considered OK to give singular solution to an ode which does not satisfy the ode?

I thought may be because it is singular solution and not general solution, then that is allowed sometimes. But it seems strange to me to give a solution which cleary do not satisfy the ode, even if it is singular.  But may be because it is singular, it is not required to satisfy the ode? Here is an example

restart;
ode_1:=diff(y(x),x)=sqrt(1+x+y(x)) ;
sol_1:=DEtools:-dalembertsol(ode_1);

Gives

But the first given "solution" (singular) does not satisfy the ode. Plugging it into the ode gives  -1=1.  Also odetest(y(x)=-x,ode_1) agrees it does not satisfy the ode. It gives -2 and not zero.

What do others think about this?  

Given a set (list) of PDE, is there a way to search all possible solution sets? For instance, pdsolve will output the solution

{_eta[0](t, x) = 0, _xi[t](t, x, u) = _C1, _xi[x](t, x, u) = _C2, eta[1](t, x) = 0}

for the list of PDEs below. But I am aware that there is another solution different from the above, is there way to seek these other solutions?

 

[alpha*u^2*(diff(eta[1](t, x), t))+alpha*u*(diff(_eta[0](t, x), t))-u*(diff(eta[1](t, x), t))-u*(diff(eta[1](t, x), x))+u*(diff(eta[1](t, x), x, x, t))-(diff(_eta[0](t, x), x))-(diff(_eta[0](t, x), t))+diff(_eta[0](t, x), x, x, t), -(diff(_xi[x](t, x, u), u, u, u)), -(diff(_xi[t](t, x, u), x))-(diff(_xi[t](t, x, u), t)), -(diff(_xi[t](t, x, u), x, x)), -2*(diff(_xi[t](t, x, u), x, x))-(diff(_xi[x](t, x, u), x, x))+2*(diff(eta[1](t, x), x)), diff(eta[1](t, x), t)-2*(diff(_xi[x](t, x, u), x, x)), -(diff(_xi[x](t, x, u), t))*alpha*u-(diff(_xi[x](t, x, u), x, x, x))-(diff(_xi[t](t, x, u), x))+2*(diff(eta[1](t, x), x, t)), -(diff(_xi[x](t, x, u), x)), -(diff(_xi[t](t, x, u), t))*alpha*u+(diff(_xi[t](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), x))*alpha*u+(diff(_xi[x](t, x, u), t))*alpha*u+eta[1](t, x)*alpha*u+alpha*_eta[0](t, x)+diff(_xi[t](t, x, u), t)-(diff(_xi[t](t, x, u), x, x, x))-(diff(_xi[x](t, x, u), x))-(diff(_xi[x](t, x, u), t))+diff(eta[1](t, x), x, x), -2*(diff(_xi[x](t, x, u), u)), -2*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[t](t, x, u), u))-(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -5*(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u)), -2*(diff(_xi[x](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -(diff(_xi[t](t, x, u), u)), -2*(diff(_xi[t](t, x, u), u, u))-(diff(_xi[x](t, x, u), u, u)), -(diff(_xi[t](t, x, u), u, u, u)), -3*(diff(_xi[t](t, x, u), u, u)), -3*(diff(_xi[t](t, x, u), x, u, u)), (diff(_xi[t](t, x, u), u))*alpha*u-(diff(_xi[x](t, x, u), u))-3*(diff(_xi[t](t, x, u), x, x, u)), -2*(diff(_xi[x](t, x, u), x, u))-4*(diff(_xi[t](t, x, u), x, u)), -(diff(_xi[t](t, x, u), u))*alpha*u+(diff(_xi[x](t, x, u), u))*alpha*u+diff(_xi[t](t, x, u), u)-(diff(_xi[x](t, x, u), u)), -3*(diff(_xi[x](t, x, u), x, x, u))-(diff(_xi[t](t, x, u), u)), -7*(diff(_xi[x](t, x, u), x, u)), -3*(diff(_xi[x](t, x, u), x, u, u))]

This works

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
DEtools:-abelsol(ode);

But this does not

restart;
ode := diff(y(x),x)=a0+a1*y(x)+a2*y(x)^2+a3*y(x)^3;
name_of_solver:=abelsol;
DEtools:-name_of_solver(ode);

Then I found this made it work

eval(DEtools:-name_of_solver)(ode);

So I am guessing what happens is this: doing DEtools:-name_of_solver Maple first searched for a proc called name_of_solver inside DEtools package, and found none. So it does not work.

But adding eval first, then name_of_solver is evaluated and replaced by abelsol and after that the call is made, and it then finds this proc inside the DEtools package.

But my question is, why is eval needed here?

Is it not automatically happens that a variable is replaced by its value? So I expected DEtools:-name_of_solver to automatically become DEtools:-abelsol and only then the call is made.

Why the rule of evaluation is different in this case?

Formatting_exponents_in_typesetting_situations.mw
How do I format express an exponent in standard notation when typesetting a caption?  10^2 displays as 100 when I want it to display as 10^2 but without the caret.

restart

with(plots)

logplot(10^x, x = 0 .. 8, size = [300, 300], legend = [y(x) = 10^x], legendstyle = [location = top], caption = typeset("How do I type,", 10^8, ", and have it show up as 10^8 in the caption?"))

 

NULL

Download Formatting_exponents_in_typesetting_situations.mw

Any one knows of a way to have Maple verify that this solution of the ODE is correct?

restart;
ode:=diff(y(x),x)=x*(y(x)^2-1)^(2/3);
sol:=dsolve(ode);
odetest(sol,ode);

gives

-4*x*y(x)^2*hypergeom([3/2, 5/3], [5/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*hypergeom([1/2, 2/3], [3/2], y(x)^2)*(y(x)^2 - 1)^(2/3)*signum(y(x)^2 - 1)^(1/3) - 9*x*(-signum(y(x)^2 - 1))^(1/3)

Tried different simplications, but can't get zero.

For reference, this is Mathematica's solution and it verifies it:

Using Maple 2022.1 on windows 10.

with(GroupTheory):

st := time();
RightCosets(SymmetricGroup(10), SymmetricGroup(11));
time() - st;

0.047

Note GroupOrder(SymmetricGroup(11)) is 39916800. It is a very large group. This seems unimaginable to me. Can I know how maple does it?

How do I access numerical formatting from command line?

The help page shows you how to use the point and click menus to change the numerical formatting. It works fine but I want a command to convert from say decimal to scientific notation. Am I missing something?

Here the gui menu on the right hand side of a typical worksheet.

This is the help page for "Numerical Formatting" but there is not much about commands, just the point and click menus. If anyone knows where to search for these commands, please respond. Thanks.

https://maplesoft.com/support/help/maple/view.aspx?path=worksheet/expressions/numericformatting

Hi.  I am using the linux version of Maple.  I seem to experience more bombs in Maple/Linux vs MathCad/Windows.  The program just froze as I was entering text.  Just text.  It is not a disaster since I make very frequent saves.  But it is very annoying.  I was a heavy user of MathCad from about 2005 to 2019.  In the early days, it bombed a lot.  But I do not recall that it ever bombed when I was entering text.  Any suggestions?  Would there be a limition on the number of text characters?  Is it Linux?  Other than this problem, it is a great program.

Hi,

I have been looking for a solution to my problem since last night, but I have been unsuccessful. My problem is that the Column command is not recognized in some Maple worsheets. This problem might occur with other commands too, but most commands seem to work fine. It also only seems to happen in some (not all) worksheets. I just tried creating a new Maple sheet where all I do is create a 2x2 matrix and apply the Column command, but the command is not recognized.

Any ideas? Thanks.

John

Hi, I'm begginer to Maple,

I imported matrix from csv file by this comand:

tab1:= ImportMatrix(source,skiplines=1);
and some of the parts of the source csv file are blank. can i replace these places in matrix with zero somehow please?

Thank you for your answers.

 

The Examples section on the help page of a command is important for learning, but cannot cover all uses. This is especially true for general purpose commands like "solve" or "simplify". Searching all help pages that contain the word "solve" results in too many irrelevant hits that do not contain examples.

Why does adding a bracket to a command not filter for help pages with examples using the command?

Inside a help page Find/Replace finds such strings.

Hi, guys. 

I have a question with D(D)^k, where D is a diagonal matrix,k>=0,for example

D:=<<6, 0> | <0, -1>>

I want Dk to be simplified to the form

<<6k, 0> | <0, (-1)k>>

How can I get it?

TKS in advance!

Hello,

Is it possible to have a common legend for different figures? I can plot them as Array of Plots (below) but then they each have a legend. 

Is it possible to have the two figures side by side and a common legend in the middle?

Thank you!

restart:
with(plots):
A := Array(1 .. 2):
A[1] := plot([2*sin(x), 3*sin(x)], x = -Pi .. Pi, labels = [x, b*sin(x)], color = [blue, red], legend = ["Case of b=2", "Case of b=3"]):
A[2] := plot([2*cos(x), 3*cos(x)], x = -Pi .. Pi, labels = [x, b*cos(x)], color = [blue, red], legend = ["Case of b=2", "Case of b=3"]):
display(A);

Recently, I tried to write a function to get the lexicographic product of two graphs.

In  graph theory the lexicographic product G ∙ H of graphs G and H is a graph such that
  • the vertex set of G ∙ H is the cartesian product V(G) × V(H); and
  • any two vertices (u,v) and (x,y) are adjacent in G ∙ H if and only if either u is adjacent with x in G or u = x and v is adjacent with y in H.

I'm trying to write this function as defined after making sure it doesn't exist in maple. I saw a similar post by mathematica stack.

There are many answers in the post, the most interesting to me is the following code, which follows the definition of lexicographic product. 

lexicographicProduct[g1_?UndirectedGraphQ, g2_?UndirectedGraphQ, opt : OptionsPattern[]] := 
 RelationGraph[
   (* two nodes are connected if their corresponding nodes in the first graph are connected *)
   EdgeQ[g1, First[#1] \[UndirectedEdge] First[#2]] || 
   (* or their corresponding nodes in the first graph are the same and their corresponding nodes in the second graph are connected *)
   (First[#1] === First[#2] && EdgeQ[g2, Last[#1] \[UndirectedEdge] Last[#2]]) &,

   (* the vertices are the cartesian product of the two vertex sets *)
   Tuples[{VertexList[g1], VertexList[g2]}],

   (* also allow setting graph options *)
   opt
 ]

lexicographicProduct[CycleGraph[5], CycleGraph[3]]

It utilizes the  function RelationGraph in Mathematica. I feel that this function is generic in nature. So here I would ask maple if they had a similar function.

Function RelationGraph is to generate a graph based on data and a binary relation.

For example, using RelationGraph  I  can get easily  the kth power Gk of an graph G which is another graph that has the same set of vertices, but in which two vertices are adjacent when their distance in G is at most k.

Dis[g1_?UndirectedGraphQ, k_] := 
 RelationGraph[
  GraphDistance[g1, #1, #2] <= k && GraphDistance[g1, #1, #2] != 0 &, 
  VertexList[g1]]
Dis[PathGraph[Range[10]], 2]

If I use maple and do not use the built-in function GraphPower, I might deal with the following.

with(GraphTheory):
with(SpecialGraphs):
graphpower:=proc(G,k):
local choo,edge,vex,g;
 vex:=convert(Vertices(G),list);
 choo:= choose(vex, 2):
 g:= Graph(Vertices(G)):
 for edge in choo do 
     if Distance(G, edge[1], edge[2])<=k  then 
        AddEdge(g, convert(edge,set))
     fi;
  end do:
 return g;
end proc:
s:=graphpower(PathGraph(10),2);DrawGraph(s)

 

 

I believe if the RelationGraph function can be  implemented in maple, the function lexicographicProduct would be easier to obtain.

Hey, guys! My Maple 2020 program does not build a plot. that is, it cuts it off. everything is correct in maple 2015.

plot(140^t*exp(-140)/t!, t = 0 .. 300)

Maple 2015

plot(140^t*exp(-140)/t!, t = 0 .. 300)

 

My maple 2020 creates

 

 

Why???????????

 

First 177 178 179 180 181 182 183 Last Page 179 of 2308