Items tagged with degree

Also available: degree

Let L = {a1, a2, ..., an} (or L = [a1, a2, ..., an]) with is homogeneous polynomial. How to create function createDegree() return elements of degree <= n from L.

Expamle. L = {a-2b, b^2, (a+c)^2}.

createDegree(L,1) return {a - 2b}.

createDegree(L,2) return {b^2, (a - 2b)^2, (a+c)^2, a - 2b}.

createDegree(L,3) return {b^2, (a - 2b)^2, (a - 2b)^3, (a+c)^2, (a - 2b)b^2, (a - 2b)(a+c)^2, a - 2b}.

Thanks you very much.



I am having 26th degree polynomial univariate equation , I used Isolate to get the roots. but I am getting some extra roots which are not true they I even tried to substitute those roots in original equation then I got non zero answer instead of getting nearly zero answer.How is it possible??


equation looks like:


Solutions i got:

[t = -4.162501845, t = -2.295186769, t = -1.300314688, t = -.8048430445, t = -0.6596008501e-1, t = -0.4212510777e-1, t = 0.4212510777e-1, t = 0.6596008501e-1, t = .8048430445, t = 1.300314688, t = 2.295186769, t = 4.162501845]

t=4.162501845 give me non zero answer when I substitute it in the equation given above:

I got this answer: 4.750212083*10^39



I have an ODE plot like this and I want its horizontal axes to be in degree instead of radian, but I don't know how

Below is a calculation with 200 Volt and 100 Ω.
The output is 1 Ampere at -45 degrees.
This is useful for electrical circuit calculations, and I can get the right result on a TI-nspire.

However I can't make maple 2015 do it. It's resembling polar coordinates but I can't seem to find any info I can understand.



below is the same equation but in a picture so it can be read by humans:


Hopefully theres some simple comands that can help make this easy.


can I extract a certain non numeric degree from an expression?

for example, I want to get degree "n-1" from "x^(n-1)+y".


any thoughts? 

Here we have an application to understand how algebraic expressions, calculating degrees relative abosulutos polynomial operations and introduction to work.Here we have an application to understand how algebraic expressions, calculating degrees relative abosulutos polynomial operations and introduction to work.

(in spanish)





I'm looking at Maple as a possible alternative to Mathcad (which I've been using for years, but is now very jaded compared to other options like Maple and Mathematica).  I'm a civil engineer and for what I do, one of the better features of Mathcad is the way it handles units.  For example, if I specify an angle in degrees (say phi=30 degrees) and then ask for sin(phi), I get 0.5.  At face value, I though Maple would do the same kind of thing.  However, this doesn't appear to be the case (see attached worksheet).  The only workaround that I can see is to specify the angle in degrees (but without assigning ) and then multiply the specified value by pi/180 (to convert to radians) before passing it to the sin function.  Which is all a bit messy and not at all an attractive solution.

Am I misunderstanding the way units work in Maple and is there a clean way of specifying angles in degrees (which is what engineers work with) and using these values directy in trig functions?

Thanks in anticipation,


So it looks like radians work.

Why does degrees fail and how do I get degrees work?

How do you guys like to access pi? Do you keep a symbol of it around in a random document to open?

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.




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



`mod`(Factor(polynomial), 7)






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)
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;
result := 0;
end if:
end if:
end if:
return result;
end proc:



LP := proc(f, t)
return LeadingTerm(f, t)/LeadingCoefficient(f, t);
end proc:
IsDivisible := proc(f, g, x)
if Remainder(f, g, x) = 0 or degree(Remainder(f, g, x),x) < degree(g, x) then
return 0;
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;
result := 0;
end if:
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;
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];
r := r + LeadingTerm(h, t);
h := h - LeadingTerm(h, t);
end if:
end proc:
f1 := y*x-y;
f2 := y^2-x;
MD(f,[f1,f2],plex(x, y));

The question has been asked at



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



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));



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]...


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

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


Best Regards


Kurt Ewald



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




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));




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!

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 ?




Regards, Satya

1 2 Page 1 of 2