How can I extract the six coefficients a ... f of a mixed polynomial ax^2 + by^2 + cxy + dx + ey + f? Unfortunately, the operator coeff doesn't quite work well for mixed polynomials.
Please advise.
Regards.
Last edit: videohead 2022-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I extract the six coefficients a ... f of an algebraic expression ax^2 + by^2 + cxy + dx + ey + f? Unfortunately, the operator coeff doesn't quite work well for mixed polynomials.
Please advise.
Regards.
Is this the sort of thing you are looking for? You will still need a bit
more to discard or separate the x and y bits (eg subst(x=1,...))
Arthur
Reduce (CSL, rev 6186), 27-Dec-2021 ...
1: p := ax^2 + by^2 + cxy + dx + ey + f;
2 2
p := ax + by + cxy + dx + ey + f
2: part(p, 1);
2
ax
3: part(p, 2);
2
by
4: part(p, 3);
cxy
5: part(p, 4);
dx
6: part(p, 6);
f
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I extract the six coefficients a ... f of a mixed polynomial
ax^2 + by^2 + cxy + dx + ey + f
? Unfortunately, the operatorcoeff
doesn't quite work well for mixed polynomials.Please advise.
Regards.
Last edit: videohead 2022-02-14
On Mon, 14 Feb 2022, videohead wrote:
Reduce (CSL, rev 6186), 27-Dec-2021 ...
1: p := ax^2 + by^2 + cxy + dx + ey + f;
p := ax + by + cxy + dx + ey + f
2: part(p, 1);
2
ax
3: part(p, 2);
2
by
4: part(p, 3);
cxy
5: part(p, 4);
dx
6: part(p, 6);
f
Besides Arthur's suggestion, here are two other possibilities:
There is also the contributed package coeff2 you could use:
Eberhard