MaplePrimes Questions

While working a test workbook in Maple 2023 - added a file went away for a while and came back and started adding code to the workbook when I suppose it did an autosave and this error came up 4x in a row. 

How can I work with a LogNormal distribution represented by a mean and standard deviation?
I see that is with exp(Normal(mu,sigma)), but I dont sure. Would you please help me with a example using LN(mean=20,standard deviation=5)?
I will use in PDF, CDF and RandomVariable. 

For a table

T := table(sparse = {}, [1 = {a}, 2 = {b}])

T[3] returns {}. 

Is there an equivalent for an rtable?


T := table(sparse = {}, [1 = {a}, 2 = {b}])

table( [( 1 ) = {a}, ( 2 ) = {b} ] )

T[1]; T[2]



Get the default value here



But (as documented), the sparseness of the table is not inherited - all elements are filled

Vector[row](6, T, storage = sparse); op(%)

Vector[row](%id = 36893490697130506636)

6, {1 = {a}, 2 = {b}, 3 = {}, 4 = {}, 5 = {}, 6 = {}}, datatype = anything, storage = sparse, order = Fortran_order, shape = []

fill = {} should fill in all unspecified values. but this is incompatible with storage = sparse (as documented).

Vector[row](6, {1 = T[1], 2 = T[2]}, storage = sparse, fill = {}); op(%)

Vector[row](%id = 36893490697130478916)

6, {1 = {a}, 2 = {b}}, datatype = anything, storage = sparse, order = Fortran_order, shape = []

And the default fill is still zero for datatype=set; I expected {} here.

Vector[row](6, {1 = T[1], 2 = T[2]}, storage = sparse, datatype = set); op(%)

Vector[row](%id = 36893490697130474412)

6, {1 = {a}, 2 = {b}}, datatype = set, storage = sparse, order = Fortran_order, attributes = [_fill = 0], shape = []




I am stuck on how to graphically represent my two G and S shapes. Any suggestions to help me illustrate this concept of a ruled surface?

Thank you

I expect that there must exist a Maple proc that does the equivalent of the following but I couldn't find it.  Can it be in the combinat package?

And if there isn't one, can the following be improved?  It seems to be horribly inefficient to me, although efficiency is not a major concern for me right now since I need it only for small values of n.


Proc produces all lists of length n consisting of the

two distinct symbols a and b.

doit := proc(a, b, n::posint)
        local p := 1, L := [ [a], [b] ];
        for p from 1 to n-1 do
                 L := [ map( x -> [a,op(x)], L)[], map( x -> [b,op(x)], L)[] ];
        end do:
        return L;
end proc:


[[a], [b]]


[[p, p, p], [p, p, q], [p, q, p], [p, q, q], [q, p, p], [q, p, q], [q, q, p], [q, q, q]]


[[5, 5, 5], [5, 5, 7], [5, 7, 5], [5, 7, 7], [7, 5, 5], [7, 5, 7], [7, 7, 5], [7, 7, 7]]



I have copied codes from the example of the pendulum to use for a simple case of the motion of a particle in the gravitational field. But when it is time to find v_, I get 0 while in the examples worksheet, it works? I try it in Maple 2022 and 2023 so it is not a question of a version of Maple. It seems that I am missing something. Some help would be appreciated.

Here is my

Thank you.


I have a question concerning the matrix. Is there any Maple command or function for counting the nonzero elements in any row of a matrix?

Thanks for your help.


I am running Maple 2023 on a mac M1. When I ask Maple to print a document with 3D figures, only the axes come out. 2D figures come out fine.  If I do the same thing on Maple 2022 on the same machine, there is no problem at all.   


Can any one confirm this problem?

many thanks

When we specify a set (a sequence of objects enclosed in curly braces), Maple removes duplicates, since the elements of the set must be unique, that is, they cannot be repeated. See below for 2 examples. With the first example  {a<=b  and  b>=a}, everything is in order, since they are one and the same. But Maple treats the same equality, written in two ways  {a=b, b=a} , as different objects. It seems to me that this is not very convenient:

{a<=b, b>=a}; # OK
{a=b, b=a}; # not OK
is((a=b)=(b=a)); # not OK




Would  anyone here  be interested in helping me with a genus problem and running the following code and letting me know the genus?  I do not have Maple and have tried other avenues for help without success; the on-line Magma calculator cannot compute it and Mathematica does not have a genus function.  I believe the following is the correct syntax to compute the genus however it may take a while.



f:=2*z^6 + z^7/2 - (5*z^11)/4 + 4*z^22 + (29*z^34)/10 - z^40 - (13*z^43)/2 + w^38*(z^2 - z^7/4) + 
 w^49*(-z^9 + z^13/4 + 2*z^14) + w^34*((7*z^14)/3 - (3*z^18)/2) + w^47*(z^10/3 + (7*z^11)/4 + (8*z^21)/5) + 
 w^24*(4*z^8 + (4*z^25)/5 - (3*z^27)/2) + w^9*((-6*z^2)/5 - z^6/2 + (7*z^31)/3) + 
 w^16*((7*z^21)/3 + (4*z^27)/5 + (4*z^32)/3) + w^18*(-6*z^14 - 2*z^31 - z^33) + w^3*(2*z^17 + (7*z^34)/2) + 
 w^16*((-3*z^5)/4 - 2*z^36 + z^39/3) + w^50*(-1/3*z^23 - (7*z^40)/2 + z^42) + w^4*((-3*z^30)/2 + (4*z^38)/3 + (8*z^42)/5) + 
 w^33*(-3*z^4 + (8*z^22)/3 - (8*z^43)/5) + w^16*(-1/4*z^26 - (3*z^41)/4 - z^43) + w^48*((2*z^2)/3 + 6*z^26 + (3*z^43)/5) + 
 w^49*(2*z^18 + z^36 - 2*z^44) + w^10*((-2*z^11)/5 - (3*z^26)/2 + z^45) + w^40*(-1/2*z^20 - z^29 + z^46) + 
 w^36*(-4 + 8*z^13 - (7*z^47)/4) + w^14*((7*z^24)/5 - 6*z^32 - 6*z^49) + w^22*(-2*z^27 - (8*z^50)/3) + 
 w^2*((3*z^10)/5 + (7*z^24)/4 - z^50/4);


I am trying to calculate the electric field E induced in a vibrating cantilever of conductive material, oscillating in the field of a permanent magnet.  However, I am having some difficulty getting pdsolve to work the way I want it to.  I'm also not sure if the partial differential eqations I derived from Maxwell's equations are correct, or if the boundary conditions for the electric field in the cantilever are correct.  Currently pdsolve gives me no solutions, which makes me think that either my PDEs or my BCs are not correct.  It may be that I need to try some sort of numerical method as well.  I am assuming that the z component of the electric field is just 0.  My third PDE comes from setting the divergence of the electric field to 0.  My first two PDEs come from the vector laplacian and its relation to the divergence and curl:

Laplacian * E = Div(E) -Curl(Curl(E))

The x and y components of this should be my first and second PDE, respectively.  Note that in this equation the divergence of E is 0, and the curl of E is -dB/dt, where B is the magnetic field.

My boundary conditions are simply that the components of the electric field at the surface of the cantilever is always tangent to the surface.

I have tried various simplifications, such as setting the right hand side of the PDEs to 0, and still I don't get any solution.

My question:  Are my PDEs and BCs sensible?  And if so, what do I need to do with pdsolve to get a proper solution?

Hi everyone,

I am trying to find the roots of a system of 3 multivariate polynomials with 3 variables. I have used

G := Basis(P, tdeg(x6, x7, x8))

from the Groebner package and got a Groebner Basis with 29 elements (the length of output exceeds the limit). I want to find roots in the interval [0,1] with x<y<z. Is there a way to find solutions? Some of the polynomials in the Basis are of order 11 and I can't find a single variable polynomial in the basis. Is there an efficiet way to find such roots? Or should I do someting completely different?



Let us consider the following assumptions:

Any set of binomials $B \in R=K[x_1, \cdots, x_n]$ induces an equivalence relation on the set of monomials in $R$ under which $m_1∼m_2$ if and only if $m_1−tm_2\in \langle B \rangle$ for some non-zero $t\in K$. As a k-vector space, the quotient ring $R/B$ s spanned by the equivalence classes of monomials. Now let $f =x^2−y^2$ be a binomial in $K[x, y]$. Among monomials of total degree three, $x^3$ and $xy^2$, as well as $x^2y$ and $y^3$ become equal in $K[x, y] / \langle f\rangle$.

Why the degree three part in the quotient is two-dimensional with one basis vector per equivalence class?

Also, why does the polynomial $f=x^3+xy^2+y^3$ map to a binomial with a coefficient matrix [2, 1]? I think this matrix arises from the matrix [1, 1, 1, 0] by summing the columns corresponding to $x^3$ and $xy^2$ and those for $x^2y$ and $y^3$. 

How can I implement a simple code to obtain these results in {\tt Maple}?

I am looking forward to hearing any help and guidance.

Thank you in advance

How to find G(0)??

I simplified my setup as much as possible. Please check

While I think I managed to obtain some analytical solutions, they look a bit strange for two reasons:

1) They do not depend on the exogenous parameters as I expected. In fact, mu_jk and mu_ki should only depend on q_0jk and q_0ki, while lambda_jk and lambda_ki should only depend on BigSigma_0jk, BigSigma_0ki, smallsigma_ujk and smallsigma_uki.

2) Strong dependence on q_0jk and q_0ki: if I were to setup these two parameters to zero or to the same value I can't obtain solutions anymore (especially for the lambdas). Does it mean that they are not really "free" parameters?

I noticed that if I combine the two equations from the FOCs of mu_jk and mu_ki into one system (is this even legit?), I get q_0jk = - q_0ki * (lambda_jk / lambda_ki). This is also easy to see if I apply the calibration at the beginning of the script (remove hashtags on all the params with the exception of q_0jk and q_0ki) and then divide lambda_jk by lambda_ki. Why?

I am quite sure that the computations are correct (I checked multiple times), but I am now questioning my setup. In which ways does my setup differ from the one below?

Essentially, I am trying to extend the following problem. As you see below, mu depends only on p_0 (the one-dimensional equivalent of my q_0jk and q_0ki) and lambda depends only on BigSigma_0 and smallsigma_u (the one-dimensional equivalents of my BigSigma_0jk, BigSigma_0ki, smallsigma_ujk and smallsigma_uki).

Thank you.

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