Items tagged with degree degree Tagged Items Feed


Dear people in Mapleprimes,

 

I have a question about the ordering of monomials in a polynomial.

I hope you will help me understand how Maple works about it.

I inputed the polynomial as is written in black below.

Then, the outcome was blue, which ordering I could understand well: total degree ordering where at first 

those who have the order of 6 are collected which are 14 x^3*y^3, 6x*y^5, and then the following was those which 

have the order of 5: 21*x^5, -35 x^4*y, 9*x^3*y^2,-15*x^2*y^3, ... and so on.

And, among those who have the same order, lexical ordering was done, that is among 14 x^3*y^3, 6x*y^5, one which 

came first was the one with the larger degree about x, and among 21*x^5, -35 x^4*y, 9*x^3*y^2,-15*x^2*y^3, 

the first was 21*x^5, the second was -35*x^4*y, and so one, which was the ordering following the exponent about x.

 

And, then, I calculated Factor(polynomial) mod 7, which meaning I know.

Then, the result was 2*(x*y+2)*(3*y^3+x^2+3x*y)y.

I can understand the ordering among x*y and 2 in x*y+2, and that among 3y^3, x^2 and 3x*y in 3y^3+x^2*3x*y.

But, I can't understand why (x*y+2) comes at the first term, with 3 y^3+x^2+3x*y following it, and with y coming last.

 

This might be a trivial question. But, I hope you will teach me about this.

 

Best wishes.

 

taro 

 

polynomial := 14*x^3*y^3+6*x*y^5+21*x^5-35*x^4*y+9*x^3*y^2-15*x^2*y^3+12*y^4+18*x^2*y-30*x*y^2

14*x^3*y^3+6*x*y^5+21*x^5-35*x^4*y+9*x^3*y^2-15*x^2*y^3+12*y^4+18*x^2*y-30*x*y^2

(1)

`mod`(Factor(polynomial), 7)

2*(x*y+2)*(3*y^3+x^2+3*x*y)*y

(2)

NULL

``


Download heck_mod.mw

my code can only do for one variable, 

how to make divisible checking for multivariable cases with the ordering such as plex

 

IsDivisible(LP(h, t), LP(g[i], t), x)

it is not only x when multivariable

 

f:=LP(y^2*x,plex(x, y))[2];
g:=LP(y*x-y,plex(x, y))[2];
Remainder(f, g, gcd(f,g));
degree(Remainder(f, g, x),x);
degree(g, x);

remainder has error expect its 3rd argument x, to be of type or but received y*x

how to do if have ordering

do it need to check whether both f and g have variable x using indets and then apply remainder?

do it need to check each variable starting from the first variable in the ordering? 

how about if f has variable x but g do not have variable x, or f do not have variable x and g have variable x

 

if so, i try to replace below code in the bottom code, it has error

Error, (in FindDivisble) cannot determine if this expression is true or false: 0 < Search(x, {x, y})

FindDivisble := proc(g, h, t)
with(ListTools):
result := 0;
for i from 1 to nops(g) do
mainvariable := 0;
for j from 1 to nops(t) do
mainvariable := op(j, t);
if mainvariable <> 0 then
if Search(mainvariable, indets(h)) > 0 and Search(mainvariable, indets(g[i])) > 0 then
if IsDivisible(LP(h,t), LP(g[i],t), mainvariable) = 0 then
return i;
else
result := 0;
end if:
end if:
end if:
od:
od:
return result;
end proc:

 

 

with(Groebner):
LP := proc(f, t)
return LeadingTerm(f, t)/LeadingCoefficient(f, t);
end proc:
IsDivisible := proc(f, g, x)
with(Algebraic):
if Remainder(f, g, x) = 0 or degree(Remainder(f, g, x),x) < degree(g, x) then
return 0;
else
return 1;
end if:
end proc:
FindDivisble := proc(g, h, t)
result := 0;
for i from 1 to nops(g) do
if IsDivisible(LP(h, t), LP(g[i], t), x) = 0 then
return i;
else
result := 0;
end if:
od:
return result;
end proc:
MD := proc(f, g, t)
r := 0;
u := Matrix(nops(g), 1);
for j from 1 to nops(g) do
u[j] := 0;
od:
h := f;
while h <> 0 do
i := FindDivisble(g, h, t);
if i > 0 then
u[i] := u[i] + LeadingTerm(h, t)/LeadingTerm(f[i], t);
h := h - LeadingTerm(h, t)/LeadingTerm(f[i], t)*f[i];
else
r := r + LeadingTerm(h, t);
h := h - LeadingTerm(h, t);
end if:
od:
end proc:
f:=y^2*x;
f1 := y*x-y;
f2 := y^2-x;
MD(f,[f1,f2],plex(x, y));

The question has been asked at http://www.mapleprimes.com/questions/133139-A-Question-About-Obtaining-Power-Of-A-Variable

 

 

However, still, I would like to have a simple, straightfoward solution. The situation is not about several term case, x^a*y^b + x^(a+2)*y^b, but for a single term. I have a term "3*x^k*y^(k+2) ", and how should I do to obtain the power of x, and the power of y? (k and k+2) 

 

I tried the following input as somehow suggested in the link above

***********

term:=3*x^k*y^(k+2);

x_degree:=map(t -> `if`(match(t = a*x^b*y^c, x, 's1'), subs(s1,b), NULL), convert(term, list));
y_degree:=map(t -> `if`(match(t = a*x^b*y^c, y, 's1'), subs(s1,c), NULL), convert(term, list));
print(x_degree,y_degree);

*****

 

I got 

***

k (k + 2)
3 x y
[0, k, 0]
[0, 0, k + 2]
[0, k, 0], [0, 0, k + 2]

****

I have no idea why k appear at second variable in [0,k,0] while k+2 appear at the third in [0,0,k+2]...

Hallo,

how can I  construct a Permutationgroup with given GroupOrder and Degree.

for instance: GroupOrder 12 and Degree 5, I found by accident

G:=<(1,2,3),(1,5,2)>

Best Regards

 

Kurt Ewald

Hi,

 

  I tried to obtain power of a series. I have the following input

 

***

assume(c<-10);
eq1:=2*x^a*y^b*(x+y)^c+3*x^(a+1)*y^(b+1)*(x+y)^(c+1);


f1:=map(t -> `if`(match(t = d*x^e*y^f*(x+y)^g, x, 's'), subs(s,e), NULL),
convert(eq1, list));


f2:=map(t -> `if`(match(t = d*x^e*y^f*(x+y)^g, y, 's'), subs(s,f), NULL),
convert(eq1, list));


f3:=map(t -> `if`(match(t = d*x^e*y^f*(x+y)^g, x+y, 's'), subs(s,g), NULL),
convert(eq1, list));

print(f1);

 ****

 

The output is

****

a b c (a + 1) (b + 1) (c + 1)
2 x y (x + y) + 3 x y (x + y)
[]
[]
Error, (in unknown) invalid input: match expects its 2nd argument, vv, to be of type {name, set(name)}, but received x+y
[]

***

 

  How to get the correct powers of x, y, and (x+y)? Since the power of x+y is negative, it cannot be absorbed into x and y.

 

Thank you!

Hi all,

I would like to set equal to zero some monomials in a polynomial. In particular those monomials in which an unknown has a certain degree. 

For example for the polynomial

poly := x^2*y+x*y*z+x*z

i would like to set equal to zero the monomials in which x has degree 1, that is x*y and x*z.

Is there a way to do it?

Thanks in advance
Manuele 

Say I have a polynomial x^5 + 4xy^4 + 2y^3 +  x*y^2 + x^2 + y + 3

Can I truncate it up to total degree 3 (for example), so 2y^3 +  x*y^2 + x^2 + y + 3

 

 

Dear Readers,

Given an expression for e.g. x^n+ y^3.5, how to extract the symbolic/floating point exponent, I tried with degree method but it fails whenvever there is symbolic or floating point exponent. Is there any alternative ?

 

Thanks,

 

Regards, Satya

Dear everyone,

 

  Hello,

 

  I have a question about how to get the power 'n' in an expression "(x+y)^n". For instance, I have a Maple code

 

******

eq1:=4*x^n*y^m+(x+y)^n+x^3;

f1:=map(t -> `if`(match(t = c*y^d, y, 's'), subs(s,d), NULL),
      convert(eq1, list));
f2:=map(t -> `if`(match(t = c*x^d, x, 's'), subs(s,d), NULL),
      convert(eq1, list));

Hey there,

i have an System in the form below.

I try to plot s over the angle t which is used in the functions (S,DS and DDS) but because maple uses t in the functions (s, v and a) as the time the calculated eigenfrequency doesnt fit to the System.

The eigenfrequency should be omega:=sqrt(c[0]/m[1])=1035 (over 360 degrees) but because of the angle time switch the eigefrequency is 1035 (over 1).

Has someone an idea how i can tell maple that t is an angle in degree? ...

> seconddegree:= proc(a,b,c) 
 if a=0 then if b=0 and c=0 then print ('infinite solutions')  
elif b=0 and c<>0 then print ('impossible')  
elif b<>0 and c<>0 then print (' one solution',x=-(c)/(b))fi;   
delta:=b^(2)-4 *a*c;    
elif if delta=0 then print('double solution',x=-b/(2 a))  
elif delta >0 then print ('exist two  solutions',x1=((-b+sqrt(delta...

I have to generate F(x) of a function with a degree of 5 who has zeros of x=2,x=1+3i,x=2-4i

After i put it into maple i use the command expand to give me the total function but afterwards i get this 144*i^4*x-25*i^2*x^3+x^5-288*i^4+118*i^2*x^2-8*x^4-188*i^2*x+25*x^3+104*i^2-38*x^2+28*x-8

i need to know what command can i use to get it to converts i^4 to 1 and i^2 to-1 that way i can truly simplify it. 

Dear everyone,

  Hello,  I have a question about obtaining the power of a variable. Suppose

f:=x^5;

g:=degree(f,x);

I got 5.

now let f:=x^n;

g:=degree(f,x)

I got FAIL :(  I tried g:=log[x](f), it doesn't go to "n" either.

 

Is there anyway I can simply get the "n" in x^n? I know "n" is an integer, but how to refine into integer type?

 

Thank you very much in advance

Hey there,

how can i solve the following ODE in degree and not in radiant... numerical solution is required... im allways getting the wrong eigenfrequency.

 

>m*D(D(x))(t)+d*D(x)(t)+k*x(t)=sin(2*t)

How to compute the highest total degree of a polynomial in which a variable, say x, appears?

For example, f := x^2*y+3*x*y^2+x^3*y^3-x^5+y^4*z^5;
then the highest total degree in x is 6.

The degree command does not seem to do what I would like to do, since degree(f,x) will give 5 instead.

Thank you in advance.

1 2 Page 1 of 2