Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi,

I want to extract the highest linear and non-linear terms in an equation without their coefficients

How I can do it?

For example in the following equation, the highest linear and nonlinear without coefficients are diff(u(T),T$3) and u(T)*diff(u(T),T), respectively.

w*a*diff(u(T),T)+a*u(T)*diff(u(T),T)-(b^2)*a*w*diff(u(T),T$3)=0

Thanks in advance.

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

module DEQueue () local num, head, tail, storage, dsp; option object; end module

 

true

 

module DEQueue () local num, head, tail, storage, dsp; option object; end module

(1)

#
# But this results in an error!
#
  B:=DEQueue();
  empty(B);
  push_front(B,2);

module DEQueue () local num, head, tail, storage, dsp; option object; end module

 

true

 

Error, invalid return value from method moduledefinition: 'NULL'

 

 

Download DEQueue_Prob.mw

function is F(x)= x-tanh(4*x/T) and diff(F(x))= 1-(4/T)*(1/T*Cosh(4*x/T)^2). x and t variable T max value=7, i want to do plots ising models function. Anyone can help me?

Graphich will be this 

https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTSo2BHyF5fvb8Dy6bWhELRAAIoaWmxp89G3w&usqp=CAU

macOS 12.3 + Maple 2021.2

* select a region on a document
* context click
* --> Copy as image

Copy as image does not put an image on the clipboard.

What is solution?

Hi
One or two days ago, there was a question here by @nm about an integral that was resulting in an infinite loop. I don't know if this question was accidentally deleted, but I don't see it anymore.

The question was about the computation of 

> integrand := (a + b*(c*x^n)^(1/n))^p/x;
> int(integrated, x);

Indeed, there was a problem in the routines to derive assumptions, surfacing as the problem in int pointed out by @nm . Thanks to Austin Roche ( @aroche ) for his quick fix; the fix is distributed to everybody using Maple 2022 in the Maplesoft Physics Updates v.1184.

Edgardo S. Cheb-Terrab
Physics, Differential Equations and Mathematical Functions, Maplesoft

I knew it can't be true that timelimit in Maple 2022 no longer hangs and it is only a matter of time before I find a case where it still hangs.

Here are examples. timelimit hangs. No error or anything, it just hangs. timelimit is just ignored. set the limit to 60 seconds  (CPU time), and waited for 20 minutes (real time) and nothing happend.

I hope in Maple 2023 this will be fixed. Could others confirm this? it only hangs when adding the method=_RETURNVERBOSE otherwise it does not hang.

interface(version);

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

Examples of timelimit hangs in Maple 2022

 

Example 1

restart;

integrand:=(B*x+A)/(c*x^2+b*x+a)^2/(f*x^2+e*x+d)

try
  timelimit(60,int(integrand,x,method=_RETURNVERBOSE));
catch:
  print("Timed out");
end try;

 

Example 2

restart

integrand:=(5*x^4-x^3+3*x^2+x+2)*(2*x^2-x+3)^(1/2)/(5+2*x)^3

try
    timelimit(60,int(integrand,x,method = _RETURNVERBOSE));
catch:
  print("Timed out");
end try;

 

 

Download int_hangs.mw

This is a serious problem.

I change "how should maple handle the creation of new math engine?" to "Create new engine for each document". Then click on "Apply globally".  This is under Tools->Options->General

After I close Maple and start it again, I found it back to "Share one engine among all documents" ??

Why is that and how to make this permanent? 

Btw, the start Maple 2022 icon still says "Maple 2022 shared server". THis is in the start program menu. I complained about this in Maple 2021 but it is still not fixed.  https://www.mapleprimes.com/questions/231901-Why-Maple-2021-Only-Shows-shared-Server

I do not think this has anything to do with it. But who knows.

I noticed this when I started new worksheet and could not do anything in it because another worksheet was running something even though I made sure I had set the engine to start new one for each worksheet (this is the very first thing I do after I install Maple each time).

Any workaround to make the setting for the engine not change after closing Maple?

Windows 10. Maple 2022.

I am using Maple 2021.2 on Ubuntu Linux 20.04 LTS. Sometimes the Maple after start does not show Sig in part of top Maple desktop panel. So I need to restart Maple and 2nd or 3rd start is mostly OK. After that is the situation for some time good.

See attached snapshot... Any idea what is wrong?

The IsSubgraphIsomorphic command accepts either two undirected graphs or two directed graphs as input.  It returns true if G1 is isomorphic to some subgraph of G2. The GraphTheory [IsSubgraphIsomorphic] command was introduced in Maple 2021.

If a graph T is isomorphic to some subgraph T' of  a graph GIsSubgraphIsomorphic(T,G)  will  return true. But there is no option to return T'. That makes it hard to check manually.

I've seen  IsSubgraphIsomorphic behaving strangely lately. I want to check whether K8-P6 contains K7-K3 as its subgraph.

T:=DeleteEdge(CompleteGraph(7),{{1,2},{2,3},{3,1}},inplace= false): 
G:=DeleteEdge(CompleteGraph(8),{{1,2},{2,3},{3,4},{4,5},{5,6}},inplace= false): 
IsSubgraphIsomorphic(T,G)

true

I think theoretically, the result of IsSubgraphIsomorphic is not correct. I also tested it from Mathematica, and it worked as I expected.

h = EdgeDelete[ CompleteGraph[7], {1 <-> 2, 2 <-> 3, 3 <-> 1}]; 
g = EdgeDelete[ CompleteGraph[8], {1 <-> 2, 2 <-> 3, 3 <-> 4, 4 <-> 5, 5 <-> 6}]; 
IsomorphicSubgraphQ[h, g]

False

I wonder what went wrong.

 

PS: Subgraph isomorphism is a question I've asked before, and we can refer to the following links and code. https://www.mapleprimes.com/questions/226937-How-To--Test--A--Graph--Whether-Contains

with(GraphTheory):
with(combinat):
T:=DeleteEdge(CompleteGraph(7),{{1,2},{2,3},{3,1}},inplace= false): 
G:=DeleteEdge(CompleteGraph(8),{{1,2},{2,3},{3,4},{4,5},{5,6}},inplace=false): 
nE,nV := NumberOfEdges(T), NumberOfVertices(T):
# Produce all subgraphs of G which have the same number of edges and vertices as the "test" sub-graph T
U:=choose(Edges(G),nE): nops(%):
U1:=select(t -> (nops(`union`(t[]))=nV), U): nops(%):
gL:= Graph~(U1): nops(%):
ans:= [ seq
          ( `if`
            ( IsIsomorphic( T, gL[j] ),
              j,
              NULL
            ),
            j=1..numelems(gL)
          )
        ]:
if   numelems(ans)>0
then HighlightSubgraph( G, gL[ans[1]], edgestylesheet=[thickness=4, color="Red"]);
     DrawGraph(G, style=spring);
fi;

These codes are due to tomleslie  and  vv. According to above codes, it seems that there is something wrong with IsSubgraphIsomorphic too.

Hi there! 

Do you know when the new version of Maple will be released? 

Do you think it might come with a "Dark Theme"? 

Regards

Kevin

The question https://www.mapleprimes.com/questions/233780-Plot-Absolute-Advantage-Of-Option-A disappeared (I know since I answered today).

Why?

A have som problems when i Will save a project. It Will take 2-5 Minutes where my other freinds never Experince this? Also i have some problems when i pauses writing, when i take notes in class, it Will give me the loading circle on mac( iam using a MacBook Air 2018) 

i hope you Can help:)

thx

The two points on the sphere has radius r=1/2. So, the distance is 1.
The three points on the sphere has radius r=1/sqrt(3). So, all distances are 1.
The four points on the sphere has radius r=sqrt(6)/4. So, all distances are 1.
What is the smallest sphere radius for 5 points and above numbers?  

Find the smallest sphere radius and 3D position of each point.

Answer of smaller radius is better.

Tokoro.


 

All distances of point to point on the sphere to be integer.
The two points on the sphere has radius r=1/2. So, the distance is 1.
The three points on the sphere has radius r=1/sqrt(3). So, all distances are 1.

The four points on the sphere has radius r=sqrt(6)/4. So, all distances are 1.
What is the smallest sphere radius for 5 points and above numbers?  Find the smallest sphere radius and 3D position of each point.

with(plots)with(GraphTheory); with(LinearAlgebra); with(SpecialGraphs)

with(plottools)

NULL

The answer of 4 points. r=sqrt(6)/4

   

plots[display]([c, nodes, plotlinesx], scaling = constrained, style = wireframe, axes = boxed)

 

NULL


 

Download 3D-4points.mw

Dear all

I know how can I use gauss seidel to solve a linear system.

But, how can we add chebychev acceleration.

Thank you 

@acer,
In the past, you had shown how to use take a given sparse A matrix and store the LU components and use the same factorization for multiple backsolves at https://www.mapleprimes.com/posts/41191-Solving-Sparse-Linear-Systems-In-Maple#comment200817

When PDEs are solved, we are calling the A matrix at every time step (with some discretizations in x) and the factorization is done and stored at every time step (this is time-consuming and memory-consuming). Is it possible to call UMFPACK using only the sparse storage and entries? The main routine seems to provide the option 

https://people.sc.fsu.edu/~jburkardt/f77_src/umfpack/umfpack.html

This would mean that the pattern is found only once for the Jacobian at t= 0, then only the non-zero sparse entries (vector/row, not a matrix) are updated at every time step.

To be clear, what I am asking for is create a random sparse matrix (say 4x4 or 10x10)
create a b Vector.

Solve AZ =b with method = SparseDirect. (This should internally create and store R, CC, X as at https://people.sc.fsu.edu/~jburkardt/f77_src/umfpack/umfpack.html)

Store R, CC, X and update only X for a different A matrix with the same sparsity pattern and solve for Z using stored (R, CC), and updated X.

First 35 36 37 38 39 40 41 Last Page 37 of 2097