1
$\begingroup$

So CoffeficientRules[] gives a vector {E1->c1,..., En->cn} for the N monimals Mi in the polynomial

    P = M1+...+Mi 

I would like to separate the coefficients from the the rest, so I get two vectors

    V1 = {E1,...,En},

    V2 = {c1,..., cn}

Then I would like to have some function f(.) returning the powers of the original coefficient combinations. Then the original polynomial is found by the dot product

    P = f(V1).V2

Suggestions?

EDIT: I just found out that the two sought vectors can be found by a simple list manipulation.

    rule = CoefficientRules[myPolynomial, {a,b,c}]
    V1 = rule[[All, 1]] // MatrixForm
    V2 = rule[[All, 2]]  // MatrixForm

Now I just need to figure out how to transform V1 into a combination of {a,b,c} again. Say for instance that

    V[[1]] = {0,1,3} 

then I want the function f returning

    f[V[[1], {a,b,c}] = a^0*b^1*c^3
$\endgroup$
  • $\begingroup$ Here its considered helpful and polite show you own efforts and share your data and code attempts in a well formatted mathematica code, so we can quickly see the problem you are facing and see you have done your due diligence. Please help us to help you and edit your question accordingly. $\endgroup$ – rhermans May 15 '17 at 14:23
  • $\begingroup$ You don't want to use FromCoefficientRules[]? $\endgroup$ – Michael E2 May 15 '17 at 15:09
  • $\begingroup$ You can also use Keys[rule] and Values[rule]. $\endgroup$ – Michael E2 May 15 '17 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.