Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

Hi all,

There is issue with modp1(('Embed')(...)) function.

Please look at the file:

bug_embed.mw

As you can see in lines 1, 3, 5 Embed function in combining with Constant cutting several digits from argument.

Thank you.

Hi, I bought the linuix 64 installation, and prior to doing so I read that I would have two installations, and so I have proceeded to replace my windows OS on my computer of highest processing power, after a successful install on my laptop, however when I attempted to activate my second installation it returned the message that I have already used all of my activations. If worse comes to worse, I need to uninstall maple2020 on this laptop, . and use my one activationon the other machine. What do I do?

Hi, 

A year ago I submitted a problem about the sampling of a Gaussian Random Variable (GRV).
A serious problem with Statistics:-Sample()
In short, the default method (Ziggurat method) used in the Stratistics package to sample a GRV overestimate the weights of the tails of the distribution.


Forcing the method to "envelope" is a way to obtain a correct sample

Statistics:-Sample(Normal(0, 1), N, method=envelope)

(another one is to use for instance the Box-Muller sampling algorithm ; look to the reference above for the fast implementation acer proposed).

I recently observed that the envelope method generates an error ("too many inflexion points...") when the standard deviation of the GRV is not one.
I tried to avoid this error by adding the suboption "range" :

restart:
f := (sigma, k, N) => Statistics:-Sample(Normal, 0, sigma), N,  method=[envelope, range=-k*sigma..k*sigma]):
# this works
f(1, 3, 10):
# these do not work
f(0.1, 3, 10):
f(10, 3, 10):

Here, k is a positive real value (which could depend on N but can be imagined to be around 5 or 6 to fix the ideas
Even with this suboption I keep receivind the same error.

If there is no way to parameterize correctly the envelope method, this means that Maple is unable to sample correctly a GRV.

Of course, if X is a GRV of mean mu and standard deviation sigma on could do this to generate a sample of X:

Xstd := RandomVariable(Normal(0, 1)):
Sstd := Sample(Xstd, 10^6, method=envelope):
S := mu +~ sigma *~ Sstd

But this should not be a permanent solution.

second has rsolve solution

compare original sequence

accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])),

with rsolve solution , it start from third number wrong, some number are wrong but correct at next number, 

but i just want to guess next number is 1 or 2

[seq(subs(k=kk, sol), kk=0..(lengthofsequence+1))],

with(SumTools):
with(gfun):
accsum := proc(xx)
local result,mm:
result := []:
for mm from 1 to nops(xx) do
temp := Summation(xx[k], k = 1 .. mm):
result := [op(result), temp]:
od:
return result:
end proc:


patterngroup := [2, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1]: # left is latest, 2,1,1..
lengthofsequence := 5:
for mm from 1 to 12 do
if guessgf(accsum(Reverse([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), x) = FAIL then
print(patterngroup[mm]):
else
sol := rsolve(listtorec(accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), u(n))[1], u(k)):
acxxc := accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])):
olist := [seq(patterngroup[k], k=(mm)..(mm+5))]:
#start from 0
print(patterngroup[mm], olist, accsum(ListTools[Reverse]([seq(patterngroup[k], k=(mm)..(mm+lengthofsequence))])), [seq(subs(k=kk, sol), kk=0..(lengthofsequence+1))], sol, subs(k=(lengthofsequence+1), sol), subs(k=(lengthofsequence+1), sol)-acxxc[nops(acxxc)]):
end if:
od:
 

Hello all

I wanna solve an optimal control problem and I have searched the Internet but I could not find any tutorial or video course on how to solve it with the Pontryagin maximum principle method. It is my first time that I want to use MAPLE for solving an optimal control problem and I would be thankful if someone can help me.

$$\max \int_{0}^{1} x_{2} [u(t)-u(t)^2] dt        $$

$$  \dot{x}_{0} = -(1-u(t)) x_{0}(t)+2 x_{1}(t) $$

$$  \dot{x}_{1}(t) = (1-u_{t}) x_{0}(t) +2 x_{2}(t) -[3-u(t)]x_{1}(t)  $$

$$   \dot{x}_{2}(t) = (1-u(t))x_{1}(t) -2 x_{2}(t)   $$

$$  0 \le u_{t}  \le \frac{1+t^2}{1+t}  $$

 

Thanks

Given a lagrangian  in general relativity , how can I calculate equation of motion using euler lagrangian equation in maple software ?

the lagrangian is 

L = 1/2 g[mu,nu] diff(x[~mu], lambda) diff(x[~nu],lambda)

here lambda is the affine parameter.  and the metric is 

 

 

metric coordinate = (t,u,x,y)

How I can find the coefficient an, and bn according to the following solution?

the coefficients an and bn can be found by solving the
two linear equations that come from V = V[0] at eta=eta[0] and 
V = V[1] at eta=eta[1], and comparing with following Eq in each
case.

Best

2.mw

 

 

 

 

I an unable to prot the optimal  control function and the controls individualy for the diterministic mathematical model with an two or more optimal control. May  any one can give me a sample program on it. Such us the following figure

You may give me direction even.

Moving to online learning has proved difficult to get any real 1 on 1 time or with my teachers around this question, and the help I have got hasn't helped me as yet. 

I understand that asking for homework help is probably frowned upon but I would appreciate any help, guidance or direction on how to answer the below in Maple2019. 

The general formula for a plane in the 3D space is z = ax + by + c, where a, b, c are the parameters. Alice encodes three English words to three numbers by using the Maple command "text2num". She then set up a (3,4) secret sharing scheme with the idea of the Blakley method. The four shares are four planes given by: 

z =   4x + 19y + 2515211725275120 (mod 2515211819051461)

z = 52x + 27y + 2515210613496048 (mod 2515211819051461)

z = 36x + 65y + 2515210981587340 (mod 2515211819051461)

z =   6x + 60y + 2515211676449260 (mod 2515211819051461).

Find the secret English words of Alice with Maple command 

I'm absolutely hitting a wall. The most I have found in the word "you".

Thanks in advance. 

Hi there.

It seems like a bug in modp1(('Rem')(...)) with large polynomials with large coefficients.

Please look at the file:

bug_rem.mw

It needs the file polys.m there:

https://dropmefiles.com/9fATR

File polys.m too big for this forum so I used dropmefiles.

Polys.m contain two polynomials x and f_t with large degrees: degree(f_t) = m = 50021, degree(x) = 2*m - 2 = 100040 and large coefficients up to 2^N, where N = ceil(m / 2)+2 = 25013.

I just compute rem(x,f_t) mod 2^N.

As you can see in the first part of doc bug_rem.mw I decreased coefficients of polynomials by additional mod 2^N (with Embed function), where N = floor(N / 2) = 12506. WIth these decreased polynomials and decreased N modp1(('Rem')(...)) function works well and use maximum about 2.5 Gb of RAM.

But in the second part of doc bug_rem.mw with original polynomials and N = 25013 modp1(('Rem')(...)) use maximum about 3.5 Gb of RAM and crash with error:

Error, Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc
 

This is strange and looks like a bug considering that the test server has 48 Gb of RAM.

Is it a bug or modp1(('Rem')(...)) just need more than 48 Gb of RAM?

How many RAM it needs for this computation?

Thank you

Hello, I am trying to fix the problem reported below.

I am using the 64 bit version of Maple 2020.1. I am experiencing similar problems with other java applications. So I believe it must be something related to Java.

Moreover, it looks like the local refreshing problem is following the cursor of the mouse, therefore it must be something related to the interaction of the mouse with the GUI.

I am using a I7 CPU, 32 GB of Ram and a Nvidia Geforce RTX 2070.

Is anyone experiencing something like this? How can I fix this?

My personal edition of Maple 2020 throws java-lang-thread for every plot3d. No further output is provided by Maple. How can I further troubleshoot this?

Dave

Why do I get an error when using this:/// during readin of a xml attachment in Maple workbook?

Exceltools Import works without problems.

ReadXML.zip

Is there any programming or package to solve my problem. I am poor in programming. 

Thanks sincerely!

Any idea why the result of the FirstChild function of the attached file is

_XML_Text("\n  ")

Test.zip

I also miss a more complete example on Maple Help for writing, reading and processing xml files.

1 2 3 4 5 6 7 Last Page 1 of 1727