MaplePrimes Questions


I have a list of integers (>1) and for all of them I define an alias (in the attached file I've tried two different names for them : a[n] or a||n) wich represents the nth roots of the unity.
When I apply the procedure allvalues to a specific alias it returns the algebraic values of the corresponding roots of the unity.
But when aplied to the list of aliases it gives me back only the name of the alias, not the algebraic values.

How can I fix this ?




`Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895`


for n from 2 to 3 do
end do:


a[2], a[3]



seq(allvalues(a[n]), n=2..3)

1, -1


1, -1/2+((1/2)*I)*3^(1/2), -1/2-((1/2)*I)*3^(1/2)


a[2], a[3]


for n from 2 to 3 do
end do:



seq(allvalues(a||n), n=2..3)

a[2], a[3], a2, a3


1, -1


1, -1/2+((1/2)*I)*3^(1/2), -1/2-((1/2)*I)*3^(1/2)


a2, a3


A := [alias()]:
map(allvalues, A);

[a[2], a[3], a2, a3]






Can you please help me in telling different ways to speed up the following code. thank you.

when I try to expand the polynomial (xy - 2*y + 3*z)^2*(3*x - 4*xy - 6*z + 8*yz)^2 I get an expansion where variables are repeseted multiple times like

 9*xy^2*x^2 - 36*xy*y*x^2 + 54*xy*z*x^2 + 36*y^2*x^2 - 108*y*z*x^2 + 81*z^2*x^2 - 24*xy^3*x + 96*xy^2*y*x + 48*xy^2*yz*x - 180*xy^2*z*x - 96*xy*y^2*x - 192*xy*y*yz*x + 432*xy*y*z*x + 288*xy*yz*z*x - 432*xy*z^2*x + 192*y^2*yz*x - 144*y^2*z*x - 576*y*yz*z*x + 432*y*z^2*x + 432*yz*z^2*x - 324*z^3*x + 16*xy^4 - 64*xy^3*y - 64*xy^3*yz + 144*xy^3*z + 64*xy^2*y^2 + 256*xy^2*y*yz - 384*xy^2*y*z + 64*xy^2*yz^2 - 480*xy^2*yz*z + 468*xy^2*z^2 - 256*xy*y^2*yz + 192*xy*y^2*z - 256*xy*y*yz^2 + 1152*xy*y*yz*z - 720*xy*y*z^2 + 384*xy*yz^2*z - 1152*xy*yz*z^2 + 648*xy*z^3 + 256*y^2*yz^2 - 384*y^2*yz*z + 144*y^2*z^2 - 768*y*yz^2*z + 1152*y*yz*z^2 - 432*y*z^3 + 576*yz^2*z^2 - 864*yz*z^3 + 324*z^4

how do i fix this so each variable is only shown once, ie for 9x*y^2*x^2 is shown as 9x^3*y^2 



I have a matrix consisting of components which are all definite integrals like the following example: 

L is a paramter I would like to keep as a symbol for now. How do I get maple to write out the result of the definite integral of such an expression? 


Best regards, 


Is there a feature in maple to plot even, odd, and fourier extensions of functions (PDEs)? 

Say we have the function f(x) = x + 1


i want to know the sign of all the coefficient of CharacteristicPolynomial of such matrix, can anyone help me to do this ?



I cannot get the answer (m=2,n=2) to the following problem on two equations from Maple 13.

(13/4)*m-(7/4)*n-3 = 0,
-(17/2)*n*2^n +34*m= 0

I get:

{m = (7/13)*RootOf(13*_Z*2^_Z-28*_Z-48)+12/13, n = RootOf(13*_Z*2^_Z-28*_Z-48)}

Thank you very much.





Hello Everyone;
I need to generate muplipal .dat files using loop with different names as shown as figure. Can any body hel me? I am waiting for your kind respinse. Thanks in advance

Dear Sir(Madam) 

I plot a spacecurve,which is an intersection of two surface,x+y+z=5 and x*y+y*z+z*x=0.The curve is shown below.

Then I want the curve's color changes accroding to the value of x*y*z.From the help page,I learn that the colorscheme option can make the color of different parts of a surface change accroding to the value of an user given function.However,it does not apply to all Plots' package command.You need to use the display command,colorscheme option with the option "overrideoptions",to force the graph's color to changed to desired.

P1 is the graph of the curve.

The first code works well,it is just a test.


The second code fail to chage color(In my document,I use 2-D Math Input,following the example)

display(P1, colorscheme = ["xyzcoloring", proc (x, y, z) options operator, arrow; x*y*z end proc], overrideoptions)

This is the trouble I encountered.So,please help me use this option correctly,or is there any other way to achieve my goal?

Thank you in advance.

The file here.

Hi all,

I have a system of nonlinear equations with for equations, 4 variables I want to solve for, and 2 parameters. All of the variables and parameters must be non-negative.

The code I used to try to do this is:

Where eqi (i = 1, ... , 4) are expression (not equations in themselves). For example, eq1 is:


When I try to run this code I get the following error:

"Error, (in SolveTools:-Inequality:-Piecewise) piecewise takes at least 2 parameters"


Can anyone help me how I can make Maple do what I want here? :)


Thank you in advance,




I have the general function F(x,g(y)), and I don't understand the following notation of the derivative of  F w.r.t  y in Maple ?  What is D2(F) ?  Can we provide a concrete example ?

Thank you!

When I try to find the trace of the product of Dirac Gamma matrices with variable indices, I get a different answer than in textbook. The product is Dgamma[~mu]Dgamma[~nu]Dgamma[~rho]Dgamma[~sigma]Dgamma[~5]. The answer I get using Maple is 0. The textbook answer is -4*i*epsilon[~mu,~nu,~rho,~sigma](Levi-Civita symbol). I verified this using Maple with using 1,2,3,4 and 2,1,3,4 for mu,nu,rho,sigma. I think I'm probably the one doing something wrong. Maple 2019 on Mac with Physics package default standard setup.

While using the Physics package in Maple 2018, I am facing a few hurdles. In the file ,

1. I have defined a dual-vector with components $u_a$ in step 12, but when I am trying to compute $g(u,u)$ using SumOverRepeatedIndices  in step 15, it is not evaluating the sum.

2. I want to define a tensor $B_{ab}=\nabla_a u_b$. Do I just write Define(B{a,b}=D_[a] u[b]) ?

3. Is there any command to find the symmetric and antisymmetric components and trace of the tensor B or do we evaluate them by writing out the expressions?

Thank you.


Please, may I ask your help with the following problem? 

I have to print something like this: 

Days 4,5,6 is closed. 

4,5,6 is the content of a list.  I enter: 


printf("Days %a is closed\n", d[]);

but Maple returns:

Days 4 is closed

Of course, if I enter  printf("Days %a, %a, %a is closed\n", d[]);

I get the correct result: Days 4,5,6 is closed. 

However, the numer of elements the list will have vary from case to case and according to the procedure I'm running so I cannot enter the command with the exact number of %a. How could I overcome this problem?

Many thanks for your help. 


First 283 284 285 286 287 288 289 Last Page 285 of 2121