MaplePrimes Questions

How to define 4 functions from the dsolve solution of a system of 4 differential equations?

restart: with(plots): with(DEtools):with(LinearAlgebra):with(Statistics):with(CurveFitting):with(Optimization): 
ddesys := {diff(S(t),t) = -beta*S(t)*Ix(t)/N, 
diff(Ex(t),t) = beta*S(t)*Ix(t)/N - sigma*Ex(t-tau__1),
diff(Ix(t), t) = sigma*Ex(t - tau__1)- gamma*Ix(t-tau__2), 
diff(R(t),t) = gamma*Ix(t-tau__2), 
diff(Dx(t),t) = delta*Ix(t), 
S(0) = 80900, Ex(0) = 1, Ix(0) = 1, R(0) = 0, Dx(0) = 0 }:
dsn := dsolve(eval(ddesys, {beta = 4, gamma = 0.0478, sigma = 0.10, delta = 0.0005, N=80900, tau__1 = 1.1,tau__2 = 8.7,tau__3 = 0}), numeric):


Please can you give me a hand with numerical solving and visualising the partial differential wave equation with stochastic term eta(t), using methods of stochastic calculus?

diff(u(x, t), t $ 2) - (1+eta(t))*diff(u(x, t), x $ 2) = 0

I had a look at the "stochastic" package by Sasha Cyganowski, but couldn't find an example for stochastic pde.

Look forward to your help.



Here is a known probability riddle:

A and B are two lists of 100 binary numbers:


One was obtained by tossing a coin (1 for a head, 0 for a tail), and the other by a human, who was asked to simulate tossing a coin.

Question: which one comes from a human brain?
The standard answer: B was produced using a coin, because (among other things) the probabilty of obtaining a "000000" or "111111" is about 80%, but a humain brain tends to avoid such "simulations".

My Question: what (if any) statistical test can be used in Maple for an answer?
(I have tried ChiSquareSuitableModelTest but both lists were accepted).



# I solved the differential equation using a fourier series decomposting method. I found with the help of "Dsolve" the different expressions of the fourier constants and now I will apply the boundary conditions to find the expressions of its constants.

#this my boundary conditions

#this my system of equations

Recently Maple started freezing on me for a few minutes; after that it continues to work and then freezes again and so on (it does not so much freezes as it pauses).  I do not know what changed on my system (which is Windows 10) for this to happen.  I had been using Maple 2019 when this started and then upgraded to Maple 2020 but that did not solve my problem.

It does not seem to have to do with the type of computations I am doing.

I have problem with usage of solve for the solution of the system of six and eight symbolic equations. I need to get expressions for variables: R__xl, R__xs, R__xsi, R__zl, R__zs, R__zsi, dbeta__l(t), dbeta__s(t). I tried to find solution for 8 equations, but I got the message: Warning, solutions may have been lost. I thought that the system is non-linear and tried to solve it for six variables (R__xl, R__xs, R__zl, R__zs, R__zsi, R__xsi), in this case equations are linear, but Maple ignored the solve command and did not give a solution or error. Could someone help me with this problem?


I am not sure how to choose between Threads:-Seq and Grid:-Seq.  

The problem:  a procedure, proc1, that calls two other procedures, proc2 and proc3, verifies if a set of parameters fulfills a certain condition. Proc1, proc2 and proc3 are not part of Maple available functions.  

Right now I am using Grid:-Seq to return the result of applying proc1 to chunks of a thousand parameters.  I wonder whether I could use Thread:-Seq instead.   What are the advantages of using one instead of the other?  And when do I choose one over the other?  


I would appreciate if you could provide simple examples to explain the differences.  


Many thanks.



PS.  There is a problem with Grid:-Seq as reported in one of my previous questions.


Maple 2017.3 has these problems which hamper my work with it. I shown three examples.

Example 1: Maple cannot recognize automatically that two complex numbers are equal:

[>eq1:=9*exp((1/9)*(5*I)*Pi)-9*exp((1/9)*(2*I)*Pi) = -8*exp((1/9)*(2*I)*Pi)+7*exp((1/9)*(5*I)*Pi)+exp((1/18)*(13*I)*Pi)*sqrt(3);

Here, lhs(eq1) and rhs(eq1) are in fact equal. Yes, evela(simplify(lhs(eq1)-rhs(eq1)) reduces to zero but not when solving equations (see Example 2).

Example 2:


yields no answer.

Example 3:


Maple fails to substitute the alias and recognize that rt=omega.

Any suggestion on a work-around problems 2 and 3 would be helpful.


Rafal Ablamowicz


I have load the new Physics-Version 678, but it is not active. How can I do this?

Here the output:



 User Interface: 1455132
         Kernel: 1455132
        Library: 1455132
       MapleIDE: 928330



Standard Worksheet Interface, Maple 2020.0, Windows 10, March 4

   2020 Build ID 1455132


   Maple 2020.0, X86 64 WINDOWS, Mar 4 2020, Build ID 1455132


The "Physics Updates" version in the MapleCloud is 678 and is

   the same as the version installed in this computer, created

   2020, May 20, 10:21 hours, found in the directory

   C:\Users\wgellien\maple\toolbox\Physics Updates\lib\




Warning, this package updates content shipped in a standard Maple install.  Use the 'restart' command to clear your session before using these commands.
Kernel(The "Physics Updates" version "678" is installed but is

   not active. The active version of Physics is within the

   library C:\Users\wgellien\maple\toolbox/Physics Updates/lib\P\

  hysics Updates.maple, created 2020, May 20, 14:46 hours),

  [The "Physics Updates" version "678" is installed but is not

   active. The active version of Physics is within the library

   C:\Users\wgellien\maple\toolbox/Physics Updates/lib\Physics

   Updates.maple, created 2020, May 20, 14:46 hours]


With kind regards

Wolfgang Gellien

Can a second plot be added to a plot generated by a plots[odeplot] command for the case below?

> dsn := dsolve(eval(ddesys, {beta = 4, gamma = 0.0478, sigma = 0.10,tau__1 = 1.1,tau__2 = 8.7}), numeric):

> plots[odeplot](dsn, [[t, S(t), color = green], [t, Ex(t), color = black], [t, Ix(t), color = blue],[t, R(t), color = red]],  0 .. 100, legend = [ S(t), Ex(t), Ix(t), R(t)], labels = [t,""] );


In Maple 2019 we get the strange value

cos((Pi/2) -1e-12);
                       -2.051033808 10   


In Maple 2020 we get the correct answer

                9.999999999996916397514419 10   

That error in Maple 2019 certainly messed up quite a few of my calcualtions!



I'm trying to create a graph using a matrix that has numbers and text values, how can I specify that some values of the matrix are strings and others are numbers? I'd like to create something like this

Mainly just symantics, Maple often shifts -'ve terms to the front, how to re-orient terms so the positive terms are always first?

a:= (a2b1-a1b2)*j1+(a4b4-a3b5)*j2

                           ( - a1b2 + a2b1) * j1 + ( - a3b5 + a4b4) * j2

Here is the simplest example of the problem. If I type

assume(j, integer, j>0); assume(k, integer, k > 0);

followed by

int(cos(j*t)*cos(k*t), t = -Pi..Pi);

Maple gives the answer 0, not, as I would have expected, Pi*KroneckerDelta[j,k].

Is there a way to force Maple to alllow for both the possibilities that j = k and j <> k, and thereby to give the general result using the Kronecker delta (or equivalent)?

Bought this book way back in 2000 to learn programming in Maple for procedures.

Problem was that i could not test myself with the exercises, because there were no answers included 

Has someone answers in Maple from these exercises ? 

That is the only way to learn from this book and check my knowledge about programming.



First 422 423 424 425 426 427 428 Last Page 424 of 2297