nguyenhuyenag

90 Reputation

5 Badges

8 years, 201 days

MaplePrimes Activity


These are questions asked by nguyenhuyenag

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.

 

 

Hi all, i have a problem someone help me.

Define per(f(a,b,c)) = {f(a,b,c), f(b,c,a), f(c,a,b)}. I want to write a function removePer() that removes the permutations, example:

ds := {a, b, a^2, b^2, c, c + 2a, a - b, c^2, a + 2b, b + 2c}

then removePer(ds) return {a, a^2, c + 2a, a - b} because per(a) = {a, b, c}, per(a^2)  = {a^2, b^2, c^2} and per(c+2a) ={a+2b, b+2c, c+a}. Note that removePer(ds) can return {b, a^2, c + 2a, a - b} or {c, a^2, c + 2a, a - b}, ...  but just one result.

ds := {ab, bc, a - b^2, b - c^2, a^2, c - a^2},

then removePer(ds) return {ab, a - b^2, a^2}.

Thank you very much.

Hi all, I have a problem someone can help me

F := {a^2, b^2, c^2, ab, bc, ca}

G := [a^2, b^2, c^2, ab, bc, ca]

How to convert F to G and G to F ?

Thanks you very much.

I want to write a function func(n) get a^ib^jc^k from expand (a+b+c)^n

Example

When n = 1 then (a + b + c)^1 = a + b + c and func(n) return {a, b, c}.

When n = 2 then (a + b + c)^2 = a^2 + b^2 + c^2 + 2ab + 2bc + 2ca and func(n) return {a^2, b^2, c^2, ab, bc, ca}.

When n = 3 then func(n) return {a^3, b^3, c^3, a^2b, b^2c, c^2a, ab^2, bc^2, ca^2, abc}.

I have solution using 3 loops but in think it's not nice, someone can help me. Thanks you very much.

1 2 3 4 Page 4 of 4