FaridSW

30 Reputation

4 Badges

4 years, 129 days

MaplePrimes Activity


These are questions asked by FaridSW

Given a polynomial in several variables is it possible to split it so that all the coefficients of the monomials are +1 or -1.

Example:

p:=-z+2*x+4*y-3*x*y.

I would lie to obtain

f:=-z +x+x +y+y+y+y -x*y-x*y-x*y.

Given a polynomial expression I would like to obtain a list whose entries are the positive entries of the polynomial with multiplicity given by the coefficients:

Example:

Given the polynomial expression: p:=x^2*y-2*y*z+3*x^2+2*y-z

The positive terms are: x^2*y, 3*x^2, 2*y

Thus I would like to obtain the list L:=[x^2*y , x^2 , x^2 , x^2, y , y].

Notice x^2*y appears once since the coefficient is 1.

x^2 appears three times since the coefficient is 3.

y appears two times since the coefficient is 2.

 

 

 

 

 

 

Is there a way to divide two lists entry by entry. I mean the following:

L:=[2,4,6,3];

T:=[2,2,3,1];

 

L/T=[1,2,2,3]

Given a list of numbers, is there a command that returns the list whose entries are the absolute values of the original list? is there also one from the signum?

Ex: Given L:=[1,-1,-5,2,-3], I would like to obtain for the absolute value [1,1,5,2,3] and for the signum [1,-1,-1,1,-1].

Given a list I would like to find the position of the positive numbers. Ex: Given L:=[3,8,-5,1,-3,-7], I would like to have as a result P:=[1,2,4].

I want to avoid using a loop for this. Any suggestion?

Page 1 of 1