Maple 2015 Questions and Posts

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

Dear Users!

Hoped everyone fine here. I have three main questions regarding the maple code given bellow:

restart; with(LinearAlgebra); with(plots);

alpha := 1; beta := 1; theta := 1/2;

UU := sinh(x)*sinh(y)*sinh(z)*exp(-1.*t);

NN := 3; L := 0; R := 1; T := 1; N := NN; Mx := NN; My := NN; Mz := NN; `Δx` := (R-L)/Mx; `Δy` := (R-L)/My; `Δz` := (R-L)/Mz; `Δt` := (R-L)/N;

kappa[1] := 1; kappa[2] := 2/x^2; kappa[3] := 1/x^2; kappa[X] := x^2+y^2+z^2+1; kappa[Y] := x^2+y^2+z^2+1; kappa[Z] := x^2+y^2+z^2+1; kappa[4] := 0; NL := 3;

ics := [seq(seq(seq([u[i, j, k, 0] = eval(UU, [x = i*`Δx`, y = j*`Δy`, z = k*`Δz`, t = 0]), u[i, j, k, -1] = eval(u[i, j, k, 1]-2*`Δt`*(eval(diff(UU, t), t = 0)), [x = i*`Δx`, y = j*`Δy`, z = k*`Δz`, t = 0])][], i = 0 .. Mx), j = 0 .. My), k = 0 .. Mz)];

bcs := [seq(seq(seq([u[0, j, k, n] = eval(UU, [x = 0, y = j*`Δy`, z = k*`Δz`, t = n*`Δt`]), u[Mx, j, k, n] = eval(UU, [x = L, y = j*`Δy`, z = k*`Δz`, t = n*`Δt`])][], j = 0 .. My), k = 0 .. Mz), n = 1 .. N), seq(seq(seq([u[i, 0, k, n] = eval(UU, [x = i*`Δx`, y = 0, z = k*`Δz`, t = n*`Δt`]), u[i, My, k, n] = eval(UU, [x = i*`Δx`, y = L, z = k*`Δz`, t = n*`Δt`])][], i = 1 .. Mx-1), k = 0 .. Mz), n = 1 .. N), seq(seq(seq([u[i, j, 0, n] = eval(UU, [x = i*`Δx`, y = j*`Δy`, z = 0, t = n*`Δt`]), u[i, j, Mz, n] = eval(UU, [x = i*`Δx`, y = j*`Δy`, z = L, t = n*`Δt`])][], i = 1 .. Mx-1), j = 1 .. My-1), n = 1 .. N)];
Sol := {u[1, 1, 1, 1] = 0.2366497936e-1, u[1, 1, 1, 2] = 0.7589975856e-2, u[1, 1, 1, 3] = 0.6029906475e-3, u[1, 1, 2, 1] = 0.3778786317e-1, u[1, 1, 2, 2] = 0.7126415819e-2, u[1, 1, 2, 3] = -0.1197885714e-2, u[1, 2, 1, 1] = 0.3778786315e-1, u[1, 2, 1, 2] = 0.7126415820e-2, u[1, 2, 1, 3] = -0.1197885718e-2, u[1, 2, 2, 1] = 0.6038763054e-1, u[1, 2, 2, 2] = 0.4264591907e-2, u[1, 2, 2, 3] = -0.3509477851e-2, u[2, 1, 1, 1] = 0.3171958616e-1, u[2, 1, 1, 2] = -0.1327161715e-1, u[2, 1, 1, 3] = -0.4628647419e-2, u[2, 1, 2, 1] = 0.4979852397e-1, u[2, 1, 2, 2] = -0.3060811899e-1, u[2, 1, 2, 3] = -0.344914876e-4, u[2, 2, 1, 1] = 0.4979852397e-1, u[2, 2, 1, 2] = -0.3060811898e-1, u[2, 2, 1, 3] = -0.3449150010e-4, u[2, 2, 2, 1] = 0.7882396741e-1, u[2, 2, 2, 2] = -0.6192340018e-1, u[2, 2, 2, 3] = 0.1156615222e-1}

Using set of points given in ics, bcs and Sol

1. I want to contruct a vector at any time level (by fixing fourth suffix like u[i,j,k,n]) for i = 0..Mx,j=0..My,k=0..Mz and then find its L2 and L[infinity] norms.

2. Next I want contruct a vector by fixing two suffixes like u[i,j,k,n]) for i = 0..Mx,j=0..My and plot a surface in 3D

3. Finally I want to construct a vector by fixing three suffixes like u[i,j,k,n]) for i = 0..Mx, and plot a curve in 2D.

I'm waiting for your positive respone. I shall be very thankfull to you in advance.

Special request to:
@acer @Carl Love @Kitonum @Preben Alsholm

Maple doesn't completely check the condition on the number of trials "n" for Binomial and NegativeBinomial distributions (package Statistics).
The attribute "Conditions" explicitely says that n must be a strictly positive integer but no strictly positive real valuereturna an error (ok, it would be stupid to set n to a non integer value !!!).

I think it is a default that ought to be corrected in future releases (this default still exists in Maple 2018)

 

restart

kernelopts(version)

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

with(Statistics):


BINOMIAL DISTRIBUTION

X := RandomVariable(Binomial(n, p)):
L := [attributes(X)][3]:
A := exports(L)

Conditions, ParentName, Parameters, CDF, CharacteristicFunction, Kurtosis, Mean, Median, Mode, MGF, ProbabilityFunction, Skewness, Support, Variance, VariationCoefficient, CDFNumeric, QuantileNumeric, RandomSample, RandomSampleSetup, RandomVariate

(2)

L:-Conditions

[0 <= p, p <= 1, n::posint]

(3)

# Maple should return an error for N is not of type posint
#
# It seems that Sample uses floor(N)

N := 10.49; type(N::posint);
P := 1/2:
X := RandomVariable(Binomial(N, P)):
Mean(X), N*P;
ProbabilityFunction(X, k);
S := Sample(X, 10^6):
Mean(S);


# A non consistent result (only non negative values of k should be accepted)

eval(ProbabilityFunction(X, k), k=evalf(Pi));

N := 10.49

 

false

 

5.245000000, 5.245000000

 

piecewise(k < 0, 0, binomial(10.49, k)*(1/2)^k*(1/2)^(10.49-k))

 

HFloat(4.998903)

 

.1096019539

(4)


NEGATIVE BINOMIAL DISTRIBUTION

X := RandomVariable(NegativeBinomial(n, p)):
L := [attributes(X)][3]:
A := exports(L):
L:-Conditions

[0 < n, 0 < p, p <= 1]

(5)

N := 10.49:
P := 1/2:
X := RandomVariable(NegativeBinomial(N, P)):

Mean(X)


 

Download BinomialLaw.mw

 

Hi, 

When creating a user random variable, I would like to instanciate some of its attributes, for instance ParentName.
But it seems that it's not always possible.

​​​​​​​Is it a Maple's limitation or am I not doing the things correctly ?
​​​​​​​
Example:
 

restart:

with(Statistics):

U := RandomVariable(Uniform(0, 1)):

interface(warnlevel=0):

A := attributes(U)[3]

_ProbabilityDistribution

(1)

AllAttributes := with(A);

[CDF, Conditions, HodgesLehmann, InverseSurvivalFunction, MGF, MaximumLikelihoodEstimate, Mean, Median, Mode, PDF, Parameters, ParentName, Quantile, RandomSample, RandomSampleSetup, RandomVariate, RousseeuwCrouxSn, Support, Variance]

(2)

A:-ParentName

UniformDistribution

(3)

# Define a user random variable

v := Distribution(PDF = (z -> piecewise(0 <= t and t < 1, 1, 0))):
V := RandomVariable(v):
A := attributes(V)[3];
AllAttributes := with(A);
A:-Conditions;

_ProbabilityDistribution0

 

[Conditions, PDF]

 

[]

(4)

# its definition can be augmented by adding some recognized attributes...
# even if the result returned by Mean is strange

v := Distribution(PDF = (z -> piecewise(0 <= t and t < 1, 1, 0)), 'Mean'=1/Pi, 'Median'=exp(-1)):
V := RandomVariable(v):
A := attributes(V)[3];
AllAttributes := with(A);
[Median, Mean](V)

_ProbabilityDistribution1

 

[Conditions, Mean, Median, PDF]

 

[exp(-1), 1/Pi(_R1)]

(5)

# but not all the recognized attributes seem to be able to be instanciated:

v := Distribution(PDF = (z -> piecewise(a <= t and t < b, 1/(b-a), 0)), 'Parameters'=[a, b]);
v := Distribution(PDF = (z -> piecewise(a <= t and t < b, 1/(b-a), 0)), 'ParentNames'=MyDistribution);

Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is Parameters = [a, b]

 

Error, (in Statistics:-Distribution) invalid input: too many and/or wrong type of arguments passed to NewDistribution; first unused argument is ParentNames = MyDistribution

 

 

 


 

Download Attributes.mw

Dear Users!

I have made a code using loops. But when I exceute it I go unwanted expression please see the files and try to fix it. I shall be very thankful. 

 

Help.mw

Special request to:

@acer @Kitonum @Preben Alsholm @Carl Love

hello everyone,

please I need our help to find the eigenvalues (m) of this equation (eq)

thank you 

eq.mw
 

``

restart

with(LinearAlgebra):

NULL

Digits := 5:

``

``

eq := exp(-m*xi)*(exp((1/4)*sqrt(-m)*r*(r-1))*(1+(7/20)*sqrt(m)*r+((49/800)*m-(1/4)*sqrt(m))*r^2)*r^I+exp((1/4)*sqrt(-m)*r*(r-1))*(1+(7/20)*sqrt(m)*r+((49/800)*m-(1/4)*sqrt(m))*r^2)*r^I*cos(theta)+r^I*sin(5*theta))

exp(-m*xi)*(exp((1/4)*(-m)^(1/2)*r*(r-1))*(1+(7/20)*m^(1/2)*r+((49/800)*m-(1/4)*m^(1/2))*r^2)*r^I+exp((1/4)*(-m)^(1/2)*r*(r-1))*(1+(7/20)*m^(1/2)*r+((49/800)*m-(1/4)*m^(1/2))*r^2)*r^I*cos(theta)+r^I*sin(5*theta))

(1)

``


 

Download eq.mw

 

Problem copying a document to Maple Cloud (Public domain)

• Reset password

• Verified email is correct

• Chose File → Save to Cloud... (or clicked Send Document to Cloud on Maple Cloud palette) either way opend Login dialog

• Entered  Account = Maplesoft account, my Email and password then clicked Log in.  The following message appears: "The account type or email address or password is incorrect"

I've saved .mw files to Maple Cloud before with no problems.  Any help appreciated.

Thanks, Les

1,1,2,2,2,3,3,2,2,1,2,2,2,3,3,1,1

i would like to research the ordering mechanism of this kind of series Before sorting.

HI, 

Yesterday I replied  denitsastaicova's question while providing an attached file. 

Surprisingly, I wasn't able to save the worksheet after having executed it. The only way I found to save it was to copy-paste it's content in a new worksheet and save this latter without any execution.
Here is the file
events.mw

For info I'm working with  Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895
on Mac OS Mojave 10.14.3
If I open this file and execute it (and even if I execute only the commands from the initial restart to the three dsolve), I get this pop-up error message when trying to save it:

Does my worksheet contain some undesired character or is it a bug ?

I find many tools about differential 

i had some differential ideal

how to use these tools to research what application can be applied with differential ideals I discovered?

https://aws.amazon.com/getting-started/projects/deploy-elastic-hpc-cluster/

is it possible to use maple on high performance clusters?

i can only think to use c program to call cmaple with MPI in linux to use high performance clusters.

is there any other official method to do this?

if i upload my maple 2015 version to amazon for this computing, will it used up all license in this first chance of installation leading to that i can not install maple 2015 linux version to other machine?

https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ConfigWindowsHPC.html#ComputeNode

which virtual machine should i install the maple 12? on one virtual machine or all compute nodes?

 

how many compute nodes are need to compute dsolve 100,000 systems which may or may not have solution in maple 12?


I have an object in 6d I'd like to visualise. The region of 6d space I am interested in is described by these equations:

{f[10] = -(.2000000000*(5.*f[21]*f[20]*f[22]-5.*f[20]*f[22]^2+20.*f[20]*f[21]-20.*f[20]*f[22]+135.*f[20]+46.*f[21]))/(f[21]*(f[21]-1.*f[22])),
f[11] = -1.*f[22]-4.,
f[12] = -(1.*(f[22]^2+4.*f[22]-27.))/f[21],
f[20] = f[20],
f[21] = f[21],
f[22] = f[22]}

clearly the first three variables are dependant, and the latter three are independant. I'd like to graph the first three as the latter three vary between bounds and then colour the points on the output based on where they came from in the input, so i can get some intuition about what these equations mean.
 

Is there any facility to apply Finite Volume Method to Partial idifferential equation on MAPLE?
Any comand?

Any Code?

>>> maple = pywinauto.application.Application().start(r'C:\Program Files\Maple 2015\bin.win\maplew.exe')
C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py:1044: RuntimeWarning: Application is not loaded correctly (WaitForInputIdle failed)
  warnings.warn('Application is not loaded correctly (WaitForInputIdle failed)', RuntimeWarning)
>>> maple.Maple.PrintControlIdentifiers()
__main__:1: DeprecationWarning: Method .PrintControlIdentifiers() is deprecated, use .print_control_identifiers() instead.
Traceback (most recent call last):
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 246, in __resolve_control
    criteria)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 453, in wait_until_passes
    raise err
pywinauto.timings.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\__init__.py", line 50, in wrap
    return method(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 585, in print_control_identifiers
    this_ctrl = self.__resolve_control(self.criteria)[-1]
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 249, in __resolve_control
    raise e.original_exception
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 431, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 191, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
    elements = find_elements(**kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 303, in find_elements
    elements = findbestmatch.find_best_control_matches(best_match, wrapped_elems)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findbestmatch.py", line 533, in find_best_control_matches
    raise MatchError(items = name_control_map.keys(), tofind = search_text)
pywinauto.findbestmatch.MatchError: Could not find 'Maple' in 'dict_keys([])'
>>> maple.Maple.print_control_identifiers()
Traceback (most recent call last):
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 246, in __resolve_control
    criteria)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 453, in wait_until_passes
    raise err
pywinauto.timings.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 585, in print_control_identifiers
    this_ctrl = self.__resolve_control(self.criteria)[-1]
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 249, in __resolve_control
    raise e.original_exception
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\timings.py", line 431, in wait_until_passes
    func_val = func(*args, **kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\application.py", line 191, in __get_ctrl
    dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0]))
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 84, in find_element
    elements = find_elements(**kwargs)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findwindows.py", line 303, in find_elements
    elements = findbestmatch.find_best_control_matches(best_match, wrapped_elems)
  File "C:\Users\mas\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pywinauto\findbestmatch.py", line 533, in find_best_control_matches
    raise MatchError(items = name_control_map.keys(), tofind = search_text)
pywinauto.findbestmatch.MatchError: Could not find 'Maple' in 'dict_keys([])'
>>>

 

Hi Users!

Hope you all are fine here. I want to draw a graphs like this

Here 

y(x)=21.70160211*x^2-35.93499295*x+19.00000000;

and 

y(x-0.8)=21.70160211*(x-.8)^2-35.93499295*x+47.74799436

Please help me how to make this for x when y(x) on x-axis and y(x-0.8) on y-axis. I am waiting your positive response. 

Thanks

 


I have a complicated expression which includes RootOf( a quadratic ) but holds for all x what i'd like to do is turn it into a polynomial in x[1], x[2], x[3] so i can start looking at the monomial coefficients.

k[a1]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]-x[1]-2*x[2])/((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]+k[m])-k[d1]*x[1]-k[a2]*x[1]*(R[b]-x[1]-2*x[2])+2*k[d2]*x[2] = (-R[b]*k[a2]+2*k[a2]*x[1]+2*k[a2]*x[2])*(k[a1]*kh[m]*((x[1]+x[3])*k[d1]+C[T]*k[m])*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])/(k[m]*((R[b]+R[m]-x[1]-2*x[2]-x[3])*k[a1]*kh[m]/k[m]+kh[m]))-k[d1]*x[1]-kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])+2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])+(-2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])+2*k[a2]*x[1]+2*k[d2]-2*kh[d2])*(kh[a2]*x[1]*(R[b]+R[m]-Rh[m]-x[1]-2*x[2])-2*kh[d2]*x[2])/(2*kh[a2]*RootOf(kh[a2]*_Z^2+(-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])*_Z-2*k[a2]*x[1]*x[2]-k[a2]*x[1]^2+k[a2]*x[1]*R[b]+2*kh[d2]*x[2]-2*k[d2]*x[2])-R[b]*kh[a2]-R[m]*kh[a2]+Rh[m]*kh[a2]+2*kh[a2]*x[2])

If this were something like q(x)=p1(x)/sqrt(p2(x)) where p1 and p2 are polynomials and q is a quotient- this would be as simple as making sqrt(p2(x)) the subject and squaring both sides, and then movinbg everything onto one and multiplying out denominators. However RootOf is something I'm not used to manipulating.

Is there anyway of converting this expression to a polynomial using maple commands?

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