Maple 2019 Questions and Posts

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

Hi,

 

I am trying to use Maple to evaluate the recursion series as below, but I am getting an error when I try to call c: Error, (in depends) too many levels of recursion

Recursion.mw

 


 

 

b := proc (k) options operator, arrow; (-1)^k*GAMMA(1+(1/2)*k)^2/factorial(k) end proc

proc (k) options operator, arrow; (-1)^k*GAMMA(1+(1/2)*k)^2/factorial(k) end proc

(1)

c := proc (k) options operator, arrow; piecewise(k = 0, b(0)^N, 1 <= k, (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0))) end proc

proc (k) options operator, arrow; piecewise(k = 0, b(0)^N, 1 <= k, (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0))) end proc

(2)

b(2)^N

(1/2)^N

(3)

c(1)

Error, (in depends) too many levels of recursion

 

 

F := proc (s, kmax, N) options operator, arrow; sum(c(k)*s^k, k = 0 .. kmax) end proc

proc (s, kmax, N) options operator, arrow; sum(c(k)*s^k, k = 0 .. kmax) end proc

(4)

powcreate(c(k) = (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0)), c(0) = b(0)^N)

Error, (in depends) too many levels of recursion

 

c := rsolve({c(0) = b(0)^N, c(k) = (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0))}, c(k), makeproc)

Error, (in depends) too many levels of recursion

 

c := proc (k) if k = 0 then return b(0)^N else return (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0)) end if end proc

proc (k) if k = 0 then return b(0)^N else return (sum((q*(N+1)-k)*b(q)*c(k-q), q = 1 .. k))/(k*b(0)) end if end proc

(5)

c(1)

Error, (in _factorial) too many levels of recursion

 

F := proc (s, kmax, N) options operator, arrow; sum(c(k)*s^k, k = 0 .. kmax) end proc

proc (s, kmax, N) options operator, arrow; sum(c(k)*s^k, k = 0 .. kmax) end proc

(6)

F(1, 2, 2)

Error, (in unknown) too many levels of recursion

 

NULL


 

Download Recursion.mw

I'm using MAPLE 2019 and I'm sometimes surprised by its behaviour.  For example, I appear to have an example where it evaluates the integral of each of two terms but not their sum...  What's going on?  Please see the attached.

restart

g0 := exp(r*cos(theta))/Pi

exp(r*cos(theta))/Pi

(1)

G0 := `assuming`([int(g0, theta = 0 .. Pi)], [r > 0])

BesselI(0, r)

(2)

g1 := exp(r*cos(theta))*cos(theta)/Pi

exp(r*cos(theta))*cos(theta)/Pi

(3)

G1 := `assuming`([int(g1, theta = 0 .. Pi)], [r > 0])

BesselI(1, r)

(4)

g := g0+g1

exp(r*cos(theta))/Pi+exp(r*cos(theta))*cos(theta)/Pi

(5)

G := `assuming`([int(g, theta = 0 .. Pi)], [r > 0])

int(exp(r*cos(theta))/Pi+exp(r*cos(theta))*cos(theta)/Pi, theta = 0 .. Pi)

(6)

``


 

Download Maplesumint.mw

Hello, I'm using free 15 day trial Maple 2019.2 on my Macbook (Macos 10.15.3).

I can't work Maple. I enter some inputs (2+3) and press enter. It works. But when I write plot, version(), f, sin.. or something else it didn't works. And no response. When I click enter, nothind happen. What is the problem? Please help me.. 

   I download one  file about  all 5 connected graphs with graph6  (total 21 graphs). format from http://users.cecs.anu.edu.au/~bdm/data/graphs.html,and I want to import it in Maple. Since platform restrictions , I can not attach the file .   Please download it by yourself,very thanks to you ! 

   I put the file  in the installation path of  Maple in my computer:D:\\ Program Files\Maple 2019. (my computer system is Window 10 )  And I import it like following: 

  But it  only imports the graph of  the first row in the file. How to import all graphs in a file of graph6 format one time?

 

I received an (automated) email, which called attention to an update.

Where can I find the update?

Thank you, Jan Drösler

 

Hi there,

I have been using Maple for a while now.

I installed Maple on my Desktop PC, but I am experencing horrendous loading times, and just in general, a slow client. When I look in Task Manager I can see Java Platform SE Binary run at 0% CPU or close to 0% CPU. It uses about 600 MB of ram. I think this is the issue. On my laptop it runs much higher, and I experience no issues. My Desktop PC is significantly better than my laptop. I am running a i7-7700k with a RTX 2080, so there shouldn't be any hardware worries. 

Does anyone know what is causing this? Simple math like 1+1 takes time to execute. It is very slow.

Hope someone knows what to do.

Thanks,

Kritix.

Hope that no one minds a beginners question.   How do I enter non-null k=0 robertson-walker tetrad in the physics package?  Not the tensor package as that has depreciated or the differential geometry package as notation is different there.

How can I set Maple 2019 so that all inputs are of the color red?

I am using a Lenovo Notebook 64-bit.

 

Thank you, Jan Drösler

 

I am trying to write a metric in Maple 2019, using the Physics package in Cartesian coordinates. I know that there is already a pre-installed way in which to set the coordinates to Cartesian, namely, if we have something like 

Setup(coordinates=cartesian);

or similarly, using the Coordiantes calling sequence, such that we may define something like

Coordinates(A=cartesian);Setup(coordinates=A);

yet, if I am not mistaken, this gives the coordinates in the following form: {x,y,z,t}, yet I seek to define the metric in the following, perhaps more arbitrary coordinate system, {x1,x2,x3,t}. Is there any way to setup the coordinate system to read like the set I just described, such that I can then take a norm of these three spatial coordaintes to be |x|? Any help would be greatly appreciated. 

   It would seem that the option style = planar  of DrawGraph()    is  failure when some graphs are planar.
   For example: 

treeof5:=[NonIsomorphicGraphs(5,4,output= graphs,outputform=graph,restrictto = connected )]:
DrawGraph ~ (treeof5, stylesheet=[vertexborder=false,vertexpadding=20]);


 

We know tree is planar graph obviously. But when I add the option style = planar ,  drawing of the first tree of list displays an error :
Error, (in GraphTheory:-Graph) vertex 1 cannot be its own neighbour in list of neighbours

I did not find any reason to explain. 

Hi,

I'm coming from Mathematica since Mathematica uses single-core to compute multiplications of puiseux series, so I'm looking for any software that might do this faster. I don't know Maple -- I hope it can use multiple cores and runs faster.

 

My calculation is basically multplying out thousands of terms of the following type:

5/y + 10 + y + (((8/y^2 - 13/y + 108) - 64/y) + 10*y^2)*q + (3/y^3 + 2/y^2 - 240/y + 808 - 513*y + 108*y^2 + y^3)*q^2

How should I do this? Maple doesn't seem to have multivariate puiseux series data structure. But observe my series is simple -- I have a power series in q and a Laurent series in y.

I could

1. Multiply using 'expand' . My worry is, if I expand product of two series in q^10000 then this is probably slower than Mathematica since 'expand' would compute far more terms than necessary instead of throwing away the extra terms beyond q^10000 in some O(q^10000) notation like Mathematica does.

2. I could use 'series' in q. 

series((1/y + 10 + y + (((10/y^2 - 64/y + 108) - 64/y) + 10*y^2)*q + (1/y^3 + 108/y^2 - 513/y + 808 - 513*y + 108*y^2 + y^3)*q^2)*(1/y + 10 + y + (((10/y^2 - 64/y + 108) - 64/y) + 10*y^2)*q + (1/y^3 + 108/y^2 - 513/y + 808 - 513*y + 108*y^2 + y^3)*q^2), q = 0, 2)

This has the undesirable feature of not expanding out in y, returning 

series((1/y + 10 + y + (((10/y^2 - 64/y + 108) - 64/y) + 10*y^2)*q + (1/y^3 + 108/y^2 - 513/y + 808 - 513*y + 108*y^2 + y^3)*q^2)*(1/y + 10 + y + (((10/y^2 - 64/y + 108) - 64/y) + 10*y^2)*q + (1/y^3 + 108/y^2 - 513/y + 808 - 513*y + 108*y^2 + y^3)*q^2), q = 0, 2).

 

I could then call expand on this, but using both series and then expand makes me worry about runtime.

 

Any advice?

Hello,

I have a procedure, SoS that returns the value for sos. After compiling the procedure, I get float(undefined) for the return value. How can this be fixed?

 

Thanks so much for your time.

 


 

restart; kernelopts(version); interface(version)

`Standard Worksheet Interface, Maple 2019.2, Windows 10, November 26 2019 Build ID 1435526`

(1)

NULL``

Erealm := Array([1235.773, 1383.61, 1457.262, 1500.264, 1550.184, 1612.161, 512.7612, 656.6554, 743.6461, 793.375, 855.7937, 939.1199, 79.9523, 128.1375, 167.1459, 193.592, 230.5401, 287.8348, 22.389, 29.41424, 35.91883, 40.86366, 48.79128, 63.4475, 15.34275, 17.10101, 18.63288, 19.77424, 21.5671, 24.84739, 13.8321, 14.52843, 15.07626, 15.47014, 16.07713, 17.16574, 13.13383, 13.63704, 13.95888, 14.16849, 14.46123, 14.93971, 12.76736, 13.2203, 13.50072, 13.673, 13.89852, 14.23242], datatype = float[8]); LFm := Array([.156795, .1248161, .1108722, .1032334, 0.9474591e-1, 0.8496174e-1, .361361, .3020133, .2706018, .2546556, .2356126, .2121333, .6883826, .6532309, .6155578, .5906291, .5578895, .5123917, .394458, .5326358, .6095816, .6489291, .6894866, .7232845, .1456468, .2226473, .2826954, .3228541, .3789496, .4632182, 0.6758032e-1, 0.9437384e-1, .1198126, .1387971, .1680719, .2181531, 0.5173809e-1, 0.586771e-1, 0.6591736e-1, 0.7206892e-1, 0.8243504e-1, .1024519, 0.457877e-1, 0.493836e-1, 0.5191291e-1, 0.539114e-1, 0.5708074e-1, 0.6330242e-1], datatype = float[8]); maxx := ArrayNumElems(LFm); E0 := 13.; E00 := 4200.; alpha := .5; beta := 0.7e-1
NULL

``

SoS := proc (E0::float, E00::float, alpha::float, beta::float, maxx::integer, Erealm::(Array(datatype = float[8])), LFm::(Array(datatype = float[8])))::float; local k, omegatau, Ecomplex, Erealc, Eimagc, LFc, sos; sos := 0.; for k to maxx do Ecomplex := Complex(Erealm[k], Erealm[k]*LFm[k]); omegatau := abs(-I*(((E0-E00)/(Ecomplex-E00))^(1/beta)-1)^(1/alpha)); Erealc := Re(E00+(E0-E00)/(1+(I*omegatau)^alpha)^beta); Eimagc := Im(E00+(E0-E00)/(1+(I*omegatau)^alpha)^beta); LFc := Eimagc/Erealc; sos := sos+(log10(Erealm[k])-log10(Erealc))^2+(LFm[k]-LFc)^2 end do; return sos end proc

``

``

SoS(E0, E00, alpha, beta, maxx, Erealm, LFm)

HFloat(0.015392438292813794)

(2)

cSoS := Compiler:-Compile(SoS); cSoS(E0, E00, alpha, beta, maxx, Erealm, LFm)

Float(undefined)

(3)

``

``


 

Download Compile_proc.mw

 

I'm not sure if it's possible to find a formula with predictive qualities, but I thought I'd ask anyway ...

IOD.mw

         I'd like to draw a graph with its  vertices  of 3d style.  Just like following image:

  

  I did not find the desired choices for this graph.

Hi,

I would like to determine if some lengthy expression F is linear in one of its inderteminates X.
 I use to use type(F, linear(X)) to do this but I've just found that if F is piiecewise defined, then type(F, linear(X)) returns false even if E is linear in X...
For instance, let  F := a*X+piecewise(Y<0, X, b)
then type(F, X) returns false.

I do not pretend it is a bug: at first sight I would say that F is linear with respect to X but maybe the notion of linearity with respect to an indeterlinate must be interpretated as "linear on each branch" ?

For the moment I've circumvented the problem by doing this :
dF := diff(F, X):
has(dF, X):
# returns {\emptyset} if F is linear in X
 

But, as I said, F can be a rather lengthy expression invoking a lot of piecewise constructors, and I don't think that computing dF is an efficient way to do the job.

Do you have a better idea to proceed?

Thanks in advance

First 7 8 9 10 11 12 13 Last Page 9 of 30